brepjs API Reference
    Preparing search index...

    Function exportGlb

    • Export a ShapeMesh to a .glb binary (ArrayBuffer).

      GLB packs the JSON header and binary buffer into a single file, which is more efficient for network transfer than base64-encoded glTF.

      Parameters

      Returns ArrayBuffer

      An ArrayBuffer containing the complete GLB binary.

      const mesh = meshShape(solid);
      const glbBuffer = exportGlb(mesh);
      const blob = new Blob([glbBuffer], { type: 'model/gltf-binary' });

      exportGltf for the JSON variant.