Are there bufferGeometry attributes Refs?


I have a complex mesh, like the following one. The way I currently update the render is by using hooks. But when I need a high render rate, this has performance issues.
So I want to use useFrame and Refs instead, but I can’t find the syntax (I don’t know if it is even possible in fact) to update refs for attributes/position, normal, UV…

 <mesh key={cellId} position={cellData.meshPos}>
          <bufferGeometry attach="geometry">
            <bufferAttribute attachObject={['attributes', 'position']} args={[new Float32Array(cellData.positions), 3]} />
            <bufferAttribute attachObject={['attributes', 'normal']} args={[new Float32Array(cellData.normals), 3]} />
            <bufferAttribute attachObject={['attributes', 'uv']} args={[new Float32Array(cellData.uvs), 2]} />
            <bufferAttribute attach="index" args={[new Uint32Array(cellData.indices), 1]} />
          <PixelImageMaterial img={textureAtlas} attach="material" />

assuming you have <bufferAttribute ref={blah}> it should be blah.current.array

1 Like

Thank you for your response!

But maybe I should have asked my question in a more general way.
How to know in a general way what syntax we can use to modify such or such attribute of a mesh/class/Object?
Example: I know I can rotate a mesh by associating it with a ref and writing ref.current.rotate.x = …
I know it because I saw other examples doing it. But I can’t find on documentation any information that would indicate this to me.

that comes from react, so the docs are over there