Batch beta
Interface of @v12-engine/render
export interface BatchOne geometry with one material at many places
Members
animated
animated(): void;Its vertices moved though no copy did (a pose changed, which its shader reads elsewhere than in a copy): the cascades it is in are drawn again and the velocity's layer has it this frame; no copy is culled or sent again
count
readonly count: number;How many copies there are now, the first of matrices (touch changes it)
dispose
dispose(): void;Taken out of every pass, its copies' buffers freed
geometry
readonly geometry: Geometry;What it draws at each copy
glow
glow(colour: readonly number[] | undefined): void;Has the batch glow in a colour (what its material shines with, times how much: the client's colorOf), or no longer (undefined, or black)
limit
limit(count: number): void;A batch with a box draws its first count copies at most from now on: fewer of a chunk far off, in the order its owner laid them
material
readonly material: Material;What it is drawn with now (use)
matrices
readonly matrices: Float32Array;Every copy's matrix, 16 floats each. Written in place by who owns the batch; touch says so
outline
outline(copy: number, style: Outline | undefined, thing?: number): void;Outlines a copy in a style (Renderer.outlines.style) as part of a thing (the copies of one number are outlined as one shape; things that touch each keep an edge), or no longer (undefined). Marked by its place among the batch's copies: who moves a copy into another's place marks it again
previous
readonly previous: Float32Array | undefined;Of a batch with a velocity: every copy's matrix as the frame before had it, kept by the renderer (copied from matrices after each frame it was touched in). Who moves a copy into another's place moves its 16 floats here too
range
range(first: number, count: number): void;Draws a run of its geometry's indices in place of all of them, from now on: a lighter shape made of the same vertices (three levels of a tuft in one geometry)
touch
touch(count?: number, from?: number, to?: number): void;The copies were written (all, or count changed within the capacity): each pass keeps its own again. from and to: only the copies from the one to before the other moved (the rest stand as they did)
touchExtra
touchExtra(from?: number, to?: number): void;What the copies carry beside their matrices was written, from to before to, and nothing else: the copies each pass keeps are sent again as they are, none culled again
use
use(material: Material): void;Drawn with another material from now on: one of the same kind that reads the same of a copy and does not blend (the variant that may leave pixels out, while it must). The copies and their buffers stay; a material's draws are made the first time it is used and kept