Skip to content

shInNei/Cloth-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloth Simulation 3D

Description

Cloth Simulation 3D is a real-time web-based interactive 3D cloth physics simulation. Built using WebGL and Three.js, it simulates cloth dynamics using Verlet integration and distance constraints. Users can interact with the cloth by dragging an obstacle sphere and manipulating wind forces directly on screen.

Tech Stack

  • Core: HTML5, JavaScript (ES6+), CSS3
  • 3D Engine: Three.js
  • Physics Engine: Custom Verlet Integration Cloth Simulator
  • Build Tool: Vite
  • Deployment: GitHub Actions & GitHub Pages

Features

  • Real-time cloth physics simulation powered by CPU Verlet integration.
  • Multiple pinning modes: Top 2 Corners, Top Edge, 4 Corners, and Free Hanging.
  • Interactive obstacle collision with a movable 3D sphere.
  • Mouse-driven wind interaction using right-click drag.
  • Customizable physical parameters including Gravity, Air Damping, and Solver Iterations.
  • Rendering options for Solid Fabric texture and Wireframe mesh mode.
  • Directional lighting and real-time shadow mapping.

Installation and Local Setup

  1. Clone the repository: git clone https://github.com/shInNei/Cloth-Simulation.git

  2. Install dependencies: npm install

  3. Run the local development server: npm run dev

  4. Open your browser and navigate to http://localhost:5173

Contact Information

About

Real-time 3D cloth physics simulation built with WebGL and Three.js

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages