Release Healer Man 0.1.7
This commit is contained in:
1 parent
b12fb84859
commit
eca6b5db9b
99 files changed
+1931
-150
No files matched your search
+20
-1
@@ -28,6 +28,7 @@ import {
|
||||
encounterWorldIsReady,
|
||||
encounterWorldKey,
|
||||
rendererCanvasKey,
|
||||
sceneFrameLoop,
|
||||
} from "./sceneLifecycle";
|
||||
import { manastormChaoticLinkRuntimeIds } from "../game/manastormChaoticLink";
|
||||
import { manastormStagePopulation, manastormStageRoamingPacks } from "../game/manastormStagePopulation";
|
||||
@@ -44,6 +45,8 @@ import { GmPlacementMarkers } from "./GmPlacementMarkers";
|
||||
import { useOnlineGroupStore } from "../app/onlineGroupStore";
|
||||
import { useOnlineSessionStore } from "../app/onlineSessionStore";
|
||||
import { OnlinePlayerPopulation } from "./OnlinePlayerPopulation";
|
||||
import { DevelopmentPerformanceProbe } from "./DevelopmentPerformanceProbe";
|
||||
import { AdaptiveGraphicsQuality } from "./AdaptiveGraphicsQuality";
|
||||
|
||||
export function GameScene() {
|
||||
const activeDungeonId = useGameStore((state) => state.activeDungeonId);
|
||||
@@ -97,12 +100,21 @@ export function GameScene() {
|
||||
const canvasRef = useRef<HTMLCanvasElement>(null);
|
||||
const [readySessionRevision, setReadySessionRevision] = useState<number | null>(null);
|
||||
const [safeGraphics, setSafeGraphics] = useState(false);
|
||||
const [adaptiveDpr, setAdaptiveDpr] = useState(1.5);
|
||||
const [canvasRevision, setCanvasRevision] = useState(0);
|
||||
const [graphicsRecovery, setGraphicsRecovery] = useState<"lost" | "recovering" | null>(null);
|
||||
const worldReady = encounterWorldIsReady(readySessionRevision, sessionRevision);
|
||||
const simulationBlocked = graphicsRecovery !== null
|
||||
|| !worldReady
|
||||
|| (!sharedOnline && (paused || mapOpen || companionOpen));
|
||||
const frameloop = sceneFrameLoop({
|
||||
worldReady,
|
||||
graphicsRecovering: graphicsRecovery !== null,
|
||||
sharedOnline,
|
||||
paused,
|
||||
mapOpen,
|
||||
companionOpen,
|
||||
});
|
||||
const allowedRuntimeIds = useMemo(
|
||||
() => gameMode === "manastorm" && manastormEncounter
|
||||
? manastormChaoticLinkRuntimeIds(manastormEncounter, manastormPhase)
|
||||
@@ -153,6 +165,10 @@ export function GameScene() {
|
||||
useWailingEncounterStore.getState().reset();
|
||||
}, [activeDungeonId, gameMode, sessionRevision]);
|
||||
|
||||
useEffect(() => {
|
||||
setAdaptiveDpr(1.5);
|
||||
}, [activeDungeonId, sessionRevision]);
|
||||
|
||||
const endMouseLook = useCallback(() => {
|
||||
endMouseLookDrag();
|
||||
}, []);
|
||||
@@ -193,7 +209,8 @@ export function GameScene() {
|
||||
key={rendererCanvasKey(canvasRevision)}
|
||||
ref={canvasRef}
|
||||
shadows={!safeGraphics}
|
||||
dpr={safeGraphics ? 1 : [1, 1.5]}
|
||||
dpr={safeGraphics ? 1 : adaptiveDpr}
|
||||
frameloop={frameloop}
|
||||
camera={{
|
||||
fov: 62,
|
||||
near: 0.08,
|
||||
@@ -210,6 +227,8 @@ export function GameScene() {
|
||||
}}
|
||||
>
|
||||
<GameGltfLoaderLifecycle>
|
||||
{!safeGraphics && worldReady && <AdaptiveGraphicsQuality onDprChange={setAdaptiveDpr} />}
|
||||
{import.meta.env.DEV && <DevelopmentPerformanceProbe />}
|
||||
<color attach="background" args={[dungeon.presentation.background]} />
|
||||
<fog attach="fog" args={[dungeon.presentation.fog.color, dungeon.presentation.fog.near, dungeon.presentation.fog.far]} />
|
||||
<ambientLight intensity={dungeon.presentation.ambientLight.intensity} color={dungeon.presentation.ambientLight.color} />
|
||||
|
||||
Reference in new issue
Block a user