@amaplex-software/sketchpad

0.2.4 • Public • Published

Sketchpad

Backers on Open Collective Sponsors on Open Collective

A simple sketchpad project. (Live Demo)

NPM

Authors

Installation

To install Sketchpad via Bower:

$ bower install sketchpad --save

or use npm:

npm install sketchpad

Usage

Having a canvas on the DOM:

<canvas id="sketchpad"></canvas>

You should simply configure it by instantiating the Sketchpad:

var sketchpad = new Sketchpad({
  element: '#sketchpad',
  width: 400,
  height: 400,
});

After that, the API provides a variety of functionalities:

// undo
sketchpad.undo();

// redo
sketchpad.redo();

// Change color
sketchpad.color = '#FF0000';

// Change stroke size
sketchpad.penSize = 10;

// Playback each sketchpad stroke (10 ms is the time between each line piece)
sketchpad.animate(10);

For more documentation about the project, visit: TBA

Contributing

  • Fork this repository.
  • Install with npm install
  • Send a PR

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Readme

Keywords

Package Sidebar

Install

npm i @amaplex-software/sketchpad

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

24 kB

Total Files

7

Last publish

Collaborators

  • adrien-fery
  • grumpy-cat