# Indexed BufferGeometry front and back side assignment - normals or order of indices?

**URL:** <https://discourse.threejs.org/t/indexed-buffergeometry-front-and-back-side-assignment-normals-or-order-of-indices/36380>\
**Category:** Questions\
**Tags:** buffergeometry, normals\
**Created:** [March 25, 2022, 3:25pm UTC](https://discourse.threejs.org/t/indexed-buffergeometry-front-and-back-side-assignment-normals-or-order-of-indices/36380 "2022-03-25T15:25:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [March 25, 2022, 5:00pm UTC](https://discourse.threejs.org/t/indexed-buffergeometry-front-and-back-side-assignment-normals-or-order-of-indices/36380/3 "2022-03-25T17:00:48Z")

</div>

In this example [CircleDynamicallyFormable](https://hofk.de/main/discourse.threejs/2021/CircleDynamicallyFormable/CircleDynamicallyFormable.html) ( from the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315) ) I had made a mistake, and since I had used side: THREE.DoubleSide, I had not noticed it. Since then I make sure to test only front and back. The note about the error is still in the code:

line 103

```javascript
    const setFace = ( ) => {
    
        faceIndices[idxCount] = a;
        //faceIndices[idxCount + 1] = b;
        //faceIndices[idxCount + 2] = c;
        faceIndices[idxCount + 1] = c; // swapped here c and b
        faceIndices[idxCount + 2] = b; // otherwise, the geometry is backsided
        idxCount += 3;
        
    }

```

You can test the wrong variant. 🙂

---

_[View the full topic](https://discourse.threejs.org/t/indexed-buffergeometry-front-and-back-side-assignment-normals-or-order-of-indices/36380)._
