Log inGet started
World

Deadlight

Branchmain
Branchesmain
Commit3e9d3ad4e7

README.md

FilmDirector

The one component that makes DEADLIGHT play. It sits on the Director entity in scenes.main.

Every RENDERED frame while the film is playing it advances deadlight.film by exactly 1/24 s — which fires every registered slice's shot and tick handlers — and then places FilmCamera for that instant. Never wall time: a slow frame makes the film take longer in wall seconds without changing a single frame of it, which is what lets the recording phase run it twice and cut the same picture.

Framing is not its business. It reads deadlight.cut.shots, an array indexed by shot number holding the engine's cutscene shot fields minus dur, and merges each with the duration from Film.SHOTS. An anchor naming an entity nobody has spawned yet is substituted with its contracted fallback from Film.ANCHORS, so the whole 94 seconds plays end to end while four slices are still building the things it frames.

field
autoplaystart the film when the scene enters play
driveCamerawrite FilmCamera's pose and lens; turn off to fly the editor camera through a held moment

Methods take no self — call them with .:

local d = entity.find("Director").component.get("FilmDirector")
d.play()        -- from the top
d.hold(41.5)    -- seek there deterministically, place the camera, stop
d.status()