Filum
Threads, cloth, and gravity - live.
What it is
Filum is a real-time cloth and thread simulation where draping fabric emerges from one tiny rule applied across a grid of connected sticks. It uses Verlet integration, where velocity is implied by the difference between current and previous position, combined with iterative distance-constraint relaxation to hold the cloth together. It is a from-scratch, dependency-light build with 6 tests on the pure physics that you can download and run locally.
Verlet integration (velocity = current − previous position) + distance-constraint relaxation; cloth emerges from one tiny rule applied to a grid of sticks. 6 tests on the pure physics.
What's inside
The full source, the tests, and CI. Open it, read it, change it. A zero-dependency core, free, in the MIT spirit.
Run it after unzip
pnpm install && pnpm dev