trail
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
trail
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2The ski trail: a ribbon of its own, dense along the track and shaped across it, lifted onto the snow by a compute pass every frame.
retireHandover( ) → void
sweepEntity( ) → void
Sweep the ribbon entity by NAME. Editing this module resets `state`, so a teardown that only knew about the tracked entity would orphan the ribbon the previous copy spawned.
attach(opts: ?) → void
Stand a trail up. `segments` is how many frames of track the ring holds, `across` how many vertices span its cross-section.
| arg | type | description |
|---|---|---|
| opts | ? |
claim(name: string, len: number) → void
Editing this module resets `state`, so a copy that always allocated would leave the previous one's buffers with nothing holding them and hand the GPU a fresh pair every reload. The shader remembers what it made under each name, so a buffer of the right length is taken over and reused; only a changed length allocates, and the old one goes when it does.
| arg | type | description |
|---|---|---|
| name | string | |
| len | number |
flush( ) → void
Push any batched samples into the ring.
frame( ) → boolean
Shape the ribbon from the track so far. Run once per frame, after `append`.
active( ) → boolean
Whether a trail is currently standing.
written( ) → number
How many samples have been appended in total. The ring index of the newest sample is this minus one, taken modulo the ring's length.
track( ) → any
The ring the track is written into, so a second pass over other geometry reads the same samples this one shapes the rope from. The ground's trench and the rope beside it are one carve seen twice, and they stay one carve by sharing the track rather than each keeping its own copy of it.
ring( ) → number
How many samples the ring holds.
release(handover: boolean?) → void
Drop the trail's buffers and its mesh entity. `handover` means a rebuild is following, so the mesh is retired rather than destroyed and goes once its replacement is standing.
| arg | type | description |
|---|---|---|
| handover | boolean? |
Shape = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.