film
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
film
<!-- 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/v2Stained Glass Day — the film's shared spine. Every build slice reads its constants from here and registers itself here. Nothing else decides what time it is, where the room's walls are, or what colour the sun is at 14:20. local Film = require("demo.film") Film.register("hall", { build = function() ... end, -- make the entities, once tick = function(t, dt, shot) ... end, -- advance to film time t reset = function() ... end, -- put state back to t = 0 }) The clock is FIXED: one step is exactly 1/24 s, advanced once per RENDERED frame by the FilmDirector component. The film is therefore identical whether the engine draws it at 60 fps or at 4 fps, and `av.record { cadence = "frame" }` records it frame-exact.
shotAt(t: number) → number
Which shot covers film time `t` (1-based index; clamped at both ends).
| arg | type | description |
|---|---|---|
| t | number |
shotPhase(i: number, t: number) → number
0 at the start of shot `i`, 1 at its end.
| arg | type | description |
|---|---|---|
| i | number | |
| t | number |
hour(t: number) → number
Wall-clock hour of the day at film time `t`.
| arg | type | description |
|---|---|---|
| t | number |
lerp(a: number, b: number, k: number) → number
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| k | number |
lerp3(a: { number }, b: { number }, k: number) → void
| arg | type | description |
|---|---|---|
| a | { number } | |
| b | { number } | |
| k | number |
sun(t: number) → void
The sun at film time `t`. `elevation` and `azimuth` are degrees; azimuth is compass-style, 90 = due east, 180 = due south, 270 = due west. The window faces due south, so direct sun enters the room only while azimuth is roughly 96..264.
| arg | type | description |
|---|---|---|
| t | number |
sunDirection(t: number) → void
The sun's unit direction of TRAVEL (the direction light moves), world axes.
| arg | type | description |
|---|---|---|
| t | number |
skyColour(t: number) → void
The sky's own colour at film time `t` — the room's whole light before the sun reaches the window and after it leaves.
| arg | type | description |
|---|---|---|
| t | number |
air(t: number) → number
The arc What is different at the end: the AIR. Shot 1 is a dead-clear room where you can see where the light LANDS but not where it travels. By Act III the heated mosaic has lifted thirty years of settled dust and the beam is a solid object. Shot 18 has no beam left and an atmosphere that is still full. 0 at first light, 1 by mid-afternoon, and it never comes back down.
| arg | type | description |
|---|---|---|
| t | number |
swept(t: number) → number
How much of the swept arc on the floor has been cleaned of dust, 0..1.
| arg | type | description |
|---|---|---|
| t | number |
register(name: string, slice: { build: (() → void
Register a build slice. Safe to call again — a re-register replaces the entry, which is what a hot-reloaded slice module wants.
| arg | type | description |
|---|---|---|
| name | string | |
| slice | { build: (( |
slice(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
buildAll( ) → void
Build every registered slice, in registration order. A slice's `build` must be safe to call twice: guard it on LIVENESS — does the sentinel entity exist right now — never on a module-level flag, because module state survives an edit/play flip and entities do not.
reset( ) → void
Put every slice back at film time zero.
tickAll(dt: number) → void
Drive every slice to film time `M.t`.
| arg | type | description |
|---|---|---|
| dt | number |
step( ) → number
Advance the film by exactly one frame. Called once per RENDERED frame by the FilmDirector component while `M.playing`. This is the only thing in the world allowed to move `M.t` forward.
seekTo(t: number) → void
Reset and step to film time `t`. Deterministic: the same `t` gives the same world however you got there.
| arg | type | description |
|---|---|---|
| t | number |
play( ) → void
Play from the top. The FilmDirector does the stepping.
stop( ) → void
shotMid(n: number) → void
Jump the camera to the middle of a shot and hold there — the reviewing call.
| arg | type | description |
|---|---|---|
| n | number |
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.