fast-mesh-wasm
    Preparing search index...

    Function importGLTF

    • Reads a glTF 2.0 asset: a binary .glb, or a .gltf JSON whose buffers are embedded base64 data URIs. Every triangle primitive of every mesh instanced by the default scene becomes one mesh (node transforms composed down the hierarchy, so placements are preserved); other primitive modes throw, except TRIANGLE_STRIP and TRIANGLE_FAN, which are expanded.

      Parameters

      • bytes: ArrayBuffer | Uint8Array<ArrayBufferLike>

      Returns ImportedMesh[]

      When the container is malformed, a buffer is external (load it with importGLTFAsync and a resolveBuffer callback), a primitive is Draco-compressed (decode it with importGLTFAsync) or not a triangle mesh, or the file holds no triangle meshes.