anvil
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
anvil
<!-- 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/v2strict
mintBands( ) → void
on(event: string, fn: (any) → void
| arg | type | description |
|---|---|---|
| event | string | |
| fn | (any |
off(handle: any) → void
| arg | type | description |
|---|---|---|
| handle | any |
emit(event: string, payload: any) → void
| arg | type | description |
|---|---|---|
| event | string | |
| payload | any |
designHalfHeight( ) → number
THE TALL FRAME IS THE GAME, so the camera is fit VERTICALLY: it always shows exactly `designHalfHeight` world units of shaft above and below the aim point, whatever the window is. At portrait that makes the playfield (x ∈ [-9, 9]) exactly the width of the screen. On a wider window it shows MORE STORM at the sides — never bars, never filler; the shaft's own art runs out to the edge, and the HUD columns hug the playfield, not the window. Fitting horizontally instead would crush the vertical extent on a landscape monitor and destroy the tate framing, which is the one thing this game cannot lose.
cameraDistance(_aspect: number, fovDeg: number) → number
| arg | type | description |
|---|---|---|
| _aspect | number | |
| fovDeg | number |
halfHeight(_aspect: number?) → number
Visible half-height in world units — constant by construction.
| arg | type | description |
|---|---|---|
| _aspect | number? |
visibleHalfWidth(aspect: number?) → number
How much lateral world the window actually shows. Equals FIELD.halfWidth at portrait and more than it on a wider window; the VFX slice sizes the cloud walls against this so nothing ever runs out of scenery at the edge.
| arg | type | description |
|---|---|---|
| aspect | number? |
aspect( ) → number
The live viewport aspect (width/height). Portrait is < 1.
fitCamera(cam: any, fovDeg: number?, aimY: number?) → number
Stand the camera at the one station where the shaft touches both screen edges exactly, aimed straight down +Z at the playfield. Call it every frame — the window can be resized, and the framing must never letterbox or leave dead width at the sides. `cam` is the camera ENTITY. Returns the distance it used.
| arg | type | description |
|---|---|---|
| cam | any | |
| fovDeg | number? | |
| aimY | number? |
clampX(x: number) → number
| arg | type | description |
|---|---|---|
| x | number |
clampY(y: number) → number
| arg | type | description |
|---|---|---|
| y | number |
lane(t: number) → number
A lateral position as -1..1 across the shaft. Useful for spawn lanes.
| arg | type | description |
|---|---|---|
| t | number |
offscreen(y: number) → boolean
| arg | type | description |
|---|---|---|
| y | number |
verifyBands( ) → boolean
The band table is the one piece of `K` that is read by identity as well as by value: `state.band` is a row out of it, and every screen and every escalation reads that row. This restates the rows from `BAND_SPEC` whenever a slot has drifted off its declared floor, so a band lookup answers from the spec no matter what happened to the table between loads.
bandFor(altitude: number) → void
| arg | type | description |
|---|---|---|
| altitude | number |
progress( ) → number
0..1 across the whole climb.
flash( ) → number
How lit the shaft is right now, 0..1 — the value the VFX, the sky and the HUD all read so a strike lights everything at once.
sight( ) → number
Effective visibility after weather AND the blinding half of a strike.
applyDamage(amount: number) → boolean
Damage the runner. Flight owns hull, so flight calls this; everyone else emits "hit" and lets flight decide.
| arg | type | description |
|---|---|---|
| amount | number |
addHeat( ) → boolean
cool(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
resetRun( ) → void
Wipe the blackboard for a fresh run. The director calls this; nobody else.
setPhase(next: string) → void
| arg | type | description |
|---|---|---|
| next | string |
register(name: string, sys: System) → void
| arg | type | description |
|---|---|---|
| name | string | |
| sys | System |
ordered( ) → void
altitude(m: number) → string
| arg | type | description |
|---|---|---|
| m | number |
percent(t: number) → string
| arg | type | description |
|---|---|---|
| t | number |
score(n: number) → string
| arg | type | description |
|---|---|---|
| n | number |
System = {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.