infinite-turtles

0.1.11 • Public • Published

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

More examples here

Example image

Readme

Keywords

Package Sidebar

Install

npm i infinite-turtles

Weekly Downloads

16

Version

0.1.11

License

ISC

Last publish

Collaborators

  • laurent.zuijdwijk