This is a collection of notes on the p5.js library. There is a corresponding repo with the configured project and sample code described here.
The easiest way to get setup with a auto-reloading ES6 server is with the p5-manager.
Where one-time initialization code goes. Minimally, we setup a canvas:
createCanvas(width, height)
Code to draw a single frame.
(0,0) --- (x,0)
| |
(0,y) --- (x,y)
createCanvas(width, height)
line(x1,y1,x2,y2)
background()
fill()
stroke()