react-p5 icon indicating copy to clipboard operation
react-p5 copied to clipboard

P5.js svg implementation

Open felipeinfantino opened this issue 4 years ago • 2 comments

Would it be possible to use https://github.com/zenozeng/p5.js-svg with this library so we can export the canvas as svg ? This would be amazing.

felipeinfantino avatar Aug 29 '20 12:08 felipeinfantino

@felipeinfantino I never used this library (p5-svg).....if is there any developer who can configure it.....your PR are welcome)

gherciu avatar Mar 22 '21 11:03 gherciu

i'm also really interested in this. Not sure where to start with configuring it with react-p5, but happy to try. I've used p5.js-svg and made a starter here: https://editor.p5js.org/amcc/sketches/jE8VuGHNx

All that is required in a non-react p5js sketch is that p5.js-svg is imported after p5js, then SVG needs adding to the createCanvas parameters. I did try adding the sketch to the

with a script as per the instructions here: https://github.com/zenozeng/p5.js-svg#readme - that isn't working, which isn't surprising.

@Gherciu if you've any hints on how i might start i could try and help. This is an increasingly common project - especially with people using plotter and similar tools who want vector/svg outputs.

amcc avatar Aug 25 '22 13:08 amcc