Skip to content

Overlay beta ​

Class of @v12-engine/client/common

ts
export declare class Overlay

2D layer on top of the 3D view for things that should stay crisp and pixel sized: bars and the selection box.

Members ​

constructor ​

ts
constructor(canvas: HTMLCanvasElement);

Constructs a new instance of the Overlay class

context2d ​

ts
get context2d(): CanvasRenderingContext2D;

The context, for what draws on it besides: a system of plates of the game's own

drawWheel ​

ts
drawWheel(state: PingWheelState, look: PingWheelLook): void;

The wheel of pings on the canvas (PingWheelLook.render: 'canvas'): the ring, each kind's circle in its colour with its picture or mark, the picked one grown and named in the middle, those on their cooldown dimmed

measure ​

ts
measure(font: string, text: string): number;

How wide a text is in a font, in CSS pixels: measured once for each

plateSprites ​

ts
plateSprites: boolean;

Whether the plates' words and circles, and whole plates that stay the same, are copied from pictures kept of them: yes; no draws each shape anew, as it was

resize ​

ts
resize(width: number, height: number): void;

Sizes the canvas to width by height CSS pixels, scaled to the device pixel ratio so the drawing stays sharp