I created a model in Blender and saved it as .glb file. When I try to load it to Three.js (using Vue.js and to be precise Trois.js) then I encounter some 404 (not found) error. Seems like path is wrong but I tried every single option to make proper relative path, however none of them works. Have no idea what's wrong. Here is my code:
BaseModel.vue
<template>
<Renderer ref="renderer"
antialias
resize=true
shadow
:orbit-ctrl="{ enableDamping: true, target }"
>
<Camera ref="camera" :position="camera.position" />
<Scene ref="scene" :background='bg_color'>
<PointLight ref="light1"
:intensity="scene.pointLight.intensity"
:position="scene.pointLight.position" />
<GltfModel src="~assets/test.glb" />
</Scene>
</Renderer>
</template>
and my directory:
I also tried ~/assets/test.glb, /src/assets/test.glb, ../../assets/test.glb but in vain.
Always the same error:
I also checked this issues but it didn't help: GLTF file 404 not found
EDIT: I'm adding folders structure taken from dev tools, I can't see 'text'glb' model loaded to assets folder where I normally store it. Seems it hasn't been loaded, don't know why. And yes, I refreshed the sources (Ctrl+R)