Skip to content

CodeGuppyPrograms/TurtleGFX

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
img
 
 
lib
 
 
 
 
 
 

What is TurtleGFX?

In a nutshell this library allows to code with 🐢 Turtle Graphics in JavaScript.

TurtleGFX is add-on for p5.js library. TurtleGFX extends the JavaScript based p5.js library with Turtle Graphics drawing primitives.

Turtle Graphics is great for both education and creative coding.

When used in education, teachers and educators, usualy find that Turtle Graphics offers a gently introduction to programming to young kids.

In addition, with Turtle Graphics is very good at presenting some advanced concepts such as recursion.

Features

Library supports two modes:

  • Easy Mode / Default turtle mode. This is the default mode. In this mode users can work directly with the global TurtleGFX API such as: forward(), left(), right(), etc.

  • Multiple turtles mode. In this mode users can create multiple turtles on the screen ( let turtle = createTurtle(); turtle.forward(); etc. );

The API has been designed to be closely compatible with popular Turtle Graphics libraries from other languages, such as Python / Logo. In this way you can easily port programs from those languages to JavaScript.

For API reference please consult the turtlegfx.js code.

Source code

The source code of this library is contained in file turtlegfx.js. This is the only file you need in your p5.js project to enjoy Turtle Graphics.

Examples

There are several examples included with this library. Please refer to the source code of ex-____.html files for details.

The online version of these examples is available at: https://codeguppyprograms.github.io/TurtleGFX/

License

This library is offered under CC BY 2.0 license by codeguppy.com - the p5.js based coding site for kids, teens and creative adults!

Feel free to use TurtleGFX in your p5.js sketches!

Notes

TurtleGFX is also built-in into codeguppy.com

Some of the examples included with TurtleGFX are also available on codeguppy.com under TurtleGFX libray:

For feedback and suggestions please tweet @codeguppy

Happy coding!

About

Turtle Graphics for p5.js / JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published