Skip to content

Gaurav00321/3D-ClothSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3D Cloth Simulation

Description

This project demonstrates a 3D cloth simulation using the Three.js library. The simulation replicates realistic cloth behavior such as deformation, stretching, and interaction with external forces. The project leverages physics-based principles, specifically Verlet integration, to model the behavior of cloth under gravity and user interaction.

Features

  • Realistic cloth deformation and stretching.
  • Gravity-based physics simulation for cloth dynamics.
  • Interactive mouse-driven influence on the cloth’s behavior.
  • Camera controls using OrbitControls for better user interaction.
  • Collision detection and response.
  • Handles window resizing to maintain 3D rendering consistency.

Prerequisites

Before running the project, ensure you have the following:

  • A modern web browser (Chrome, Firefox, etc.).
  • Basic understanding of HTML and JavaScript.
  • Internet connection to load the Three.js library from the CDN.

Getting Started

Local Setup:

Installation

  1. Clone the repository:
    git clone https://github.com/gaurav00321/cloth-simulation.git
    cd cloth-simulation
  2. Open the index.html file in any modern web browser.

Running the Project

  1. Simply open the index.html file in a web browser to view the 3D cloth simulation.
  2. Interact with the simulation using mouse movements to influence the cloth's behavior.

Usage

  • Mouse Interaction: Use your mouse to interact with the cloth, applying forces that influence its behavior.
  • Camera Controls: Use the mouse to rotate, zoom, and pan around the scene to explore the 3D cloth simulation.

Contributing

Contributions to this project are welcome! Feel free to fork the repository and submit a pull request if you have improvements or additional features.

License

This project is licensed under the MIT License.

About

The simulation replicates realistic cloth behavior such as deformation, stretching, and interaction with external forces. The project leverages physics-based principles, specifically Verlet integration, to model the behavior of cloth under gravity and user interaction.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages