UNPKG

p5.js-svg

Version:

The main goal of p5.SVG is to provide a SVG runtime for p5.js, so that we can draw using p5's powerful API in \<svg\>, save things to svg file and manipulating existing SVG file without rasterization.

13 lines (9 loc) 181 B
const sketch = (p) => { p.setup = () => { p.createCanvas(100, 100, p.SVG); } p.draw = () => { p.background(0); } } new p5(sketch, document.body);