# demo.props.dressing
The dressing room — shot 8. Build-time geometry plus the two constants the tick
sound is made of; the motion lives in `PropsDressing`.
## The layout
The glass lies in the world's YZ plane at `M.MIRROR_X` = 39.88, centred on
`M.CENTRE`, half `M.HALF_W` along Z and `M.HALF_H` along Y. The wall itself is
at x = 40, so the room is entered from the west and the mirror faces the camera
down the whole of shot 8.
`M.bulbRing()` is the thirty bulb positions in the order they ring the frame:
along the top from the far side, down the near side, back along the bottom, up
the far side. `PropsDressing` does not read that order — it assigns each bulb to
the mirror practical it stands under — but the ring is what makes the geometry
an unbroken frame.
## What it places
The foxed glass and its backing; the surround and its bulbs; eight greasepaint
handprints built at nothing, each a palm, a heel, four splayed fingers and a
thumb, half of them mirrored, so the bloom in shot 8 grows real hands rather
than blobs; the table and its pots, brushes and jar; the three-legged stool; and
a costume rail set back so the room has depth behind the mirror.
## The tick
`M.TICK_CLIP` names the clip a filament sounds when it lets go and
`M.TICK_AUDIO` is the source that sounds it — spatial, twelve metres of reach,
autoplay off, one-shot only. The source is added to `P_DressingMirror`, because
the glass is the thing that ticks.
# 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.
# demo.props.kit
The props slice's shared floor: the material names, the two spawn helpers, the
deterministic noise, the film clock and the easings. Everything in the slice
requires it; it requires nothing.
## Materials
`M.MAT` maps a kit name (`brass`, `crystal`, `velvet`, `bulbLive`, ...) to the
`Prop*` material it stands for, and `M.mat(name)` resolves it. Nothing in the
slice names a colour twice: a prop names a kit material and the look of that
material is decided in one file.
## Spawning
`M.group(parent, name, p)` for an empty named child, `M.part(parent, name, opt)`
for a drawn primitive — `mesh`, `mat`, `p`, `s`, `r`, `visible`, `shadows`.
`M.rot(yaw, pitch, roll)` and `M.axis(ax, ay, az, angle)` return quaternions as
4-arrays, which is the shape `localRotation` takes.
## Deterministic noise
Nothing in this slice calls `math.random`: two takes of the film must be the
same film, so every scatter is a pure function of an index and a fixed salt.
`M.hash(i, salt)` in [0, 1), `M.span(i, salt, lo, hi)` mapped into a range, and
`M.stream(seed)` for a walker that advances the salt for you.
## The film clock
`M.now()` is the cutscene's time while a cutscene plays, and a free-running
accumulator otherwise, so a prop still moves for a capture taken by hand between
takes. `M.tick(dt)` advances that fallback and is called once a frame by
`PropsDriver` alone; `M.rewind()` puts it back to zero.
`M.since(t0)` is the seconds of film since a beat fired at `t0`, or -1 for "that
beat has not happened". A sequence keyed on it survives the clock being SEEKED:
land behind the beat and the sequence reads as un-fired again, which is what the
shot before it should look like, rather than freezing whatever pose the sequence
held when the clock jumped.
## Easing
`M.sat`, `M.ramp(t, a, b)`, `M.outCubic`, `M.inCubic`, `M.lerp3` — small, named
and shared, so a beat's ramp reads the same everywhere in the slice.
# PropFilamentTick
The sound one filament makes when it lets go — shot 8, eight times, once per
mirror practical, from an `Audio` source standing on the glass.
52 ms, mono, 48 kHz, stored as PCM. Three layers, all damped hard: a broadband
crack at the head gone in three milliseconds, the filament ringing at 2.64 and
3.91 kHz, and a low thock of the glass around it at 410 Hz. It is normalised to
about −1.5 dBFS and fades over its last two milliseconds, so it ends on silence
and the mix decides the level rather than the synthesis.
Synthesised rather than recorded: it is arithmetic and the engine's own codec,
so it costs nothing to carry and it is the same sound on every platform.
Stored `codec = "pcm"` because the head of this clip is the whole sound and Opus
loses the first few milliseconds of a payload. It is a one-shot and is never
looped, so the loop-seam warning the bake logs — the step from its attack back
to its tail — describes the one thing about it that is deliberate.