GameRunContext beta
Interface of @v12-engine/client
ts
export interface GameRunContextWhat a run's load is given: where the game is drawn, and what the run asks of the client it makes, as GameClientOptions takes it (assembleClient(prepared, { ...context.client, canvas, overlay, root, view }))
Members
canvas
ts
canvas: HTMLCanvasElement;The canvas the game's 3D picture is drawn on
client
ts
client: Pick<GameClientOptions, 'saves' | 'errorPolicy' | 'keepsMusic' | 'runtime'>;The run's saves and what the game comes to when its rules throw: for the client, as it is made
overlay
ts
overlay: HTMLCanvasElement;The canvas laid over it that the HUD's marks and the order lines are drawn on
progress
ts
progress?: (done: number, total: number) => void;How far the game is in being got ready, for the loading screen: its packs of content fetched (GameSource.progress)
root
ts
root: HTMLElement;The element the game fills; the pointer and the keys are read on it