Skip to content

Undefined BufferGeometry at first render with useUpdate #863

Answered by drcmda
loichuder asked this question in Q&A
Discussion options

You must be logged in to vote

useUpdate calls you back after the object has rendered. but it doesnt cause a render by itself. in other words, you render, both points and line receive "undefined" (ref.current), then you fill the buffergeometry. i would do it like in your first solution.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@loichuder
Comment options

@drcmda
Comment options

Answer selected by loichuder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants