How am I supposed to create a threejs component with userData #1212
Answered
by
drcmda
ThiagoFacchini
asked this question in
Q&A
-
I have a use case where I need to have some userData added to threejs objects. I was wondering how does it work or what is the recommended approach for R3F at component creation.... e.g: gridHelper
N.B.: It is important that the userData gets assigned to the component at the component creation. Any advice? |
Beta Was this translation helpful? Give feedback.
Answered by
drcmda
Apr 11, 2021
Replies: 1 comment 1 reply
-
userdata is just a prop like any other: <gridHelper args={['10', '10', 'white', 'gray']} userData={{ hello: 'world' }} /> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ThiagoFacchini
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
userdata is just a prop like any other: