I have created a simple model. Also converted that into gltf/glb. That model is showing up on babylon and as well as on three js. But whenever I am trying to import into my html file, error is showing up like,
"GLTFLoader.js:149 SyntaxError: Unexpected token < in JSON at position 0"
Note that, I am using Parcel Bundler for bundling.
const loader = new GLTFLoader();
loader.load("model.glb", function (gltf) {
car = gltf.scene.children[0];
car.scale.set(0.5, 0.5, 0.5);
scene.add(gltf.scene);
animate();
});
loader instance is successfully loaded. But the load method is not working. Please help me out.