Taos API Reference
    Preparing search index...

    Interface StaticPrimitiveGeometry

    Device-free packed geometry for one static primitive, in glb mesh→primitive flat order (the same order GltfLoader.loadStaticFromArrayBuffer walks).

    vertices is already in the engine's 48-byte interleaved layout — exactly what Mesh.fromData uploads — so the whole decode (GLB parse, Draco/meshopt decompression, tangent solve, vertex pack) can run OFF the main thread, e.g. in a Worker, and the result handed back to loadStaticFromArrayBuffer via opts.packedGeometry to skip the decode on the main thread (GPU upload + material loading still happen there, since they need the device). The three typed arrays are transferable, so the worker can post them with zero copies.

    interface StaticPrimitiveGeometry {
        vertices: Float32Array;
        indices: Uint32Array;
        colors: Float32Array<ArrayBufferLike> | null;
        uv1: Float32Array<ArrayBufferLike> | null;
        vertexCount: number;
        center: [number, number, number];
        featureIds: Uint32Array<ArrayBufferLike> | null;
    }
    Index

    Properties

    vertices: Float32Array

    Interleaved 48-byte vertex data (position·3 + normal·3 + uv·2 + tangent·4).

    indices: Uint32Array

    Triangle-list indices.

    colors: Float32Array<ArrayBufferLike> | null

    Optional per-vertex linear RGBA colors (slot-1 buffer), or null.

    uv1: Float32Array<ArrayBufferLike> | null

    Optional second UV set (glTF TEXCOORD_1; vec2 per vertex, slot-2 buffer), or null.

    vertexCount: number
    center: [number, number, number]

    RTC (relative-to-center) offset removed from the packed positions when decoded with recenter, so the stored f32 positions stay small and the f32 model-matrix multiply stays precise. The caller must add this back into the (f64) model matrix to restore the world placement (see buildDrawables). [0,0,0] when the primitive was not recentered — placement is then unchanged.

    featureIds: Uint32Array<ArrayBufferLike> | null

    Per-vertex feature id (for picking), aligned to vertices — null unless the decode was asked to extract _FEATURE_ID_0/_BATCHID. Transferable.