spatter

1.0.0-rc1 • Public • Published

Spatter

A package for creating a watercolor on paper effect using svgs and canvas.

Example:

Demo coming soon. 4/10/17

    const Spatter = require('spatter');
 
    let spatter = new Spatter(
        document.getElementById('canvas'),
        {
            bgSrc: 'http://placehold.it/500x300',
            onComplete: () => {
                console.log('complete');
            },
            onStart: () => {
                console.log('started');
            },
        }
    );
 
    spatter.begin();

Parameters

canvas - *required

This is the canvas that you want the drawing to take place on.

opts - optional

Can include callbacks for onStart, onComplete, and a background image for the canvas.

Usage

NPM

Feedback ✉️

It is greatly appreciated! 🎉 Please hit me up, I'd love to hear what you have to say!

messagethesmith@gmail.com

https://github.com/limeandcoconut

@limeandcoconut

Cheers!

TODO:

  • More comprehensive docs
  • Link to example
  • Run off of powertrain
  • Use dt to ensure that timing is accurate
  • Throw if Droplet has not been configured or passed opts

License

MIT, see LICENSE.md for details.

/spatter/

    Package Sidebar

    Install

    npm i spatter

    Weekly Downloads

    0

    Version

    1.0.0-rc1

    License

    MIT

    Last publish

    Collaborators

    • limeandcoconut