director
A module script.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2preseed/director.module — master clock and part sequencing for the demo. The scene entrypoint calls `start` in play mode and `tick(dt)` per frame. Parts are modules of the shape: { name = "lumen", duration = 25, shots = { … }, -- shots.module list, part-local coordinates build(ctx)?, -- spawn content (ids via ctx.track) enter(ctx)?, -- lighting + post grade update(ctx, t, dt)?, -- per-frame animation, t = part-local seconds exit(ctx)?, -- release non-entity resources fadeIn?, fadeOut?, fadeColor?, } Each part lives at its own world center (part i at x = i·500); ctx.at() converts part-local to world coordinates. Tracked entities are despawned on part exit; the fade pass covers every boundary.
drainCommands( ) → void
publishStatus( ) → void
debug( ) → void
setParts(list: ?) → void
| arg | type | description |
|---|---|---|
| list | ? |
total( ) → void
time( ) → void
timeline( ) → void
The part schedule as data — name, start time and duration per part (drives the transport remote and any other timeline UI).
partIndex( ) → void
held( ) → void
running( ) → void
Whether this scope's sequencer has been started. The clock is an upvalue, so every scope that requires this module holds its own; a scene script that finds this false is holding a sequencer nobody started and should start it rather than tick a stopped clock.
seek(t: ?) → void
Jump the master clock (authoring aid: preview a part without waiting).
| arg | type | description |
|---|---|---|
| t | ? |
hold(h: ?) → void
Freeze the master clock while ticks keep rendering (authoring aid).
| arg | type | description |
|---|---|---|
| h | ? |
rate(r: ?) → void
The clock's playback rate. 1 is real time, 0.25 slow motion, -1 reverse. Parts receive the signed dt, so a part that integrates runs backwards at a negative rate and a part that derives its state from `t` reverses exactly.
| arg | type | description |
|---|---|---|
| r | ? |
getRate( ) → void
makeCtx(i: ?, centerOverride: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| centerOverride | ? |
track(id: ?) → void
| arg | type | description |
|---|---|---|
| id | ? |
at(x: ?, y: ?, z: ?) → void
| arg | type | description |
|---|---|---|
| x | ? | |
| y | ? | |
| z | ? |
partCenter(i: ?) → void
The world area a part occupies: its own `center` if it declares one, else the column the running order puts it in (part i at x = i * 500).
| arg | type | description |
|---|---|---|
| i | ? |
centersDiffer(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
evictForeignPasses( ) → void
Remove every post pass that is neither the engine's nor the film's own. A part registers its passes in `enter` and removes them in `exit`, and for eleven parts running in sequence that is eleven chances for one missed removal to grade the rest of the film. It has already happened twice in this demo — a cloud composite from part 5 was still in the chain at part 12, and the finale's own tone curve was grading the opening title. So the boundary does not ask: it clears the chain down to the engine's passes, the glow and the fade, and says which pass had outlived its part.
teardown(i: ?, ctx: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| ctx | ? |
buildPart(i: ?, ctx: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| ctx | ? |
dropPrebuild( ) → void
Release a part that was built ahead of its boundary and is not going to be entered — the clock jumped somewhere else. `teardown` is the right release: it runs the part's own `exit` so a compute texture or a render target the build made goes with the entities, and the `exit` runs under pcall so a hook that assumes `enter` ran cannot strand the despawns behind it.
start(camId: ?) → void
| arg | type | description |
|---|---|---|
| camId | ? |
stop( ) → void
rebuild( ) → void
Rebuild the current part in place, leaving the clock where it is: tears the part down (exit hook + tracked despawns) and clears the index so the next tick runs `build` and `enter` again. This is what picks up an edit to a part module, and what clears the simulation state a backwards seek would otherwise leave behind.
restart( ) → void
Rebuild the current part AND return the clock to its first frame.
gotoPart(i: ?) → void
Jump to a part by 1-based index and play it from its first frame. A jump that lands inside the part already running tears that part down first, so the part is entered from a clean build rather than resumed mid-simulation.
| arg | type | description |
|---|---|---|
| i | ? |
tick(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
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.