Buffer overflow when adding positions to buffer geometry #545
NicolasRannou
started this conversation in
General
Replies: 1 comment 1 reply
-
i dont think you can update buffergeometry. https://threejs.org/docs/#manual/en/introduction/How-to-update-things as in, the amount of points cannot change once you have created a geometry, you can only mutate existing positions. either use a geometry with enough points, the ones you dont use remain stale, or re-make the geometry with keying. otherwise positions have to be a floatarray. here's an example: https://codesandbox.io/s/r3f-basic-demo-czhxx |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to add points to a buffer geometry but somehow it doesn't work out of the box. It seems on first render it works then when adding positions I get
WebGL: INVALID_VALUE: bufferSubData: buffer overflow
Code:
Is it expected? Should I use refs to update the bufferAttribute instead?
Beta Was this translation helpful? Give feedback.
All reactions