I am working on a project using Three.js in Gridsome, but I am facing difficulties importing .glb files (3D models) with GLTFLoader. While Gridsome recognizes img (png/jpg) or .js files stored in src/assets
, it does not seem to support glb files.
This is the hierarchy of my files:
https://i.sstatic.net/nRNnG.png
This is the function I use for importing:
this.loader.load('../assets/models/mars.glb', function(gltf) {
let scale = 5.6;
});
Unfortunately, I am encountering a 404 error when trying to load the file. Any suggestions?