mattdesl / canvas-sketch

[beta] A framework for making generative artwork in JavaScript and the browser.
MIT License
5.01k stars 393 forks source link

Support for groups in the SVG Export #76

Open JanWerder opened 4 years ago

JanWerder commented 4 years ago

It would be great for plotter art, if the user could use Groups to structure the paths on the canvas.

Groups allow the user to seperate the documents into layers for later in the process of plotting a drawing. This allows them to use different pens with different colors for different parts of the drawing.

This is of course not a problem of the Export alone, since the user would have to specify with path belongs to which groups. Other libraries like paper.js follow the principle of adding paths to a group object and then adding the group object to the "renderer". Maybe a similar approach could be used for canvas-sketch.

robertoranon commented 2 years ago

Hi Matt, I could have a go at implementing this feature, if it's not already in your pipeline or done. In that case, would you like to give some hint/direction/specific feature that you have already in mind?