Files
hydro-builder-app/scratch/test_three.cjs
2026-06-13 17:36:44 -07:00

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);