roost
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
roost
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->TODO: describe this component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2hernsew.roost — the five birds on the stage-posts, and what they do. One of these stands on the `Hernsews` anchor. It builds a hernsew per station out of `hernsew.bird`, gives each one a voice out of `hernsew.calls`, and runs the small state machine that is the whole of their acting: standing, watching you come, hailing, shrieking, and standing aside. The birds are the loudest thing in the frame and the game is named after them, so nothing here is allowed to be still: a bird that holds one pose reads as a prop the moment the camera rests on it. Every bird breathes, its neck sways out of phase with its neighbours, and it turns its head to follow the Lingster up the causeway. That idle layer is added ON TOP of whatever pose the state machine asked for, so it never stops. What it publishes: `HAILED(stationId)` when the Lingster comes inside `Rules.HAIL_RADIUS` of the next unanswered post. What it listens for: `ANSWERED` (a wrong answer is shrieked at) and `GATE_OPENED` (the bird stands aside).
shared( ) → void
Shared state. `game.rules` is the one table every slice already requires, and requiring it twice returns the SAME table — so a `state` map hung off it is a blackboard all eight slices can read without any of them reaching into another's entities. Created here if nobody has yet.
clips( ) → void
Voices. Each clip gets its OWN child entity with its OWN Audio component, so a wing opening while the bird is still calling does not cut the call — one component reassigned between clips can only ever play one at a time. The four clips, resolved under LITERAL identities — a computed asset name cannot be pinned, and content that cannot be pinned cannot be published. A clip that failed to bake comes back nil and the bird is quiet on that one voice rather than erroring on every frame.
voiceNode(parentId: string, name: string, clip: any, vol: number, dist: number) → string
| arg | type | description |
|---|---|---|
| parentId | string | |
| name | string | |
| clip | any | |
| vol | number | |
| dist | number |
speak(id: string?, pitch: number) → void
| arg | type | description |
|---|---|---|
| id | string? | |
| pitch | number |
perchHeight( ) → number
Building.
buildFlight( ) → void
goto_(p: Perch, poseName: string, rate: number, state: string) → void
Transitions.
| arg | type | description |
|---|---|---|
| p | Perch | |
| poseName | string | |
| rate | number | |
| state | string |
findPerch(stationId: string) → Perch
| arg | type | description |
|---|---|---|
| stationId | string |
lingsterPosition( ) → void
Where the Lingster is. The flock slice owns LINGSTER_Z; until it publishes one, the local player's own body answers the same question, so the birds react whether or not that slice has landed.
awake( ) → void
Lifecycle.
onDestroy( ) → void
currentStationIndex( ) → number
The tick. Which station is still unanswered. The run slice owns it; before that slice lands, every post is live and the nearest one hails.
tick(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
editorUpdate(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
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.