I am trying to make preformance better by using InstancedMesh, and I am following the example:
But my files are glb, glTF files, not buffergeomery JSONs like in the example. My question is how do I “convert” or use the glb files in InstancedMesh?
The instancing / scatter example (source code) might help. GLTFLoader returns a scene graph that might contain multiple meshes. Each of those meshes will already have a BufferGeometry attached to it. If there’s just on mesh then things are pretty simple, if there’s more than one you’ll need multiple InstancedMesh objects with appropriate offsets.