Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!