This is a fork of Rough.js adding animations. This is a work in progress, and the end goal is to submit a PR to the rough.js repo merging this functionality. It is not published to npm, but can be consumed directly from GitHub.
See the underlying rough.js documenation for more.
See the playground here to test the animations.
Simply add this github repo to your dependencies as follows, then run npm i
:
"rough-animated": "josh-stillman/rough-animated"
The following animation options are added to the standard rough config.
Option | Type | Description |
---|---|---|
animate | boolean | Enables animations. |
animationDuration | number | Duration in ms. |
animationDurationFillPercentage | number between 0 and 1 | Percentage of the duration to use for the fill. |
animationDelay | number | Number of ms to delay the start of the animation. Useful for orchestrating multiple animated shapes |