rough-stuff / rough

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

Changing shape properties dynamically #182

Open GreenFootballs opened 3 years ago

GreenFootballs commented 3 years ago

I'm probably missing something, but is there a way to change the properties of a shape dynamically, for example the fill color, without redrawing the entire randomly generated object?

mirabledictu commented 3 years ago

I'm probably missing something, but is there a way to change the properties of a shape dynamically, for example the fill color, without redrawing the entire randomly generated object?

Any update on this? I'm also trying to draw a rectangle and end it on mouseup but can't seem to find a good example out there.

https://github.com/rough-stuff/rough/issues/184

GreenFootballs commented 3 years ago

No solutions yet. I'm also trying to create an element on a mousedown event, then use mousemove to change the dimensions dynamically, but I'm having no luck and the docs don't help. It must be possible - check out Excalidraw, that app does exactly this when you create objects.