This project is a particle collision simulator that visualizes the motion and collisions of particles in a confined space. The particles change color based on their speed, creating a heat map effect. The average speed of the particles is also plotted over time using a real-time chart.
- Real-time particle simulation with collisions.
- Heat map effect: particle colors reflect their speed.
- Adjustable number of particles and particle size using sliders.
- Real-time chart displaying the average speed of particles over time.
-
Clone the repository:
git clone https://github.com/lainceline/js-collide.git cd js-collide -
Open
index.htmlin your web browser to view the simulation.
- Use the sliders to adjust the number of particles and their size.
- The simulation will update in real-time based on the slider values.
- Observe the particles colliding and changing color based on their speed.
- The average speed of the particles is displayed on a chart below the simulation.
- HTML5
- CSS3
- JavaScript (ES6)
- Chart.js (for the real-time chart)
Contributions are welcome! Please fork this repository and submit a pull request for any features, bug fixes, or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
- Chart.js library for the real-time chart visualization.