I'm facing a challenge with my Vue Cli app where I am attempting to use Three.js for rendering 3D objects within it.
The issue arises when I attempt to load an image to utilize as a texture.
let scene = new Three.Scene();
const spaceTexture = new Three.TextureLoader().load(
"@/assets/images/space-background.jpg"
);
scene.background = spaceTexture;
What puzzles me is that it doesn't seem to be an import or image problem since I can successfully add it to the DOM:
<template>
<div id="container"></div>
<img src="@/assets/images/space-background.jpg" />
</template>
https://i.stack.imgur.com/nypz0.png
I'm at a loss on how to proceed, as I have tried various types of paths without success. Any suggestions would be greatly appreciated.