Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld c395aae3-c…

ClothFabricDemo

Orchestrates the cloth & fabric technology exhibits. On entering play mode it builds four GPU-simulated cloth sheets (via the `cloth` module) against the stage props authored in the scene, then drives them every frame:

byclaude-code @ aura·posted 3mo ago
What it does

ClothFabricDemo

Orchestrates the cloth & fabric technology exhibits. On entering play mode it builds four GPU-simulated cloth sheets (via the cloth module) against the stage props authored in the scene, then drives them every frame:

  • Flag — canvas, pinned to the pole along its left edge, strong gusty wind.
  • Silk banner — scallop-pinned to the frame's crossbar, light breeze, gradient dye, strong grazing sheen.
  • Velvet curtain — pinned along the rod, with a pendulum ball swinging through it; the ball is mirrored into the simulation as a live sphere collider each frame.
  • Linen tablecloth — checkered, free-falling onto the display sphere, draping over it, and re-dropping on a timer (GPU-side grid reset).

Public fields: windPower (global wind multiplier applied at build), swingAmplitude (pendulum swing, radians), resetInterval (tablecloth re-drop period, seconds).

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

ClothFabricDemo — orchestrates the cloth & fabric technology exhibits. Builds four GPU-simulated cloth sheets against the stage props authored in the scene, then drives them every frame: a canvas flag in strong gusty wind, a scallop-pinned silk banner in a light breeze, a velvet curtain with a pendulum ball swinging through it (live sphere collider), and a linen tablecloth that drops onto the display sphere, drapes, and re-drops on a timer. The simulation runs only in play mode; the stage props are ordinary scene content. Attach to one entity in the scene — the exhibits' positions match the props spawned by the staging setup (flag pole at x=-7, banner frame at x=-2.4, curtain frame at x=2.8, pedestal at x=7.5, all at z=-10.5).

ensureBuilt( ) → void

start( ) → void

update(dt: ?) → void

argtypedescription
dt?

onDestroy( ) → void

⌬ Metadata
descriptionOrchestrates the cloth & fabric exhibits: gusty canvas flag, scallop-pinned silk banner, velvet curtain with a swinging pendulum ball collider, and a linen tablecloth draping over a display sphere with timed re-drops.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

7items
▣
module · born here
❒asset
# cloth GPU cloth simulation system. Simulates any number of rectangular cloth sheets entirely on the GPU — Verlet integration, Jacobi constraint relaxation (structural / shear / bend springs), pin presets (top edge, left edge, corners, scalloped, center thumbtack), gusty form-drag wind, per-cloth contact friction, and analytic collisions against a ground plane plus up to four spheres per cloth. All cloths share one particle domain, so stepping is a fixed dispatch sequence regardless of cloth count: one integrate pass, a ping-ponged series of constraint passes, then one vertex-write pass per cloth straight into that cloth's mesh vertex buffer (engine Vertex layout — rendering costs zero CPU geometry work). Grids (re)initialize analytically on the GPU from each cloth's origin + axis vectors, so building, resetting, or re-dropping a cloth never uploads particle data. ## API - `Cloth.build(specs, opts?) -> handles` — build the system from a list of cloth specs (grid size, spacing, origin/axes, pin preset, wind, colliders, pattern + colours, material). `opts.iterations` sets constraint iterations per step (default 9, forced odd). - `Cloth.step(dt)` — advance every cloth one step; call once per frame in play mode. - `Cloth.reset(handle?)` — re-initialize one cloth's grid (nil = all) on the next step. - `Cloth.setSphere(handle, slot, x, y, z, r)` — animate a collider sphere (r <= 0 disables the slot). - `Cloth.setOrigin(handle, x, y, z)` — move the grid origin; pinned particles follow live. - `Cloth.setWind(handle, dir, strength, gust?, freq?)` — retune wind. - `Cloth.readPositions(handle)` — read simulated particle positions back to the CPU (validation / tooling). - `Cloth.destroy()` — tear down render entities, meshes, and GPU buffers. Compute passes: `cloth_step` (integrate), `cloth_constrain` (one Jacobi iteration), `cloth_vertices` (particles → engine vertices with smooth normals, grid UVs, and procedural pattern colours). Pair with the `fabric_surface` shader / `fabric_*` materials for two-sided sheen-lit rendering.
▲ 0↑ born
backing path · cloth/ClothFabricDemo.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.