Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

cutscene.stage

Everything a cutscene takes over while it runs, and gives back when it ends: the camera the viewer looks through, the letterbox and fade over the image, the subtitle line, and the player's controls.

acquire(opts) returns the stage; release() is the contract — it restores what it took even when the cutscene was skipped, errored, or the scene was unloaded under it. Whether a stage still stands is read from the scene rather than from the stage's own bookkeeping, so isHeld() answers false once the director entity is gone and the playback driving it ends on its next frame.

  • acquire(opts) -> Stage — takeCamera, letterbox, freezePlayer, hidePlayer, fadeColor, barColor, renderLayers
  • stage:setPose(eye, at, fov?) · setFade(amount, color?) · setBars(amount)
  • stage:setSubtitle(text?, speaker?) · camera() · isHeld() · release()
  • sweep() — remove what a playback that never ended left behind

A subtitle line is composed for the frame it is read in. It wraps at a measure of about forty characters, sits on a baseline a fixed way down the view so the rows a wrap adds go upward, and is drawn smaller on a frame too narrow to hold that measure at its nominal size — so a line of any length stays inside the picture at any aspect. stage:layoutSubtitle(aspect?) states the shape of that frame; omitted, it is the viewport's own, and the placement is redone whenever the lens or the viewport's shape changes.

The cutscene camera wins the viewport on priority, computed above every camera the scene already has. The player is frozen by disabling the components that declare an inputMap, so a world driving its player with its own controller is frozen too.