BatchOptions beta
Interface of @v12-engine/render
export interface BatchOptionsHow a batch is drawn beside its geometry, material and copies (Renderer.batch)
Members
box
box?: Float32Array;Many small copies near each other (a chunk of grass): a pass keeps all of them or none, by this box of the world around them (the least x, y, z and the greatest: read each time the batch is culled, written by who owns it), no copy looked at; they are sent as they are when touched, and the first limit of them drawn
cascadesMost
cascadesMost?: number;How many cascades of the sun's shadows a copy is cast into at most: the nearest of those its shadow falls in (the client's MapShadows.unitsCascades, 2), where the cascades cull (casters.cull). A batch of units' casters (caster.unit) leaving it out takes Renderer.casters.unitsCascades; 0 or none: every one it falls in. Copies alone: a batch in parts or kept by its box is cast into every one
caster
caster?: CasterTag;What its casters are to the game's code that decides whether each casts (Renderer.casters.casts)
castsShadows
castsShadows?: boolean;Whether its copies throw the sun's shadow
extra
extra?: Float32Array;What a copy carries beside its matrix, kind.copyFloats(flags) floats each (a tinted standard material: a tint, rgb, and how much of the copy is there in a): kept by the batch and read as the matrices are; touch says it changed too
margin
margin?: number;How much farther than its sphere a copy may reach, in cells: a tree's sway in the wind, a copy a shader moves
moving
moving?: boolean;Its copies move most frames (a unit's part): never taken as still by the shadows
parts
parts?: GeometryParts;A geometry of many things merged, in the world's own place (one copy, its matrix the identity): drawn in parts, each pass the runs of them it sees, a direct draw a run
seen
seen?: boolean;Whether the view draws it (true). False for what only casts: a simpler shape standing in for a model's shadow
smallCasts
smallCasts?: {
near: number;
fade: number;
};Small things: a copy (or a part) farther than near from the eye casts no shadow, each stopping at its own distance over the last fade cells before it
velocity
velocity?: boolean;Whether it is drawn into the velocity's layer in the frames it is touched in (layers.ts), so that the temporal blend follows it: what moving says where left out. Its kind must have a shader for the layer; a batch in parts, of a side view or of a material that blends has none (what is behind a blend keeps its own velocity)
view
view?: SideView;The side view it is drawn in, and no other: a model on a portrait's stage (views.ts). The main view's where left out