CutscenePreviewController
@zylem/game-lib / cinematics / CutscenePreviewController
Class: CutscenePreviewController
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:13
Editor preview of a cutscene inside the running game: answers the bridge's
cutscene:* commands with a player bound to the current stage and reports
progress back. Owned by ZylemGame; Director mode drives it.
Constructors
Constructor
new CutscenePreviewController(
getStage,publish,hostOptions?,publishView?):CutscenePreviewController
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:22
Parameters
getStage
() => ZylemStage | null
publish
(status) => void
hostOptions?
StageCutsceneHostOptions = \{\}
publishView?
(view) => void
Returns
CutscenePreviewController
Accessors
active
Get Signature
get active():
boolean
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:29
Returns
boolean
Methods
cameraPose()
cameraPose():
Omit<CameraPosePayload,"requestId"> |null
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:139
The live camera as position + look-at, for "capture from viewport".
Returns
Omit<CameraPosePayload, "requestId"> | null
frame()
frame():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:105
Once per rendered frame while a cutscene is loaded: publishes the camera's projection and the canvas box when either changed, so the editor's overlays track the view without polling.
Returns
void
load()
load(
payload):void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:45
Parameters
payload
Returns
void
pause()
pause():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:79
Returns
void
play()
play(
from?):void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:75
Parameters
from?
number
Returns
void
releaseStage()
releaseStage():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:92
Drops the player because its stage is going away; a held load survives for the next stage.
Returns
void
seek()
seek(
time):void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:87
Parameters
time
number
Returns
void
stageReady()
stageReady():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:38
The game reports itself running before its first stage finishes loading, so an editor that loads a cutscene straight away would find no stage. The game calls this once a stage is up; a held load runs then.
Returns
void
stop()
stop():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:83
Returns
void
unload()
unload():
void
Defined in: packages/game-lib/src/lib/cinematics/preview-controller.ts:133
Returns
void