Export a ShapeMesh to a glTF 2.0 JSON string with an embedded base64 buffer.
The resulting string is a self-contained .gltf file that can be loaded directly by three.js, Babylon.js, or any glTF viewer.
.gltf
Triangulated mesh from meshShape().
meshShape()
Optional
Optional material assignments.
A JSON string representing the complete glTF document.
const mesh = meshShape(solid);const gltfJson = exportGltf(mesh); Copy
const mesh = meshShape(solid);const gltfJson = exportGltf(mesh);
exportGlb for the binary GLB variant.
Export a ShapeMesh to a glTF 2.0 JSON string with an embedded base64 buffer.
The resulting string is a self-contained
.gltffile that can be loaded directly by three.js, Babylon.js, or any glTF viewer.