stage
local Stage = require("game.staging.stage")
The one surface through which anything moves the camera of First Light:
Sabaean Madcaps. ChaseCam is the only thing that writes a pose onto the
camera entity; everything else states its intent here and ChaseCam reads it on
the frame it poses.
Intents
Stage.play(shot)— a scripted move owns the camera forshot.durseconds. ChaseCam drawsshot.frame(u, follow)every frame and skips the follow.followis the pose the gameplay camera would take, so a move can land exactly on it and hand over with no step in the picture.shot.onDonefires on the frame it ends.Stage.kick(metres, seconds?)— an impulse that shakes whatever pose is being drawn and decays away.Stage.widen(degrees, seconds?)— the lens opens and eases back.
Stage.staged(), Stage.stagedName(), Stage.progress() and Stage.cancel()
read and drop what is running. Stage.advance(dt, follow) is the per-frame
read, called by ChaseCam and by nothing else.
Framing
Stage.aspect() is the live viewport's width / height.
Stage.solveDistance(fovDeg, frameW, frameH, aspect?) answers the distance at
which frameW metres fit across the frame and frameH metres fit up
it — the larger of the two solutions, so neither axis can crop. This is what
makes the same shot read on a phone held either way, a laptop and a television.
Interpolation
smooth easeIn easeOut lerp lerpVec path vec clamp01.
Stage.path(keys, u) walks a list of key positions as one continuous move,
each leg eased so the camera settles at every key rather than cornering
through it.
Scoped to this part · feeds back into the world's score.