Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 4e897ccd-6…

air

The "air" slice of THE HOUSE WEARS A FACE — everything between the camera and a surface. The storm and its four strikes, rain outside and rain getting in from shot 6, the volumetric shafts and the dust turning in them, moths around the one live bulb, the plaster the ceiling throw…

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

air

The "air" slice of THE HOUSE WEARS A FACE — everything between the camera and a surface. The storm and its four strikes, rain outside and rain getting in from shot 6, the volumetric shafts and the dust turning in them, moths around the one live bulb, the plaster the ceiling throws when the chandelier goes, the water column of shot 12, height fog, and the wetness ramp that turns the ballroom floor from grey dust into a black mirror.

Shots served: 1, 2, 3, 6, 11, 12.

Exports

  • M.content(root) — builds the slice under the film's root as an Air group.
  • M.register() — binds the beat handlers, and declares the four lightning cues b01_flash (4.5 s), b02_flash (10.2 s), b06_flash (39.4 s) and b11_flash (74.8 s) via beats.extra, so the film and the mix can key off the strikes.
  • M.reset() — re-asserts every emitter's spec, puts the film clock back to zero, re-seats the moth swarm and stops the two one-shot bursts.
  • M.applySpecs() — makes the live air match what the module authors, and returns the names it had to rebuild. Empty on a scene that kept its spec.
  • M.specHolds(emitter, data) — whether one live emitter already carries the spec authored for it.
  • M.status() — the film second the air is drawn at and every emitter's live rate. The one call to make when the air looks wrong.

How it is driven

One component owns the whole slice: demo.air.AirClock, on the Air group. Everything is a pure function of the film clock, so two takes of the same second draw the same air — the lightning envelope, the fog and wetness ramps, which rain is falling and where, and the drift of the dust inside the shafts.

The film clock is the CUTSCENE's own second. While demo.film is playing the air is drawn at cutscene.status().time, in edit and in play alike, so the storm cannot drift away from the cut by a frame. Between takes the clock is held at the component's previewT (35.0, the shot-6 station) so another slice capturing the room sees a settled second, and AirClock:seek(t) moves that. Every shot beat seeks, so a capture taken between takes settles at the shot the beat names.

The emitters are a table, and it is applied twice

content() builds the twelve particle emitters from one EMITTERS table rather than from twelve inline calls, and applySpecs() walks the same table against the live scene.

It has to be applied twice because a built scene restores its entities from the scene record, and a ParticleEmitter's record carries only its flat public fields. The nested spec keys the component documents — shape, lifetime, speed, size, squash, wind, color, transparency — do not survive the round trip, and every emitter in a loaded world comes back a POINT emitter at the schema's own defaults: lifetime 1.0–1.5 s, speed 2–4 m/s, no wind, no squash. That is why the rain read as one searing vertical bar over the facade instead of as rain — nine thousand drops falling from a single point. Filed as OrigoZero/zero#12887.

applySpecs() compares every field the round trip is known to drop and rebuilds the component where they differ, which is the one route that re-runs the spec normalisation. It is idempotent: a second pass on a healthy scene rebuilds nothing.

What it owns in the scene

EntityWhat it is
Air_AtmosphereHeightFog + VolumetricLighting — the scene's wet night air
Air_Lightninga distant light: the four strikes, driven by an envelope
Air_RainCurtainthe exterior curtain; rides above the film's own camera station while the film is still outdoors
Air_RainNearthe sheet at the lens — few, large, fast streaks three metres ahead of the camera, which is what makes the exteriors read as heavy rain
Air_Eave1..3shot 2's three separate falls off the eaves
Air_RainHole / Air_HoleSplashthe rope of rainwater through the ceiling hole, and what it throws back off the floor
Air_WaterColumn / Air_ColumnSplashshot 12: the rope becomes a column
Air_MotesHall / Air_MotesBallroomdust turning in the sodium shaft, and the ballroom's own air
Air_Plaster / Air_GlassDustshot 11's one-shot bursts, replayed by the b11_impact cue — the ceiling gives when the chandelier LANDS, 1.75 s after the cable parts, not when it starts to fall
Air_ShaftFanlight / Air_ShaftHole / Air_ShaftColumnthe three volumetric shafts
Air_Moths + 16 childrenthe swarm around the one live bulb

