Skip to content

SideView beta ​

Interface of @v12-engine/render

ts
export interface SideView

Another view of things than the main one: its own camera, lights, batches and target, drawn when asked or with every frame

Members ​

camera ​

ts
readonly camera: CameraState;

Its camera, written in place

dispose ​

ts
dispose(): void;

Its batches taken apart (the main view's keep theirs), its targets and buffers freed

height ​

ts
readonly height: number;

Its height in pixels

live ​

ts
live: boolean;

Drawn with every frame of the renderer

name ​

ts
readonly name: string;

What it is called

picture ​

ts
readonly picture: Picture;

What it last drew, for a material's or a pass's bindings. Another one after resize

read ​

ts
read(into?: Uint8ClampedArray): Promise<Uint8ClampedArray>;

The pixels of what it last drew: four bytes each (r, g, b, a as the target holds them), the top row first. Into into where given (its width by its height by 4 bytes)

render ​

ts
render(): void;

Draws it once, now: its batches culled for its camera, its passes recorded and sent (with the frame, inside one)

resize ​

ts
resize(width: number, height: number): Promise<void>;

Its targets made again at another size (its canvas's with them)

sky ​

ts
readonly sky: SkyState;

Its own sky's light; the world's where it shows the world

stats ​

ts
readonly stats: FrameStats;

What its last frame drew

sun ​

ts
readonly sun: SunState;

Its own; the world's where it shows the world

width ​

ts
readonly width: number;

Its width in pixels