Working version here:
https://editor.p5js.org/golan/sketches/qn6EpSXiQ
This program:
- Loads an SVG file, using loadStrings() from p5.js v.1.11
- Parses it, with npm/svg-path-parser v.1.1.0
- Stores the SVG as an array of commands
- Also stores the SVG as an array of polyline coordinates
- Displays a design using the SVG
- Modifies the design (e.g. with randomness)
- Exports an SVG of the design, using p5.plotSvg.js v0.1.7