Texture = new THREE.TextureLoader (). Load () introduces texture, which piece in the vue scaffolding should the picture be placed on?

1, I introduced threejs, into vue-cli to use local images as textures, but texture has always been wrong. How should I write the path that texture.image has been underfine,? -sharp-sharp-sharp problem description

I wrote the threejs code in mounted to create a cube model, which has been rendered pure black because I can"t read the picture.

Dec.02,2021

var texture = new THREE.TextureLoader (). Load (require ('.. /.. / static/img/grass.jpg'));
in require


new THREE.TextureLoader().load('../../../static/img/dog.jpeg', texture => {
    mesh.material = new THREE.MeshBasicMaterial({map: texture});
    renderer.clear();
    renderer.render(scene, camera);
});
Put the

picture under the static folder, and the effect is as shown below.


static

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36d93-2c03d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36d93-2c03d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?