Log inGet started
World

The House Wears a Face

Branchmain
Branchesmain
Commit8e7f3baa4a

README.md

FilmClock

The film's own time, published once a frame to everything that moves, and the thing that fires the cues living inside a shot.

One of these exists, on the Stagecraft entity. It runs at executionOrder = -80, before every other driver in the demo, so that by the time anything reads the clock it is already this frame's.

What it does

Publishes the clock. It reads cutscene.status() and writes the second and the playing flag onto demo.stagecraft. Nothing in the demo may read wall time: two takes have to be the same film, and a driver that accumulates dt stands somewhere different at 0:88 depending on how loaded the machine was on the way there.

Holds the viewport. A cutscene builds a camera above every other camera's priority, but in edit mode the editor fly-camera keeps the screen anyway and the film runs where nobody can see it. So while the film plays this claims the viewport outright, and gives it straight back when the film stops.

Fires the in-shot cues. A cue declared with beats.extra(name, t) comes from a slice's register(), which runs during beats.bind(), and by then demo.film is already in the require cache and its cue list is fixed, so such a cue can never reach the cutscene's own list. This fires them instead: off the film clock, once per crossing, and re-armed whenever the clock runs backwards, so a seek back over a cue arms it again.

Rebinds a registry that emptied. A take can outlive the registrations it started with: a write to any file in the demo's module graph re-evaluates demo.beats and leaves the registry empty, and the film keeps running with every remaining cue firing into nothing. When that happens under a running film, this binds it again and says so in the log.

Fields

FieldMeaning
activeOff stops the clock being published and the cues being fired.

Methods

CallReturns
clock:clock(){ t, playing } as this component last read them.
clock:firedCues()The names of the in-shot cues that have fired in this take, sorted.