nornagon / saxi

Tools & library for driving the AxiDraw pen plotter
GNU Affero General Public License v3.0
472 stars 55 forks source link

Have drawn lines change color #37

Open zoso95 opened 5 years ago

zoso95 commented 5 years ago

If you had the lines that were drawn change color that would give a pretty good indicator of progress

nornagon commented 5 years ago

Yes, this would be rad! I had a go at this a while ago and ran into performance issues with redrawing complex SVGs, but if we can find a way to do it performantly that would be great.

(Perhaps we could split up the drawing into many small layers of ~1000 lines each, then we'd only be redrawing at maximum two layers per frame...? Not sure if the many layers would be better or worse, though.)

Makio64 commented 4 years ago

I think it might be done with gsap without too much extra work ? https://greensock.com/docs/v3/Plugins/DrawSVGPlugin

nornagon commented 4 years ago

The problem here is with the browser's own redraw rate of complex SVGs. It doesn't matter which library is used to trigger the relevant redraws, it's still going to be the browser redrawing the SVG at the end of the day.