You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using "useGLTF" in a component that is subsequently rendered using "createPortal" the application crashes with a "maximum update depth exceeded" or freezes the page in some cases.
functionPortalTest(){const[group,setGroup]=useState(null)return(<><groupref={setGroup}/>{group&&createPortal(<Scene/>,group)}</>)}functionScene(){const{ gl }=useThree()const{ scene }=useGLTF('facecap.glb',false,false)return<primitiveobject={scene}/>}
Suggested solution:
I'm not sure whether this is a drei or r3f issue.
The text was updated successfully, but these errors were encountered:
three
version: 169@react-three/fiber
version: 8.17.9@react-three/drei
version: 9.114node
version: -npm
(oryarn
) version: -Problem description:
When using "useGLTF" in a component that is subsequently rendered using "createPortal" the application crashes with a "maximum update depth exceeded" or freezes the page in some cases.
Relevant code:
Here's a code sandbox the reproduces the issue:
https://codesandbox.io/p/sandbox/lively-field-9dm7gv?file=%2Fsrc%2FApp.js
Suggested solution:
I'm not sure whether this is a drei or r3f issue.
The text was updated successfully, but these errors were encountered: