Taos API Reference
    Preparing search index...

    Function buildClusters

    • Builds clusters (meshlets) from an interleaved vertex array + triangle indices.

      Pure CPU — no GPUDevice. awaits MeshoptClusterizer.ready internally, so it's safe to call before the wasm has finished loading.

      Parameters

      • vertexData: Float32Array

        Interleaved vertices laid out per VERTEX_ATTRIBUTES (position is the first 3 floats of each VERTEX_FLOATS-float vertex). Typically a Mesh created with keepData: true (its vertexData).

      • indexData: Uint32Array

        Triangle-list indices (length a multiple of 3).

      Returns Promise<ClusterData>

      The flat ClusterData ready to upload.