Skip to content

TestRendererOptions beta ​

Interface of @v12-engine/render/testing

ts
export interface TestRendererOptions

How a renderer for tests is made: the real one's options, the canvas's size, and a stand-in for the card

Members ​

card ​

ts
card?: true | {
        readonly device: object;
    };

A stand-in for the card, for code that reads what it is (its adapter) or waits on its loss (device.lost): a device that never says lost, of no adapter, with true; the caller's own object as it is. None: card throws

cascades ​

ts
cascades?: number;

How many cascades the sun's shadows are in, 2 or 3 (3)

clearColour ​

ts
clearColour?: readonly [number, number, number];

What the picture is cleared to, each part 0 to 1 (black)

cull ​

ts
cull?: boolean;

Whether copies out of the view are left out (true), as the real one's option

height ​

ts
height?: number;

The canvas's height in pixels (720)

map ​

ts
map?: {
        width: number;
        depth: number;
    };

The map's size in cells, as the real one's option (1 by 1)

shadowCache ​

ts
shadowCache?: boolean;

Whether a cascade keeps the depth of what stands still apart and draws it again only when that changed (the real one's option, true): cascadesNow says what each cascade drew

shadowMapSize ​

ts
shadowMapSize?: number;

A cascade's side in texels (2048)

width ​

ts
width?: number;

The canvas's size in pixels (1280 by 720)