rough-stuff / rough

Create graphics with a hand-drawn, sketchy, appearance
http://roughjs.com
MIT License
19.83k stars 613 forks source link

Animations with Transitions #154

Open samtcmu opened 4 years ago

samtcmu commented 4 years ago

Is there a way to use rough.js so that the drawing commands are animated? I want to be able to make a moving animation that progressively draws the diagram I am trying to make.

pshihn commented 4 years ago

Are you using SVG or Canvas?

samtcmu commented 4 years ago

I'm currently using canvas with a custom frame render + window.requestAnimationFrame. However, this can only update a frame with discrete rough.js visuals (e.g. fully shading a circle or fully drawing a line segment connecting 2 points). A more native solution for rough.js that is capable of smoothly shading a circle over a period of time and smoothly drawing a line segment between 2 points over a period of time would work better for me. Otherwise, I would have to break down a relatively simple rough.js operation into discrete chunks on my own.

On Thu, Apr 23, 2020 at 11:31 PM Preet notifications@github.com wrote:

Are you using SVG or Canvas?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pshihn/rough/issues/154#issuecomment-618782141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMSQ3C5RAPFU6X6CM5LGLROEBXBANCNFSM4MPXYLVA .