boblincon / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Running raw Javascript #241

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I see that Turtle Graphics 
(https://blockly-demo.appspot.com/static/apps/turtle/index.html) can output 
Javascript code, is there any way that I can write the javascript code to get 
the turtle to run, NOT necessarily to turn the code into blocks, but just to 
get the turtle to run with running the raw Javascript code?  Thanks so much! 
Jonathan

Original issue reported on code.google.com by naruto...@gmail.com on 19 Jul 2014 at 4:52

GoogleCodeExporter commented 8 years ago
Sure.  Execute at the console:

Turtle.moveForward(100);
Turtle.turnLeft(90);
Turtle.moveForward(100);
Turtle.animate();

...and then if you want...

Turtle.reset();

Posting to the newsgroup would probably have been a better place for this.

Original comment by neil.fra...@gmail.com on 19 Jul 2014 at 7:37