A 2D grid-based sand and water particle simulator.
index.html
- The main HTML file that includes the p5.js library and the main script file. Run this file to start the program.
sketch.js
- The main file where the screen is draw and the game loop exists.
Sand.js
- The class for the sand particles (includes the update and draw functions)
Water.js
- The class for the water particles (includes the update and draw functions)
Wall.js
- The class for the wall particles (includes the draw function)
-
Sand particles
- Draw sand particles
- Create sand particles on click
- Update sand particles
- Collision checks
- With sand
- With water
- With walls
- Duplicate check
-
Water particles
- Draw water particles
- Create water particles on click
- Update water particles
- Collision checks
- With water
- With sand
- With walls
- Duplicate check
-
Wall particles/blocks
- Draw wall particles
- Create wall particles on click
- Duplicate check