API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classRenderBatch

@codexo/exojs / rendering / stable

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.

3
props
3
methods
0
events
Import
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.

Constructors 1
new(geometry: Geometry, material: MeshMaterial | null): RenderBatch
Methods 3
add(transform: Matrix, tint: Color | null): this
clear(): this
destroy(): void
Properties 3
geometry: Geometry
material: MeshMaterial | null
count: number
Source