# Geometry rotation/merge problem in three v125+

**URL:** <https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [March 27, 2021, 2:45pm UTC](https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838 "2021-03-27T14:45:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dogpens123](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dogpens123/32/17533_2.png) [@dogpens123](https://discourse.threejs.org/u/dogpens123)\
**Post date:** [March 27, 2021, 2:45pm UTC](https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838/1 "2021-03-27T14:45:34Z")

</div>

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

```

[https://jsfiddle.net/eL98kahz/](https://jsfiddle.net/eL98kahz/)

---

<div class="post-metadata">

**Author:** ![gkjohnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gkjohnson/32/2298_2.png) [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)\
**Post date:** [March 27, 2021, 3:12pm UTC](https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838/2 "2021-03-27T15:12:04Z")

</div>

THREE.Geometry was removed in r125 and replaced with BufferGeometry. See [THREE.Geometry will be removed from core with r125](https://discourse.threejs.org/t/three-geometry-will-be-removed-from-core-with-r125/22401).

---

<div class="post-metadata">

**Author:** ![dogpens123](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dogpens123/32/17533_2.png) [@dogpens123](https://discourse.threejs.org/u/dogpens123)\
**Post date:** [March 27, 2021, 3:18pm UTC](https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838/3 "2021-03-27T15:18:20Z")

</div>

But I don’t use THREE.Geometry, code use THREE.BoxGeometry and it creates needed geometry but without rotation aplied to it.

---

<div class="post-metadata">

**Author:** ![gkjohnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gkjohnson/32/2298_2.png) [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)\
**Post date:** [March 27, 2021, 3:20pm UTC](https://discourse.threejs.org/t/geometry-rotation-merge-problem-in-three-v125/24838/4 "2021-03-27T15:20:17Z")

</div>

THREE.BoxGeometry was based on THREE.Geometry before r125. Now it is based on BufferGeometry. If you look at the docs for BufferGeometry you’ll see that `merge` does not take a transform matrix as the second argument:

[https://threejs.org/docs/?q=Bufferg#api/en/core/BufferGeometry.merge](https://threejs.org/docs/?q=Bufferg#api/en/core/BufferGeometry.merge)
