Moments
The camera paths of *First Light: Resown*, as data. `game.stage.Stage` keeps a clock; this module answers what the camera should be doing at a time in it.
Moments
The camera paths of First Light: Resown, as data. game.stage.Stage keeps a clock; this module answers what the camera should be doing at a time in it.
A path is a list of keys — { t, cam = {x,y,z}, look = {x,y,z}, fov } — and Moments.sample(keys, t) walks it, easing each segment with a smoothstep and holding the first and last key outside the list's span. Holding the last key is what makes the two endings end: run the clock past a path and the frame stays where the path left it.
local Moments = require("game.stage.Moments")
local keys = Moments.opening(cam:followPose())
local f = Moments.sample(keys, 3.2)
-- f.camX f.camY f.camZ f.lookX f.lookY f.lookZ f.fov
| builder | shape |
|---|---|
Moments.opening(pose) | 6.5 s. Valley → over the terraces → a crane above the shrine → the follow. The last key is pose, the live follow's own solution, so the hand-off has no step in it. |
Moments.beat(pose, t) | 2.6 s, sampled per frame against the LIVE follow rather than baked into keys, so the Facer keeps moving under it. Moments.beatEnvelope(t) is the rise/hold/fall it carries; Moments.BEAT_LEN is its length. |
Moments.won(pose) | 7.0 s. Off the hill and up, ending on the whole hillside. |
Moments.lost(pose) | 4.2 s. Down to the shrine and in on it. |
Every position is stated through game.FL — FL.rowZ, FL.groundY, FL.TERRACE_DEPTH, FL.shrineCenter — rather than as numbers copied out of the hillside once, so the paths follow the geometry when it changes: a different STEP_Y and the crane still clears the shrine.
Moments.shrineEye() is the point on the lantern-house a shot should look at, and Moments.dawnAim() is where the first-light beat aims — far enough down the hill that the valley's far edge sits mid-frame with sky above it, and paired with the beat's pull-back so the Facer stays in the bottom of the picture instead of tilting out of it.
Scoped to this part · feeds back into the world's score.