spatter
v1.0.0-rc1
Published
A package for creating a paint drop on papter effect using canvas and svgs.
Downloads
2
Maintainers
Readme
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
Feedback ✉️
It is greatly appreciated! 🎉 Please hit me up, I'd love to hear what you have to say!
https://github.com/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.