So my 3D model appears locally but when i deploy on vercel it isnt there and so I put the model in my public folder and i call it like this:
const loader = new GLTFLoader();
loader.load(
'/Room.glb',
(gltf) => {
modelLoaded.current = true; // Set the flag before adding the model
const model = gltf.scene;
model.scale.set(2, 2, 2);
scene.add(model);
},
undefined,
(error) => {
console.error('An error occurred while loading the GLB model:', error);
}
);
it doesnt load.
however when i do my [sitename].dev/Room.glb it works, what could be the issue???
#Model not appearing
2 messages · Page 1 of 1 (latest)