camera for zones and levels

This commit is contained in:
wass08
2026-02-02 10:24:57 +09:00
parent ff4e2fc2fe
commit f98ead4585
4 changed files with 760 additions and 27 deletions
-5
View File
@@ -179,17 +179,12 @@ useScene.temporal.subscribe((state) => {
const currentPastLength = state.pastStates.length
const currentFutureLength = state.futureStates.length
console.log('Temporal state changed:', {
pastStates: { prev: prevPastLength, current: currentPastLength },
futureStates: { prev: prevFutureLength, current: currentFutureLength },
})
// Undo: futureStates increases (state moved from past to future)
// Redo: pastStates increases while futureStates decreases (state moved from future to past)
const didUndo = currentFutureLength > prevFutureLength
const didRedo = currentPastLength > prevPastLength && currentFutureLength < prevFutureLength
console.log('Detection:', { didUndo, didRedo })
if (didUndo || didRedo) {
// Use RAF to ensure all middleware and store updates are complete