All experiments

Constraint simulation

Cloth workbench

Pin, pull, and drape fabric over objects. Compare material presets and export a frozen shape.

JavaScript · Three.js · Constraint simulation

View source on GitHub

Try it

All editing and processing stays in your browser.

Getting started

  1. Drag the cloth to grab a vertex; drag empty space to orbit.
  2. Enable Edit pins to toggle attachment points on the surface.
  3. Use fabric, wind, and pin controls to change the simulation.
  4. Pause to inspect a fold, or export its current geometry as OBJ.

Made with this tool

Examples captured from the running editor.

A coral woven cloth held by three gold attachment points and draping in front of a sphere and crate
Silk · three attachments · wind strength 3.4
A blue canvas sheet folded sideways by a pointer grab, revealing a solid sphere and crate behind it
Canvas · full top edge pinned · surface pulled sideways

Implementation and limits

Pin, pull and drape a woven sheet. Compare compliant silk with stiff canvas around solid collision objects, then export the simulated surface.

  • A bounded particle-grid simulation with sphere, box and floor contact.
  • No cloth self-collision, tearing, sewing patterns or full shell bending model.
  • Fast pulls are constrained at collision objects; very tight folds can still show triangle-level contact artifacts.

Explore the implementation, tests, and examples on GitHub