JSPM

  • Created
  • Published
  • Downloads 913204
  • Score
    100M100P100Q183135F
  • License MIT

Create graphics on HTML Canvas with a hand-drawn, sketchy, appearance.

Package Exports

  • roughjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (roughjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Rough.js sample

Rough.js

roughjs.com

Rough.js is a light weight, stand-alone Canvas based library that lets you draw in a sketchy, hand-drawn-like, style. The library defines primitives to draw lines, curves, arcs, polygons, circles, and ellipses. It also supports drawing SVG paths.

Install

The latest Rough.js can be downloaded from the dist folder.

or from npm:

npm install --save roughjs

Usage

const rough = new RoughCanvas(document.getElementById('canvas'), 800, 800);
rough.rectangle(5, 5, 90, 90);
rough.circle(80, 170, 50);
rough.ellipse(300, 100, 150, 80);
rough.line(80, 170, 300, 100);

and check out more examples at roughjs.com.

API & Documentation

Check out the website: roughjs.com

and

Full Rough.js API

Credits

This project was inspired by Handy, a java based library for Processing. Rough.js borrows some core algorithms from Handy, but it is not a JS port for processing.js.

License

MIT License (c) Preet Shihn