Notes

  • The shafts are raymarched, not billboards. Each Air_Shaft* entity wears a cube that is only a bounding proxy; demo.air.lightshaft marches a tapered cone inside it between the camera and whatever the frame already drew, so a shaft thickens through its middle, thins to nothing at its rim and stops at the floor it lands on. Draw them additive, front-culled, depth_compare: always.
  • A shaft is driven on per-instance lane 0, not through its material. AssetRef:setProperty in edit mode writes through to the asset on disk, so a per-frame drive rewrites mat.yaml four times a second and replaces the authored resting values with animation frames (OrigoZero/zero#11264). Lane 0 carries x = the clock the dust drifts on, y = added to the material's resting brightness.
  • Additive particles in a dark room saturate very fast. Rain at a high rate and full brightness stops reading as water and becomes a solid white bar. What reads as falling water is a LOW rate of short, half-transparent streaks with gaps between them; the gaps are the effect.
  • Height fog lifts every black in the frame, and outdoors it also draws an arc. Fog is applied to the sky as well as to the house, and the sky is a dome: at the density that reads as wet night air across eighteen metres of ballroom, the exteriors came back with a hard-edged band over the gate and a black floor of 26 code values. The exterior number is therefore a tenth of the interior one — 0.0013 until t = 14, ramping to 0.0148 by t = 74 — and that ramp is the whole of Act I's legibility. VolumetricLighting.lightScale is well under 1 for the same reason: the look slice runs its practicals very hot, and scattering all of that turns every doorway into a glowing rectangle.
  • The raymarch budget is the browser's. 24 volumetric steps and 4 shadow taps over 70 m; the demo's medium is thin (0.011–0.030), which is the regime where a step count shows least. Peak particle count is the exteriors — RainCurtain 7000 + RainNear 1600 + three Eaves 1400 = 12,800 live at t = 0–12, falling to about 3,900 indoors and 7,500 across the fall.
  • The wetness ramp is the builtin weather system (@builtin::systems.weather.weather), which is scene-wide: wetness 0.26 → 0.94 and shelter 0.96 → 0.16 across the film, so what the ceiling hole leaves exposed stops being sheltered as the rain gets in.

Interface

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

conforms to

zero/source-extract/v2

THE HOUSE WEARS A FACE — slice "air": everything between the camera and a surface. The storm and its four strikes, rain outside and rain getting in, the volumetric shafts and the dust turning in them, moths, the plaster the ceiling throws, the water column, height fog, and the wetness ramp that turns the ballroom floor from dust into a mirror. Shots served: 1, 2, 3, 6, 11, 12. Everything here is a pure function of the film clock, which `AirClock` owns and reads off the cutscene. Beats fire the two one-shot bursts and resync the clock; nothing else in this slice is a switch. After editing this file run `tools.use("scene", "reload")`.

ModelHeightFogVolumetricLightingLight

child(parent: any, name: string, p: { number }) → any

argtypedescription
parentany
namestring
p{ number }

shaft(parent: any, name: string, centre: { number }, size: { number }, material: string) → any

A shaft: a bounding proxy wearing a raymarched-cone material. The mesh is never seen — the shader marches the cone the material describes.

argtypedescription
parentany
namestring
centre{ number }
size{ number }
materialstring

content(root: ?) → void

Build this slice's entities under the film's root.

argtypedescription
root?

pair(v: any, fallback: number) → void

argtypedescription
vany
fallbacknumber

specHolds(em: any, data: any) → boolean

Whether a live emitter is already carrying the spec this module authors for it. Every field a scene round trip is known to drop is compared, so a partial match reads as a mismatch rather than as a pass.

argtypedescription
emany
dataany

near(a: number, b: number) → boolean

argtypedescription
anumber
bnumber

applySpecs( ) → void

Make the live air match what this module authors, whether the scene was just built from this file or restored from its record. Returns the names it had to rebuild, which is empty on a scene that kept its spec.

clockComponent( ) → any

swarmComponent( ) → any

playBurst(name: string) → void

argtypedescription
namestring

stopBurst(name: string) → void

argtypedescription
namestring

register( ) → void

Declare this slice's beat handlers.

reset( ) → void

Return this slice to its shot-1 state.

status( ) → void

What the air is doing right now, for anything checking this slice.

Sub-parts

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

19items
▣
module · born here
❒asset
# constants The single place the film's numbers live: the palette, the layout grid, the lens table, the two camera stations that must never drift apart, the fourteen shots, and the two moments several slices have to agree on to the tenth of a second. Every slice reads it as `K`: ```lua local K = require("demo.constants") ``` Nothing in the demo hardcodes one of these numbers twice. A value written down in two files is a value that will be changed in one of them. ## Exports | Name | What it is | |------|------------| | `TITLE` | The cutscene's name. `cutscene.status().name` is compared against it to tell this film from any other. | | `DURATION` | 100.0 s. `film.module` refuses to load if its camera moves no longer sum to it. | | `C` | The palette, as linear colour. Bone, red, yellow, violet, mildew, the eye glow, sodium, lightning. | | `L` | The layout grid: every room's extents, the ceiling hole, the proscenium, the two clerestory discs, the chandelier's rest and nose, and the envelope nothing may be authored outside. | | `FOV` | The three lenses: `wide` 72 (21 mm), `base` 62 (24 mm), `long` 24 (85 mm). | | `STATION` | The eye, look point and lens shot 6 and shot 14 share. **To the millimetre**, because that match cut is the film, and both shots read this rather than repeating it. | | `IMPACT` | 70.75, the film second the chandelier lands. The sound, the light drop, the plaster burst and the props slice's own landing check all read it. | | `DRESSING` | The dressing-room bulb run: how many, when the first dies, how long the run takes, and the order they go in. | | `bulbDeath(i)` | The second bulb `i` goes dark, from `DRESSING`. | | `SHOTS` | The fourteen shots: cumulative time, duration, beat, lens, camera path, look point, and what MOVES in it that is not the camera. Shot 8 also carries its 85 mm `insert`. | | `shotAt(t)` | The shot whose window holds `t`. | | `shot(n)` | A shot by number. | ## The two things not to move **`STATION`.** Shot 6 and shot 14 are the same frame of two different rooms, and that is the whole film. Both read `STATION`, so they cannot drift apart; moving it moves both, which is the only correct way to move it. It stands at (0, 1.35, −16.0), in the ENTRY HALL, looking through the hall's doorway into the ballroom, so the doorway is the frame the face is composed inside, and shot 3 has to stop well short of it. **The `t` column.** It is cumulative and authoritative: the film's cues key off it, and every slice's schedule is written against it. A shot re-timed here is a shot re-timed everywhere, which is the point.
▲ 0↑ born
▣
module · born here
❒asset
# beats The demo's beat registry and its slice bootstrap. A beat is a SWITCH the film throws at a moment; everything continuous is a component's `update(dt)`. ## The vocabulary Fourteen fixed names, one per shot, fired at that shot's start: ``` b01_gate b02_facade b03_hall_push b04_musicbox b05_mirrors b06_ballroom b07_floor b08_dressing b09_stage b10_masks b11_chandelier_fall b12_aftermath b13_reform b14_face_closes ``` Several slices may register the same beat; every handler runs, in slice order: hall, props, air, look, stagecraft. A handler that raises is logged and the rest still run, so one broken slice does not take the film with it. A cue that lives inside a shot is declared with `extra(name, t)` and named `bNN_<something>`, so its shot is readable from its name. Those are fired by the `FilmClock` component off the film clock, and re-armed when the clock is seeked backwards. Every declared extra should have a handler: one that does not warns on every take and describes something the film does not do. ## Exports | Name | What it does | |------|--------------| | `SLICES` | The five build slices, in the order their handlers run. | | `BEATS` | The fourteen shot beats. | | `on(name, fn)` | Register a handler. | | `extra(name, t)` | Declare a cue inside a shot. | | `extras()` | Every declared extra, sorted by time. | | `fire(name, t)` | Run every handler for a beat, returning how many ran. An unregistered beat warns and continues. | | `registered()` | Which beats currently have handlers, and how many each. | | `slices()` | Every slice module that loads. A missing slice is skipped, not fatal. | | `build(root)` | Run every slice's `content(root)`. Called from the scene build. | | `bind()` | Clear every registration and re-run each slice's `register()`. Idempotent; call it before any take so a hot-reloaded slice is bound again. | | `reset()` | Run every slice's `reset()`. Returns every slice to its shot-1 state. | ## Why bind() is called before every take A slice's handlers live in this module's own state, and a write to any file in the demo's require graph re-evaluates it and empties the registry. On a world several people are authoring into at once that happens constantly. `play.luau` binds before every take for that reason, and `FilmClock` binds again if the registry empties under a running film.
▲ 0↑ born
◇
component · born here
❒asset
# AirClock The one thing that drives the air in *The House Wears a Face*. One instance, on the `Air` group, execution order −105 so it settles the weather before anything reads it. Everything the air slice does over the hundred seconds is a pure function of one number, the second of the film: the storm's four strikes, the height fog thickening, the three raymarched shafts brightening and dimming, which rain is falling and at what rate, the water column, the dust, and the wetness ramp that turns the ballroom floor from grey dust into a black mirror. Because it is a pure function of `t`, two takes of the same second draw the same air. ## Where the second comes from The cutscene. While `demo.film` is playing, the air is drawn at `cutscene.status().time` — not at a clock of its own, and not at accumulated `dt`. The storm therefore cannot drift away from the cut by a frame however the frame rate moves, and it is the same number whether the film is running in edit or in play. When no film is playing, the air is held at `previewT`, so a slice capturing the room between takes sees a settled second rather than a film running away from it. A second clock, `driftT`, keeps running there and is what the shaft dust turns on, so the air is still alive to author against. ## Fields | field | what it is | |---|---| | `previewT` | the second the air is held at while no film is playing | | `gain` | master gain on everything this drives — `0` takes the weather off without deleting it, which is how a slice checks its own work against a clean frame | ## Methods - `ref:seek(t)` — move the air to an explicit second and settle it there. Every shot beat calls this, so a capture taken between takes settles at the shot the beat names. During a take the film's own clock wins on the next frame. - `ref:filmTime()` — the second the air is currently drawn at. During a take this equals `cutscene.status().time` exactly. - `ref:lightningAt(t)` — how bright the lightning is at a given second, for anything that has to agree with it: a thunder cue, an exposure allowed to be late. - `ref:resetFilm()` — back to zero, forgetting every pushed value so the next frame states the whole air again. `demo.air.reset()` calls it before a take. ## The strikes Four, at 4.5, 10.2, 39.4 and 74.8 seconds, at powers 1.00 / 0.72 / 0.55 / 0.85. Each is three flashes inside a third of a second over an afterglow the cloud keeps for about a second and a half. The pulse WIDTHS are read off the delivered film rather than off the curve: a film frame is a fortieth of a second, so a pulse narrower than that is a strike a frame either lands on or misses entirely, and the take that misses it has no lightning in it at all. The flash drives a `distant` light — a parallel row beside the scene's own sun, so it lands on everything at once without displacing the sun — and it also raises the fog's inscatter and the volumetric medium's sun term, which is what puts the strike in the air rather than only on the surfaces. ## Two hazards this component is shaped around **The shafts are driven through a per-instance lane, not through their material.** `AssetRef:setProperty` in edit mode writes through to the asset on disk, coalescing to one asset write every 250 ms, so driving three shafts from the film clock that way rewrites three `mat.yaml` files four times a second and leaves their authored resting values at the mercy of whichever frame closed the window. `renderer.instanceData.set(entity, 0, flow, gain, 0, 0)` reaches the same shader and touches no asset. Lane 0 is `x` = the clock the dust drifts on, `y` = added to the material's resting brightness. **`demo.constants` is resolved lazily.** It is a world module, and at engine boot this component's chunk can run before that module is resolvable: `require` raises once, the chunk dies with it, and the component then has no hooks at all for the rest of the session while the log carries a single line from start-up. ## Hooks `update` runs in edit mode as well as in play (OrigoZero/zero#2743 — the documented "play mode only" contract does not hold) and `editorUpdate` runs only in edit, so each hook takes the mode that is not the other's. That is one tick a frame whichever way that behaviour lands, and no wall clock is read to decide it.
▲ 0↑ born
◇
component · born here
❒asset
# MothSwarm <!-- 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.
▲ 0↑ born

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.