stage
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
stage
<!-- 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/v2game.ui.stage — the 3D preview stage behind the title / Ossuary / death / win screens: a candle-lit crypt alcove far from the arena (x=500, y=-200) with a hook and chain, the player's skeleton hanging from it, and its own camera that holds the viewport only while a menu phase is up. The skeleton is built by the player slice through R.call("buildSkeletonVisual", parentId, build). If that provider is missing or returns nil, the stage shows a single glowing socket ring on the hook (never a primitive skeleton of its own). Rebuilds are DEBOUNCED: S.markDirty() only flags the stage; S.tick() does at most one rebuild per frame. Only one stage ever exists: S.create() clears any UIPreviewStage left behind by a hot reload.
loadAssets( ) → void
part(parent: any, name: string, mesh: any, mat: any, pos: { number }, scale: { number }, tint: { number }?, rot: { number }?) → void
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| mesh | any | |
| mat | any | |
| pos | { number } | |
| scale | { number } | |
| tint | { number }? | |
| rot | { number }? |
clearOldStages( ) → void
exists( ) → boolean
create(parent: any) → void
Spawn the alcove, the chain and the preview camera under `parent` (once).
| arg | type | description |
|---|---|---|
| parent | any |
light(name: string, p: { number }, col: { number }, intensity: number, radius: number) → void
| arg | type | description |
|---|---|---|
| name | string | |
| p | { number } | |
| col | { number } | |
| intensity | number | |
| radius | number |
markDirty( ) → void
Flag the skeleton for a rebuild; the rebuild happens in the next tick (at most once a frame).
rebuildNow(build: { any }) → void
| arg | type | description |
|---|---|---|
| build | { any } |
usingProvider( ) → boolean
rebuildCount( ) → number
applyActive( ) → void
setActive(on: boolean) → void
Whether the preview camera holds the viewport (re-asserted every tick).
| arg | type | description |
|---|---|---|
| on | boolean |
isActive( ) → boolean
tick(dt: number, build: { any }) → void
Per-frame: keep the camera state, do the (single) pending rebuild, sway the skeleton.
| arg | type | description |
|---|---|---|
| dt | number | |
| build | { any } |
cameraId( ) → string
destroy( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
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.