▣
module · drop-in viewer
film
The shared clock, the storm and the slice registry for Sexton's Bell — the 95-second, 14-shot demo in this world. Every build slice requires this module; it is the only place the film's time, weather, palette and storm table are written down.
by·posted 1mo ago
What it does
film
The shared clock, the storm and the slice registry for Sexton's Bell — the 95-second, 14-shot demo in this world. Every build slice requires this module; it is the only place the film's time, weather, palette and storm table are written down.
Exports
film.FPS/film.DT/film.DURATION/film.FRAMES— 24, 1/24, 95.0, 2280.film.now()/film.frame()/film.isPlaying()— where the film is.film.seekTo(t)/film.seekToFrame(n)/film.reset()/film.play()/film.pause()/film.run()/film.step()— the transport.step()is called once per rendered frame by theFilmDirectorcomponent and by nothing else.film.register(slice)/film.buildAll()/film.built(name)/film.missing()/film.slices()— the registry.film.SHOTS/film.shotAt(t)— the fourteen shots and their boundaries.film.STROKES/film.strobe(t)/film.thunderAt(i)/film.gap(i)/film.strokeAt(t)— the storm.strobe(t)is the single lightning envelope everything reads; nobody writes their own.film.rain(t)/film.wind(t)/film.windDir(t)/film.wetness(t)/film.gas(t)/film.lantern(t)— the shared weather and practical ramps.film.rand(seed, i)/film.noise(seed, x)— the only randomness a slice may use.film.PAL/film.NAMES/film.PLACES— palette, shared entity names, world anchors.
Usage
local film = require("demo.film")
local function update(t)
local level, stroke = film.strobe(t)
-- ... a pure function of t, and of nothing else
end
Notes
- Every slice's
update(t)is a pure function of absolute film time. No accumulation, nodt, nomath.random, no wall clock. That purity is what makesseekTo(t)reproduce a frame exactly, which is what lets the film be recorded twice for the same result. - Guard a slice's
build()on its sentinel entity being alive, never on a module-local flag: module state survives an edit/play flip and entities do not. - The full design is
/zero/source/design/spec.md.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.