Skip to content

ViewOptions beta ​

Interface of @v12-engine/render

ts
export interface ViewOptions

How a side view is made (Renderer.view): what it shows, its size, its camera, its shadows and passes

Members ​

camera ​

ts
camera?: Partial<CameraState>;

Its camera at first, over the renderer's defaults: written in place after (SideView.camera)

canvas ​

ts
canvas?: HTMLCanvasElement | OffscreenCanvas;

A canvas of the page its picture is put on each time it is drawn

clear ​

ts
clear?: readonly number[];

What it is cleared to, r, g, b and a (0: see-through around what is drawn). Black and see-through where left out

height ​

ts
height?: number;

Its height in pixels: the canvas's own where one is given and this is not (256 else)

live ​

ts
live?: boolean;

Drawn with every frame of the renderer; when render is called else

name ​

ts
name?: string;

What it is called, in its targets' and tasks' labels

post ​

ts
post?: PictureSettings;

The passes after its own, with these settings (read each time it is drawn). None where left out: its colours as its materials give them

shadows ​

ts
shadows?: false | {
        size?: number;
    };

The sun's shadows in it: one map of its own, size texels a side (1024). None where left out

shows ​

ts
shows?: 'own' | 'world';

own (the default): batches made for it, under its own sun and sky. world: the main view's batches again from its camera, under the world's lights and terms

width ​

ts
width?: number;

Its size in pixels: the canvas's own where one is given and these are not (256 else)