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

288
Visualizações
Not Found error importing an image to Trois js texture

I'm getting an Not Found error while importing an image to use it as a texture in a Texture component from Trois.js module.

I created a project using Vue Cli and imported Trois.js to a component and there I started playing with a cube example. Here's the code:

<template>
  <Renderer ref="renderer" :resize="true" orbit-ctrl>
    <Camera ref="camera" :position="{ z: 10 }" />
    <Scene ref="scene" background="#cdcdcd">
      <PointLight ref="light" :position="{ y: 50, z: 50 }" />
      <Box ref="box" :rotation="{ y: Math.PI / 4, z: Math.PI / 4 }">
        <PhongMaterial>
          <Texture src="@/assets/logo.png" />
        </PhongMaterial>
      </Box>
    </Scene>
  </Renderer>
</template>

<script>
export default {
  mounted() {},
};
</script>

<style scoped></style>

I tried to use each material available (BasicMaterial, LambertMaterial, etc), but the error is not related to this.

This is the image while commenting the Texture line: withoutTexture

And this one while uncommented: withTexture

The work directory looks like this: workDirectory

I also tried changing the type of path, using relative, absolute... It didn't change anything.

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