this file has to exist in your /public folder, and since it’s gltf and not glb you have to instruct the loader as to the whereabouts of the textures and bin files, but it’s probably better if you compress it to a single glb.
if this is react, you can use react-three-fiber, then you get the ability to do this: GitHub - pmndrs/gltfjsx: 🎮 Turns GLTFs into JSX components (lay out gltfs as declarative components whose contents you can alter). but even just loading and displaying a component without the scene graph is a matter of a few lines.
function Model() {
const { scene } = useGLTF(url)
return <primitive object={scene} />
}
<Canvas>
<Model />
</Canvas>
your original code said `loader.load(‘scene.gltf’, handle_load)``
but either way, your current code is wrong as well. './models/model3.glb' is not a valid path.
either put model3.glb into /public and do ‘/model.glb’
or import modelUrl from ‘./models/model3.glb’, and then do …
loader.load(modelUrl, handle_load);
Your example uses a fiber, I do not.
for react, you could use react-three-fiber + threejs, for vue, troisjs + threejs. there are no downsides, everything you do otherwise will cause problems because you’re mixing declarative systems with an imperative one which then has no integration and doesn’t adhere to view=fn(state). but that was just a suggestion ofc.