fast-mesh-wasm
    Preparing search index...

    Interface ImportedMesh

    An imported glTF mesh: one scene mesh per glTF (node, primitive). The node's world placement is baked into positions (world coordinates, like the exporters write with the default applyPlacement) and also returned as placement (column-major, like scene.matrix4).

    Only uncompressed buffers are read. KHR_draco_mesh_compression primitives throw (decode them with importGLTFAsync), as do sparse accessors, except a sparse TEXCOORD_0, which is skipped like any other unsupported UVs: see ImportedMesh.uvsSkipped. External (non-embedded) .bin buffers load through importGLTFAsync's resolveBuffer. Animations, skins, materials beyond per-vertex colors and TEXCOORD_1 and up are skipped: the documented subset.

    interface ImportedMesh {
        colors: Uint8Array<ArrayBufferLike> | null;
        indices: Uint32Array;
        name: string;
        placement: Float64Array;
        positions: Float64Array;
        uvs: Float32Array<ArrayBufferLike> | null;
        uvsSkipped?: string;
    }
    Index
    colors: Uint8Array<ArrayBufferLike> | null

    RGBA bytes per vertex from COLOR_0, or null without colors.

    indices: Uint32Array

    3 vertex ids per triangle.

    name: string

    The node name, else the mesh name, else "mesh" (deduplicated).

    placement: Float64Array

    The node's world matrix: 16 numbers, column-major.

    positions: Float64Array

    World positions: 3 f64 per vertex, node placements baked in.

    uvs: Float32Array<ArrayBufferLike> | null

    2 floats per vertex from TEXCOORD_0 (scene.addMesh's uvs), or null without UVs. In glTF's convention: v points down from the image's top.

    Read as glTF defines it: float as stored, and normalized u8/u16 mapped to [0, 1]. An asset declaring KHR_mesh_quantization may also use i8 and i16, normalized to [-1, 1], and any of the integer types without normalized, whose values stay as stored. Such values usually rely on a KHR_texture_transform on the material to scale them, which is not read.

    uvsSkipped?: string

    Why a present TEXCOORD_0 was left out, so uvs is null while the geometry still imports: a sparse accessor, or a component type glTF does not allow for it. Absent when nothing was skipped. Malformed UVs (a wrong count or accessor type, non-finite values) throw instead.