Release Healer Man 0.1.7

This commit is contained in:
phenom committed 2026-08-22 15:53:43 -04:00
1 parent b12fb84859
commit eca6b5db9b
99 files changed
+1931 -150

No files matched your search

+21
View File
@@ -1,4 +1,5 @@
import type { DungeonId } from "../game/dungeonRegistry";
import type { Frameloop } from "@react-three/fiber";
/**
* Encounter transitions must never remount the Canvas: R3F intentionally loses
@@ -27,3 +28,23 @@ export function encounterWorldIsReady(
return readySessionRevision !== null
&& readySessionRevision === Math.max(0, Math.trunc(sessionRevision));
}
/**
* A paused local world only needs a frame when React or R3F invalidates it.
* Loading, recovery, and shared-online worlds keep the continuous loop so
* asynchronous scene setup and authoritative remote simulation can progress.
*/
export function sceneFrameLoop(options: {
readonly worldReady: boolean;
readonly graphicsRecovering: boolean;
readonly sharedOnline: boolean;
readonly paused: boolean;
readonly mapOpen: boolean;
readonly companionOpen: boolean;
}): Frameloop {
const locallyPaused = options.worldReady
&& !options.graphicsRecovering
&& !options.sharedOnline
&& (options.paused || options.mapOpen || options.companionOpen);
return locallyPaused ? "demand" : "always";
}