In three.js, I want to add a mesh to a position in the scene
I\'ve tried:
// mesh is a THREE.Mesh
scene is a THREE.Scene
scene.add(mesh)
scene.update
I prefer to use Vector3
to set position.
let group = new THREE.Group();
// position of box
let vector = new THREE.Vector3(10, 10, 10);
// add wooden Box
let woodenBox = new THREE.Mesh(boxGeometry, woodMaterial);
//update postion
woodenBox.position.copy(vector);
// add to scene
group.add(woodenBox)
this.scene.add(group);