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
Please see #3142 for an attempted partial fix. Might be related to #3125.
In my concrete case I used a list of loaded glb-files. After changing the list, sometimes the whole glb-scene wouldn't show up anymore.
This is because changing the list while using the same primitive (as useGLTF gives the same cached scene) the isPrimitive tag got cleared and that caused the whole gltf scene to dispose/unmount.
I created a test to reproduce my case:
// Initialize a list of primitivesawaitact(async()=>root.render(<group><primitivekey={'a'} object={primitive1}name="p1"dispose={null}/></group>,),)expect((primitive1asany).__r3f?.type).toBe('primitive')// New list of primitives while reusing primitive objectawaitact(async()=>root.render(<group><primitivekey={'b'} object={primitive1}name="p1"dispose={null}/><primitivekey={'c'} object={primitive2}name="p2"dispose={null}/></group>,),)expect((primitive1asany).__r3f?.type).toBe('primitive')// fails, is '' insteadexpect((primitive2asany).__r3f?.type).toBe('primitive')
I created a test where a similar bug happens, which has not yet been addressed by me. This test still fails:
Please see #3142 for an attempted partial fix. Might be related to #3125.
In my concrete case I used a list of loaded glb-files. After changing the list, sometimes the whole glb-scene wouldn't show up anymore.
This is because changing the list while using the same primitive (as
useGLTF
gives the same cached scene) theisPrimitive
tag got cleared and that caused the whole gltf scene to dispose/unmount.I created a test to reproduce my case:
I created a test where a similar bug happens, which has not yet been addressed by me. This test still fails:
The text was updated successfully, but these errors were encountered: