A container for recorded p5 drawing commands that can be exported as an SVG document or replayed onto the canvas.
Use createShape() or buildShape() to record shapes, or loadSVG() / createSVG() to import external SVGs into a ShapeCollection.
Examples
Syntax
p5.ShapeCollection()
Parameters
Methods
begin
Starts capturing drawing commands into this shape container.
Options:
draw(Boolean, optional): Iftrue, drawing commands will be drawn onto the canvas in addition to being recorded. Iffalse(default), commands are recorded silently without rendering.
end
Stops capturing drawing commands and finalizes the shape.
Notice any errors or typos? Please let us know. Please feel free to edit src/shape/svg/svg_export.js and open a pull request!