# How to set a stride/repeat count for THREE.Float32BufferAttribute \[Solved / Not Possible\]

**URL:** <https://discourse.threejs.org/t/how-to-set-a-stride-repeat-count-for-three-float32bufferattribute-solved-not-possible/7409>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [May 7, 2019, 12:54pm UTC](https://discourse.threejs.org/t/how-to-set-a-stride-repeat-count-for-three-float32bufferattribute-solved-not-possible/7409 "2019-05-07T12:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![byun](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@byun](https://discourse.threejs.org/u/byun)\
**Post date:** [May 7, 2019, 12:54pm UTC](https://discourse.threejs.org/t/how-to-set-a-stride-repeat-count-for-three-float32bufferattribute-solved-not-possible/7409/1 "2019-05-07T12:54:09Z")

</div>

I would like to know whether it is possible to set a repeat-count (“stride”?) for BufferGeometry attributes (THREE.Float32BufferAttribute). Specifically, I have certain data that is unchanging for each of the three triangle vertices. Rather than repeat the data 3x so that it exists at each vertex, I would like the vertex shader buffer index to increment by the given data-size every third frame. Is this possible? Thanks.

---

<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:** [May 7, 2019, 1:31pm UTC](https://discourse.threejs.org/t/how-to-set-a-stride-repeat-count-for-three-float32bufferattribute-solved-not-possible/7409/2 "2019-05-07T13:31:11Z")

</div>

The only way to avoid data redundancy in buffer attributes is the usage of an [index buffer](https://threejs.org/docs/index.html#api/en/core/BufferGeometry.index). However, I’m not sure what you mean with “increment by the given data-size every third frame”. The usage of an index buffer is fixed. You define primitives (e.g. triangles ) by referring with indices (unsigned integers) to the vertex data in your other buffer attributes (position, normal, uv, color etc.).

---

<div class="post-metadata">

**Author:** ![byun](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@byun](https://discourse.threejs.org/u/byun)\
**Post date:** [May 7, 2019, 2:03pm UTC](https://discourse.threejs.org/t/how-to-set-a-stride-repeat-count-for-three-float32bufferattribute-solved-not-possible/7409/3 "2019-05-07T14:03:50Z")

</div>

Okay thanks, that answers it. All I was saying about data-size is that the attribute “my\_attribute” could have a size, eg vec4, so vertices 0,1,2 would use “my\_attribute”.float\_array[0:3] and then vertices 3,4,5 would use “my\_attribute”.float\_array[4:7]. Sorry for not using real property names, but I hope the intent is clear.
