Adding sliders to the New turtle code
Log in to post a comment.
// Forked from "New turtle with Sliders" by rupertxrussell // https://turtletoy.net/turtle/ccede85dbb // You can find the Turtle API reference here: https://turtletoy.net/syntax Canvas.setpenopacity(1); // Global code will be evaluated once. const offsetX=-92; //min=-200 max=200 step=1 const offsetY=-53; //min=-200 max=200 step=1 const size=100; //min=5 max=200 step=1 const angle=144; //min=1 max=360 step=1 const number=4; //min=1 max=3600 step=1 const turtle = new Turtle(); turtle.penup(); turtle.goto(offsetX, offsetY); // change the starting position turtle.pendown(); // The walk function will be called until it returns false. function walk(i) { turtle.forward(size); // change the size turtle.right(angle); return i < number; }