API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRenderBatch
Explicit instanced draw submission: **one** Geometry + MeshMaterial drawn **once** with **N** per-instance `(transform, tint)` pairs - the general form of the engine's mesh-instancing model, surfaced for data-driven rendering (thousands of tiles, bullets, grass blades, procedural items as a single draw). Build it up with add, hand it to RenderingContext.drawBatch, and clear it to reuse the same instance across frames without reallocating - the per-instance transform/tint storage grows on demand and is retained across `clear()`, so a steady-state batch allocates nothing. Each add **copies** the transform and tint into internal storage, so the caller may mutate or reuse the passed `Matrix`/`Color` immediately afterwards without affecting the batch. This is the explicit instanced submission path - distinct from the internal automatic sprite batcher: every instance shares the one geometry and material, and the whole batch is a single instanced draw call.
import { RenderBatch } from '@codexo/exojs'Explicit instanced draw submission: **one** Geometry + MeshMaterial drawn **once** with **N** per-instance `(transform, tint)` pairs - the general form of the engine's mesh-instancing model, surfaced for data-driven rendering (thousands of tiles, bullets, grass blades, procedural items as a single draw).
Build it up with add, hand it to RenderingContext.drawBatch, and clear it to reuse the same instance across frames without reallocating - the per-instance transform/tint storage grows on demand and is retained across `clear()`, so a steady-state batch allocates nothing.
Each add **copies** the transform and tint into internal storage, so the caller may mutate or reuse the passed `Matrix`/`Color` immediately afterwards without affecting the batch.
This is the explicit instanced submission path - distinct from the internal automatic sprite batcher: every instance shares the one geometry and material, and the whole batch is a single instanced draw call.
new(geometry: GeometryNon-renderable geometry data object used by advanced rendering paths. Geometry owns only vertex/index data and its layout metadata; it is not a scene node, has…, material: AnyMeshMaterialA mesh material of any uniform schema - what a consumer that only needs to draw with it should accept, since the bare class describes the untyped path. | null, options: RenderBatchOptions): RenderBatchadd(transform: MatrixMutable 3×3 row-major affine transformation matrix used throughout the rendering and physics pipeline. Layout (row, column): ``` | a b x | | c d y | | e f z |…, tint: Color32-bit RGBA color value with channel-wise accessors. Red, green, and blue are integers in 0..255; alpha is a float in 0..1. Out-of-range values are saturated o… | null, data: Readonly<Record<string, InstanceAttributeValue>> | null): thisclear(): thisdestroy(): voidcount: number