SideView beta
Interface of @v12-engine/render
export interface SideViewAnother view of things than the main one: its own camera, lights, batches and target, drawn when asked or with every frame
Members
camera
readonly camera: CameraState;Its camera, written in place
dispose
dispose(): void;Its batches taken apart (the main view's keep theirs), its targets and buffers freed
height
readonly height: number;Its height in pixels
live
live: boolean;Drawn with every frame of the renderer
name
readonly name: string;What it is called
picture
readonly picture: Picture;What it last drew, for a material's or a pass's bindings. Another one after resize
read
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
render(): void;Draws it once, now: its batches culled for its camera, its passes recorded and sent (with the frame, inside one)
resize
resize(width: number, height: number): Promise<void>;Its targets made again at another size (its canvas's with them)
sky
readonly sky: SkyState;Its own sky's light; the world's where it shows the world
stats
readonly stats: FrameStats;What its last frame drew
sun
readonly sun: SunState;Its own; the world's where it shows the world
width
readonly width: number;Its width in pixels