outro anim + vid

This commit is contained in:
math-pixel
2026-06-03 01:45:43 +02:00
parent b1037d5107
commit 10b0d4fc16
6 changed files with 129 additions and 17 deletions
+9 -1
View File
@@ -118,7 +118,15 @@ function playCinematic(
onUpdate: () => camera.lookAt(target),
onComplete: () => {
timelineRef.current = null;
useGameStore.getState().setCinematicPlaying(false);
// During the outro the camera is intentionally left at its final
// position — don't release cinematic lock so the player camera system
// can't snap it back to the player's eye position.
const { mainState } = useGameStore.getState();
if (mainState === "outro") {
window.dispatchEvent(new CustomEvent("outro-cinematic-complete"));
} else {
useGameStore.getState().setCinematicPlaying(false);
}
},
});