painterjs

0.1.1 • Public • Published

painter.js

🎨 Painter.js is a JavaScript plugin that provides a simple canvas for users draw with some pencils, shapes and colors. This also makes you become just a painter to do crappy art.

Getting Started

Just create a new instance of Painter, then set some options and now your canvas is ready for the fun.

var painter = new Painter(document.body, {
  background: '#FFFFFF',
  border: true,
  colors: [
    '#083D77',
    '#F4D35E',
    '#EE964B',
    '#F95738'
  ],
  height: 500,
  width: 500
});

Options

  • background {string} - Canvas background color.
  • border {boolean} - Enable or disable border of canvas.
  • colors {Array} - Colors available for pencils and shapes.
  • height {int} - Canvas height in pixels.
  • width {int} - Canvas width in pixels.

License

MIT © Luis Henrique Bizarro.

Package Sidebar

Install

npm i painterjs

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • lhbzr