Replies: 1 comment 4 replies
-
merging is an imperative function, this is what usememo is for, memoized, imperative calculations. how exactly you merge two geometries i do not know by memory but there's no difference as to how you'd do it: same as in threejs. const merged = useMemo(() => merge(geo1, geo2), [geo1, geo2])
return <mesh geometry={merged} /> your geometry is still managed afterwards, so when the component unmounts, it will be discarded properly. |
Beta Was this translation helpful? Give feedback.
4 replies
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.
-
I want to merge several geometries into one. What is the suggested way to accomplish this in react-three-fiber?
Beta Was this translation helpful? Give feedback.
All reactions