This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josh Ackerman
Posted Dec 24 - Read on Facebook

Hello,

What is the best way to add drawing to prototypes? Is there an elegant native solution or should I just use a 3rd party library. I would like to have support for smooth strokes, so a simple solution like drawing circles whenever the mouse moves does not quite work.

Thanks in advance.

3 Comments

Marc Krenn

I'm pretty confident it's possible without using a 3rd party lib. I'd approach this by saving the mouse/touch-coordinates in an array first and then draw a smoothed SVG bezier-path through it.

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths

Marc Krenn

http://share.framerjs.com/vgar8ow3rgm0/

Far from being perfect but I think it's a start :)

Will continue working on it tomorrow or so.

Jordan Robert Dobson
Read the entire post on Facebook