SceneContext beta
Interface of @v12-engine/client/app
ts
export interface SceneContext<A extends object = {}> extends Omit<SceneOpenContext<A>, 'render' | 'hold'>What a game scene is loaded with (GameScene.load): what every scene is given (what it was opened with, the way to others, the app's scenes, its runtime and the builder of its worlds' navigations: as SceneOpenContext), and the canvases the game is drawn on
Members
canvas
ts
canvas: HTMLCanvasElement;The canvas the game's world is drawn on
client
ts
client: GameRunContext['client'];What the scene's run asks of the client it makes (its saves, what it comes to when its rules throw): for assembleClient, as it is ({ ...context.client, canvas, overlay, view })
overlay
ts
overlay: HTMLCanvasElement;The canvas drawn over the world's (the 2D layer of markers and effects)
progress
ts
progress?: GameRunContext['progress'];How far the game is in being got ready, for the loading screen (GameSource.progress)
root
ts
root: HTMLElement;The game's element, with the canvases in it