# BufferGeometry not accepting attributes?

**URL:** <https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810>\
**Category:** Questions\
**Tags:** buffergeometry\
**Created:** [September 5, 2017, 3:53pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810 "2017-09-05T15:53:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvassalo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/nvassalo/32/1728_2.png) [@nvassalo](https://discourse.threejs.org/u/nvassalo)\
**Post date:** [September 5, 2017, 3:53pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810/1 "2017-09-05T15:53:11Z")

</div>

Hi, I’m trying to create a buffer geometry from a Tetrahedron geometry and somehow it tells me bGeometry doesn have an `addAttribute` function… What am I doing here? I’m just passing position parameter because I only want to rotate this solid, nothing else.

```
var geometry = new THREE.TetrahedronGeometry(800, 2);
var bGeometry = new THREE.BufferGeometry().fromGeometry(geometry);
var positions = [];
geometry.faces.forEach( function ( face, index ) {
            positions.push( geometry.vertices[face.a].x );
            positions.push( geometry.vertices[face.a].y );
            positions.push( geometry.vertices[face.a].z );
            positions.push( geometry.vertices[face.b].x );
            positions.push( geometry.vertices[face.b].y );
            positions.push( geometry.vertices[face.b].z );
            positions.push( geometry.vertices[face.c].x );
            positions.push( geometry.vertices[face.c].y );
            positions.push( geometry.vertices[face.c].z );
        })
  console.log(bGeometry);
  bGeometry.addAtribute( 'position', new THREE.Float32BufferAttribute( positions, 3 ) );
  solid = new THREE.Mesh(bGeometry, material);
  solid.position.set(900, 200 , 0);

```

And on animation…

```
solid.rotation.x += 0.001;
solid.rotation.y += 0.001;
solid.rotation.z += 0.001;
```

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [September 5, 2017, 5:38pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810/2 "2017-09-05T17:38:09Z")

</div>

I see a typo in your code: `bGeometry.addAtribute()`.

A `t` is missing. Is this maybe the problem?

---

<div class="post-metadata">

**Author:** ![TheCodeCrafter](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/thecodecrafter/32/50_2.png) [@TheCodeCrafter](https://discourse.threejs.org/u/TheCodeCrafter)\
**Post date:** [September 6, 2017, 8:14pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810/3 "2017-09-06T20:14:38Z")

</div>

@Mugen87 and @nvassalo,

The mis-spelled `bGeometry.addAtribute` is the problem, if there are any other problems, it has to do with deprecated code. And I don’t really see any, so fix that, and you should be good.

---

<div class="post-metadata">

**Author:** ![nvassalo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/nvassalo/32/1728_2.png) [@nvassalo](https://discourse.threejs.org/u/nvassalo)\
**Post date:** [September 6, 2017, 10:53pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810/4 "2017-09-06T22:53:52Z")

</div>

That was exactly it, of course…Thanks guys @Mugen87 @TheCodeCrafter

---

<div class="post-metadata">

**Author:** ![TheCodeCrafter](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/thecodecrafter/32/50_2.png) [@TheCodeCrafter](https://discourse.threejs.org/u/TheCodeCrafter)\
**Post date:** [October 15, 2017, 8:29pm UTC](https://discourse.threejs.org/t/buffergeometry-not-accepting-attributes/810/5 "2017-10-15T20:29:34Z")

</div>

No problem 😉
