Taos API Reference
    Preparing search index...

    Interface InstancedBatch

    A group of identical-geometry instances drawn in ONE drawIndexed call via GPU instancing (the geometry shader's HAS_INSTANCING variant). All instances share mesh + material; each instance's transform comes from instanceData, indexed by @builtin(instance_index).

    instanceData is a flat array of count records, each INSTANCE_DATA_FLOATS floats: model mat4 (16) + normalMatrix mat4 (16) + colorTint vec4 (4). It is re-uploaded every frame (cheap — a few hundred KB for a whole level), so the caller can move instances freely. Use this for static geometry with heavy mesh reuse (e.g. a level's props/structure) where per-node DrawItems would otherwise be thousands of draw calls.

    interface InstancedBatch {
        mesh: Mesh;
        material: Material;
        count: number;
        instanceData: Float32Array;
        doubleSided?: boolean;
    }
    Index

    Properties

    mesh: Mesh
    material: Material
    count: number

    Number of instances (= instanceData.length / INSTANCE_DATA_FLOATS).

    instanceData: Float32Array

    Packed per-instance records; see the interface doc for the layout.

    doubleSided?: boolean

    Render without back-face culling (glTF doubleSided). Defaults to false.