Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

287
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda