-
how to add mesh on button click ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
same way you add anything in react. the view is just a reflection of state:
you don't want to do that. you want to put the raw, serializable state that makes the mesh look or behave a certain way into the state model. the component then takes that state and forms a view.
i don't see what makes it expensive, but again, don't. what is always expensive in three is:
you can avoid all of this. for instance by creating re-used materials and geometries in global or component space and then doing |
Beta Was this translation helpful? Give feedback.
same way you add anything in react. the view is just a reflection of state:
you don't want to do that. you want to put the raw, serializable state that makes the mesh look or behave a certain way into the state model. the component then takes that state and forms a view.
i don't see what makes it …