Taos API Reference
    Preparing search index...

    Interface ClusterData

    CPU-side result of buildClusters — the flat arrays a vertex-pulling cluster shader needs, plus bookkeeping. Upload with ClusteredMesh.

    interface ClusterData {
        clusterCount: number;
        vertexData: Float32Array;
        meshletVertices: Uint32Array;
        localIndices: Uint32Array;
        descriptors: Float32Array;
        totalTriangles: number;
        bounds: {
            centerX: number;
            centerY: number;
            centerZ: number;
            radius: number;
        };
    }

    Hierarchy (View Summary)

    Index

    Properties

    clusterCount: number

    Number of clusters (meshlets).

    vertexData: Float32Array

    Interleaved vertex pool, VERTEX_STRIDE per vertex — the original mesh vertices, shared by all clusters. Cluster local indices resolve into this via meshletVertices.

    meshletVertices: Uint32Array

    Cluster-local → global vertex index, indexed by cluster.vertexOffset + localVertex. The value indexes a vertex (not a float) in vertexData.

    localIndices: Uint32Array

    Triangle corner → cluster-local vertex index (0..vertexCount), indexed by cluster.triangleOffset + tri*3 + corner. Widened from meshopt's u8 table to u32 because WGSL storage buffers can't index sub-word.

    descriptors: Float32Array

    Packed cluster descriptors, CLUSTER_DESC_FLOATS floats each.

    totalTriangles: number

    Total triangles across all clusters (== input triangle count).

    bounds: { centerX: number; centerY: number; centerZ: number; radius: number }

    Overall local-space bounding sphere of the whole mesh.