Skip to main content
100%

p5-starter

✓ Published0🌍 Public
AAlark Joshi
Last edited Jan 26, 2024
Created on Jan 26, 2024

This example demonstrates a simple animated pattern of five pink rectangles, each with a random width, stacked vertically on a gray background. The sketch runs at five frames per second, causing the rectangle widths to change with every frame. It uses the p5.js library, specifically the `createCanvas`, `background`, `fill`, `rect`, and `random` functions within the `setup` and `draw` loop. The code does not load any external data; it generates all visual variation procedurally.

AI-generated description

Amazing first demo for P5. P5 is the best!!!

Full course playlist: YouTube: Constructing Visualization 2024.

MIT Licensed

Similar vizzes