Digital Play: p5.js 
2021

Screenshots from p5.js “sketches”
JavaScript library running in the p5.js Web Editor
p5.js is essentially Javascript made easier for artists and designers. With it, you can write code that produces images or “sketches” directly in a web browser. Using arrays of objects to make multiples of one shape that each move idependently, I’ve created a series of partially interactive drawing machines. By clicking and moving the mouse whilst the machine is running, the objects will change direction and speed. As each object moves across the canvas it draws a line behind it.

Restarting the machine allows for many different images to be created and by adjusting several variables including the shape, colour, speed, size, acceleration and number of objects in the canvas, the possibilities for discovery are vast. The canvas becomes a constantly changing image, stills of which can be recorded simply by screenshoting.






Controls:
Click or tap:
Click and hold:
Press ‘S’:
Press ‘F’:
Press ‘B’:
Press ‘D’:
to flip gravity
to accelerate left or right
to save a screenshot
to change the foreground
to change the background
to reset the canvas