Commit 574f803b authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: scene switchWorld unmounts current scene before switching

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 13f912f1
...@@ -100,7 +100,14 @@ function transitionTo(sceneId, params, prevId, isBack = false) { ...@@ -100,7 +100,14 @@ function transitionTo(sceneId, params, prevId, isBack = false) {
} }
renderScene({ id: sceneId, params }, isBack); renderScene({ id: sceneId, params }, isBack);
setTimeout(() => { isTransitioning = false; }, 300);
const sceneEl = container.querySelector('.scene');
if (sceneEl) {
sceneEl.addEventListener('animationend', () => { isTransitioning = false; }, { once: true });
setTimeout(() => { isTransitioning = false; }, 400);
} else {
isTransitioning = false;
}
} }
function renderScene(entry, isBack = false) { function renderScene(entry, isBack = false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment