Taos API Reference
    Preparing search index...

    Interface GltfMeshData

    One renderable primitive parsed from a glTF mesh.

    Pairs a GPU-resident skinned mesh with the resolved PBR material.

    interface GltfMeshData {
        skinnedMesh: SkinnedMesh;
        material: Material;
        morphDeltas: GPUBuffer | null;
        morphTargetCount: number;
        vertexCount: number;
        gltfMeshIndex: number;
        variantMaterials?: Map<number, Material>;
        cpu?: {
            positions: Float32Array;
            normals: Float32Array;
            uvs: Float32Array;
            tangents: Float32Array;
            indices: Uint32Array;
        };
    }
    Index

    Properties

    skinnedMesh: SkinnedMesh
    material: Material
    morphDeltas: GPUBuffer | null

    Per-vertex morph-target deltas as a read-only storage buffer, or null when the primitive has no morph targets. Vertex-major vec4 rows: base = (vertexIndex × morphTargetCount + target) × 3, where row 0 = ΔPOSITION, row 1 = ΔNORMAL, row 2 = ΔTANGENT.xyz (zero-filled when a target lacks the attribute). Owned by the model; released in GltfModel.destroy.

    morphTargetCount: number

    Number of morph targets (0 = none); the vertex shader's loop bound.

    vertexCount: number

    Vertex count of this primitive (rows in morphDeltas).

    gltfMeshIndex: number

    Index into gltf.meshes this primitive came from — maps mesh→primitive run.

    variantMaterials?: Map<number, Material>

    KHR_materials_variants: variant index → the material to use for this primitive under that variant, or undefined when the primitive defines no variant mapping. Switch the active variant via GltfModel.setVariant (which reassigns GltfMeshData.material); unmapped variants fall back to the default.

    cpu?: {
        positions: Float32Array;
        normals: Float32Array;
        uvs: Float32Array;
        tangents: Float32Array;
        indices: Uint32Array;
    }

    Decoded CPU geometry (bind-pose, object space), retained only when GltfLoader.load is called with keepData: true. Lets callers build shadow proxies / merged meshes / bounds without re-parsing the GLB — and works uniformly for compressed geometry (Draco / meshopt / quantization), which the loader has already decoded. tangents are the authored or loader-computed vec4s; indices is the triangle list.