SvelthreeGLTF.ts
+ x : manually created components have to be destroyed by hand!
#100
Closed
1 task done
e.g. in the
Mesh
component:svelthree/src/components/Mesh.svelte
Line 785 in d986052
I've stumbled upon this when changing test-scenes (pages) in the SvelteKit test-app. The error was thrown only when switching from the
gltf-to-comp-1
test-scene to any other.gltf-to-comp-1
test-scene generates svelthree-components from a loaded GLTF file.If we e.g. change the line above to
$: currentSceneActive = $svelthreeStores[sti]
?.scenes[scene.userData.index_in_scenes]?.isActive
the error is not being thrown.
Why?
It seems like that somewhere during the destruction process, the
svelthreeStores
store is gone / nullified?, but generated components are still alive and react to that change by triggering corresponding reactive statements. Adding?
to all$svelthreeStores[sti]
related statements doesn't feel like a real fix.TODO:
SvelthreeGLTF.ts
+ X)The text was updated successfully, but these errors were encountered: