Infinite turtles
Canvas turtle drawing library
Installation
Easy to install with NPM:
npm install infinite-turtles
How to use?
You can use it with AMD, CommonJS or globals.
var canvas = document.getElementById('myCanvas');
var turtle = new TURTLE.Turtle(canvas);
turtle.background('#000');
turtle.drawer.setX(130)
turtle.drawer.setY(130)
turtle.drawer.angle = Math.random()*360
turtle.lineWidth( 20);
turtle.color(new TURTLE.Color(255,100,0,1))
turtle.forward(10 )
turtle.turn(92)
turtle.forward(10 )
turtle.turn(-90)
turtle.draw(100)
Examples