A collection of interactive p5.js sketches demonstrating various creative coding techniques.
- Bouncing Balls: Colorful balls that bounce around and react to mouse position
- Fractal Tree: A recursive tree structure that changes with mouse position
- Particle System: Interactive particles that follow mouse movement
- Wave Animation: A colorful wave pattern that animates over time
To run these examples:
- Clone or download this repository
- Open
index.html
in a web browser
Alternatively, you can run a local server:
# Using Node.js http-server
npx http-server
# Then open http://localhost:8080 in your browser
p5js-examples/
├── index.html # Main HTML file
├── bounce.html # Bouncing balls example page
├── fractal.html # Fractal tree example page
├── particles.html # Particle system example page
├── wave.html # Wave animation example page
├── styles.css # Styling for all pages
├── sketches/
│ ├── bounce.js # Bouncing balls sketch
│ ├── fractal.js # Fractal tree sketch
│ ├── particles.js # Particle system sketch
│ └── wave.js # Wave animation sketch
└── README.md
- p5.js - A JavaScript library for creative coding
- HTML5 Canvas - For rendering graphics
- CSS3 - For modern liquid glass design
Interactive simulation where colorful balls bounce around the canvas and react to mouse position. Click to add new balls.
A recursive tree structure that changes its angle based on mouse position.
A particle system where particles follow mouse movement. Click and drag to create more particles.
Animated wave pattern with colors that change based on position and time. Mouse position affects the frequency.
The project utilizes a modern "liquid glass" design aesthetic with:
- Semi-transparent elements
- Blur effects (backdrop-filter)
- Gradient backgrounds
- Smooth animations
- Responsive layout
- Dark mode support
Feel free to fork this repository and add your own p5.js sketches! Make sure to follow the same design patterns as the existing examples.