Skip to content

1ntEgr8/turtlejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐢 Turtle style graphics for the web!!

Turtles!?

Yep, you heard that right! turtlejs is a library that can bring your wildest turtle drawings/animations to life.

You can use this library to draw vector graphics. Some examples include fractals, L-systems, iterative patterns. Let your imagination go wilddd!!!

For more info on turtle graphics, visit https://en.wikipedia.org/wiki/Turtle_graphics

Installation

Using script tag

<script src="https://cdn.jsdelivr.net/gh/1ntEgr8/turtlejs/turtle.js"></script>

Using npm

npm install cute-turtle

Demos

Coming soon!

Usage

The library exposes the Turtle class, which contains all of the functions you need to start drawing.

Start off by creating a turtle.

const turtle = new Turtle(0, 0, 1000, 1000);

The Turtle constructor takes in an initial x-position, initial y-position, canvas height, and canvas width. The default values are 0, 0, 100, 100 respectively.

Take a look at the demos/ folder to learn how to use your turtle.

Have fun!