So I have a function which creates a cross with 3 geometries, each rotated by 90deg, it works fine in versions 124<, but in 125+ rotation not works, or merge doesn’t work, idk, whats wrong with my code?
const crossMesh = (cubeSize, material) => {
const geometry = new THREE.BoxGeometry(...cubeSize);
const cube = new THREE.Mesh(geometry, material);
cube.rotateX(Math.PI / 2);
cube.updateMatrix();
const geometry1 = geometry;
geometry1.merge(cube.geometry, cube.matrix);
const cube2 = new THREE.Mesh(geometry1, material);
cube2.rotateZ(Math.PI / 2);
const geometry2 = geometry;
cube2.updateMatrix();
geometry2.merge(cube2.geometry, cube2.matrix);
const cube3 = new THREE.Mesh(geometry2, material);
return cube3;
};