This is a cloth simulation project built using p5.js library. The simulation is based on a mass-spring system, where each point in the cloth is represented as a particle with mass, connected to its neighboring particles with springs.
To run the simulation, simply open the index.html
file in your browser. You can also modify the simulation parameters in the index.js
and cloth.js
file to customize the behavior of the cloth.
The following parameters can be modified in the index.js
file:
w
andh
: width and height of canvas.yCount
andxCount
: the number of rows and columns in the cloth grid.
This project is licensed under the MIT License - see the LICENSE file for details.