# BufferGeometry sharing vertex

**URL:** <https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [October 28, 2022, 11:32am UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111 "2022-10-28T11:32:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pask](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pask](https://discourse.threejs.org/u/pask)\
**Post date:** [October 28, 2022, 11:32am UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/1 "2022-10-28T11:32:48Z")

</div>

I have a plane made of a triangles using bufferGeaometry, when i calculate the positions i have duplicate positions , what i mean is i push 2 triangles that share same vertex values but if i try to lift 1 triangle this doesent affect the one next to it , and i get a gap into my mesh , how can i make it so when 1 triangles is lifted the others are affected by that change too , sort of like streaching towards it

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 28, 2022, 11:39am UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/2 "2022-10-28T11:39:39Z")

</div>

Hi!  
Why not use `PlaneGeometry`, where it’s indexed, thus, faces share their vertices to each other?  
Or you’ve got a specific case with your plane.

---

<div class="post-metadata">

**Author:** ![pask](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pask](https://discourse.threejs.org/u/pask)\
**Post date:** [October 28, 2022, 11:56am UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/3 "2022-10-28T11:56:10Z")

</div>

Im using bufferGeometry becouse it is fast , i have no idea how fast PlaneGeometry is , but im in a stage where if i change it to PlaneGeometry i must rewrite a lot of code , but is there a way to make so bufferGeometry faces share their vertecies ?

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 28, 2022, 12:00pm UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/4 "2022-10-28T12:00:24Z")

</div>

No live examples. No code snippets. Even no ref pics/vids. My wild shot is try to use `.mergeVertices()` of `BufferGeometryUtils`.

> [@pask](#):
>
> i have no idea how fast PlaneGeometry is

It’s an indexed buffer geometry.

---

<div class="post-metadata">

**Author:** ![pask](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pask](https://discourse.threejs.org/u/pask)\
**Post date:** [October 28, 2022, 12:01pm UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/5 "2022-10-28T12:01:59Z")

</div>

What does indexed mean ? 🙂

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 28, 2022, 12:05pm UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/6 "2022-10-28T12:05:30Z")

</div>

Faces defined by triplets of indices of vertices. Otherwise, you’ve got “triangle soup”, where faces defined by triplets of vertices. That “soup” is your case.

---

<div class="post-metadata">

**Author:** ![pask](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pask](https://discourse.threejs.org/u/pask)\
**Post date:** [October 28, 2022, 12:07pm UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/7 "2022-10-28T12:07:10Z")

</div>

thank you 🙂

---

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [October 28, 2022, 6:39pm UTC](https://discourse.threejs.org/t/buffergeometry-sharing-vertex/44111/8 "2022-10-28T18:39:32Z")

</div>

Here you can compare the variants using a simple example.  
From the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315) :  
see [2022 discourse.threejs.hofk.de](https://hofk.de/main/discourse.threejs/2022/index2022.html)

 ![2022-10-28 20.36.33](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/8/98ecdf3bd272d4b8feb3d1a09f5953ed278252d3.png)
