13 lines
325 B
JavaScript
13 lines
325 B
JavaScript
const THREE = require('three');
|
|
const parent = new THREE.Group();
|
|
parent.position.set(1, 0, 0);
|
|
const child = new THREE.Mesh();
|
|
child.position.set(0, 1, 0);
|
|
parent.add(child);
|
|
parent.updateMatrixWorld(true);
|
|
|
|
const clone = child.clone(true);
|
|
clone.applyMatrix4(child.matrixWorld);
|
|
|
|
console.log("Clone pos:", clone.position);
|