Documentation
The turtle starts with the pen up at the bottom center of a 640 by 360 rectangle.
Function penUp
penUp(): void
Lifts the pen so that following movements leave no trace.
Returns: void
Function penDown
penDown(color: string): void
Puts the pen down so that following movements leave a color trace.
Parameters:
color: stringA CSS
<color>value.
Returns: void
Function forward
forward(distance: number): void
Moves the turtle distance units forward, or backwards in case of a negative number.
Parameters:
distance: numberThe number of units to move.
Returns: void
Function rotate
rotate(angle: number): void
Rotates the turtle angle radians without moving.
Parameters:
angle: numberThe rotation angle, clockwise in radians.
Returns: void