Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

441
Visualizações
'404 not found' error when loading .glb/.gltf file

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:

enter image description here

I also tried ~/assets/test.glb, /src/assets/test.glb, ../../assets/test.glb but in vain. Always the same error:

enter image description here

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)

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda