turtle-svg

1.0.0 • Public • Published

Turtle-SVG

Turtle is one of the first programs that come to mind for learning digital drawing. But we live in a web era. And there is SVG.

With SVG, browsers can easily render vector graphics. This can be useful if you want to make drawings of hardware, data structures, fashion or plain art.

This small library provides a number of basic shapes. You can render these in the browser or as an SVG document. In the latter case, you can import the file into a vector drawing program. Then, fire up Inkscape and tune your drawing as needed.

how to use

$ node paint <file>

This will call browserify and jsdom behind the scenes and finally results into an SVG file.

credits

This library is based on a talk by @substack and his svg libraries (esp. svg-create-element, maybe I will be using load-svg later too).

To generate the actual SVG file, jsdom by @tmpvar is used.

Some drawing examples come from the Processing library. For now, only the box example has been freely interprated.

examples

$ git clone git@github.com:mulderp/turtle-svg.git 
$ npm install
$ node examples/box.js

You now can load the resulting SVG with a browser from static/index.html, or, you can open the resulting SVG in e.g. Inkscape.

license

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i turtle-svg

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pmu