Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / UiCanvasLike

Type Alias: UiCanvasLike ​

ts
type UiCanvasLike = {
  width: number;
  height: number;
  getContext: CanvasRenderingContext2D | null;
};

Defined in: systems/UIPanelSystem.ts:45

Structural canvas type so tests can inject a stub with no DOM.

Properties ​

PropertyTypeDefined in
widthnumbersystems/UIPanelSystem.ts:46
heightnumbersystems/UIPanelSystem.ts:47

Methods ​

getContext() ​

ts
getContext(kind): CanvasRenderingContext2D | null;

Defined in: systems/UIPanelSystem.ts:48

Parameters ​

ParameterType
kind"2d"

Returns ​

CanvasRenderingContext2D | null