Skip to content

Instantly share code, notes, and snippets.

Created July 12, 2016 14:58
Show Gist options
  • Save anonymous/ceddc168af290eb10c9d5d40f9853fb7 to your computer and use it in GitHub Desktop.
Save anonymous/ceddc168af290eb10c9d5d40f9853fb7 to your computer and use it in GitHub Desktop.
Tiny Turtle // source http://jsbin.com/cejeki
<!DOCTYPE html>
<html>
<head>
<script src="https://toolness.github.io/tiny-turtle/tiny-turtle.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Tiny Turtle</title>
<style id="jsbin-css">
canvas{
width: 400px;
height: 400px;
border: 1px solid;
}
</style>
</head>
<body>
<canvas></canvas>
<script id="jsbin-javascript">
TinyTurtle.apply(window);
function square(){
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
}
// Write your function call below
stamp();
</script>
<script id="jsbin-source-css" type="text/css">canvas{
width: 400px;
height: 400px;
border: 1px solid;
}</script>
<script id="jsbin-source-javascript" type="text/javascript">TinyTurtle.apply(window);
function square(){
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
}
// Write your function call below
stamp();
</script></body>
</html>
canvas{
width: 400px;
height: 400px;
border: 1px solid;
}
TinyTurtle.apply(window);
function square(){
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
right(90);
forward(40);
}
// Write your function call below
stamp();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment