forked from phenom/healer-man
updated the dungeon loading so it doesnt fail first try
This commit is contained in:
1 parent
e39aebf3a1
commit
7e60864e70
11 files changed
+383
-69
No files matched your search
+45
-38
@@ -36,6 +36,7 @@ import {
|
||||
wailingStaticSpawnsForPhase,
|
||||
} from "../game/wailingCavernsEncounter";
|
||||
import { WailingNaralexEvent } from "./WailingNaralexEvent";
|
||||
import { GameGltfLoaderLifecycle } from "./useGameGLTF";
|
||||
|
||||
export function GameScene() {
|
||||
const activeDungeonId = useGameStore((state) => state.activeDungeonId);
|
||||
@@ -198,45 +199,51 @@ export function GameScene() {
|
||||
powerPreference: safeGraphics ? "default" : "high-performance",
|
||||
}}
|
||||
>
|
||||
<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} />
|
||||
<hemisphereLight args={[
|
||||
dungeon.presentation.hemisphereLight.skyColor,
|
||||
dungeon.presentation.hemisphereLight.groundColor,
|
||||
dungeon.presentation.hemisphereLight.intensity,
|
||||
]} />
|
||||
<directionalLight
|
||||
castShadow
|
||||
color={dungeon.presentation.directionalLight.color}
|
||||
intensity={dungeon.presentation.directionalLight.intensity}
|
||||
position={[
|
||||
dungeon.entrance.footPosition[0] + dungeon.presentation.directionalLight.offset[0],
|
||||
dungeon.entrance.footPosition[1] + dungeon.presentation.directionalLight.offset[1],
|
||||
dungeon.entrance.footPosition[2] + dungeon.presentation.directionalLight.offset[2],
|
||||
]}
|
||||
shadow-mapSize={[1024, 1024]}
|
||||
shadow-bias={-0.00025}
|
||||
/>
|
||||
<Physics
|
||||
key={encounterWorldKey(activeDungeonId, sessionRevision)}
|
||||
gravity={[0, -18, 0]}
|
||||
paused={simulationBlocked}
|
||||
timeStep={1 / 60}
|
||||
>
|
||||
<DungeonEnvironment onReady={markWorldReady} />
|
||||
<PlayerRig />
|
||||
<PartyPopulation active={!simulationBlocked} />
|
||||
<MobPopulation
|
||||
active={!simulationBlocked}
|
||||
entities={stagePopulation.entities}
|
||||
roamingPacks={roamingPacks}
|
||||
staticSpawns={staticSpawns}
|
||||
allowedRuntimeIds={allowedRuntimeIds}
|
||||
<GameGltfLoaderLifecycle>
|
||||
<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} />
|
||||
<hemisphereLight args={[
|
||||
dungeon.presentation.hemisphereLight.skyColor,
|
||||
dungeon.presentation.hemisphereLight.groundColor,
|
||||
dungeon.presentation.hemisphereLight.intensity,
|
||||
]} />
|
||||
<directionalLight
|
||||
castShadow
|
||||
color={dungeon.presentation.directionalLight.color}
|
||||
intensity={dungeon.presentation.directionalLight.intensity}
|
||||
position={[
|
||||
dungeon.entrance.footPosition[0] + dungeon.presentation.directionalLight.offset[0],
|
||||
dungeon.entrance.footPosition[1] + dungeon.presentation.directionalLight.offset[1],
|
||||
dungeon.entrance.footPosition[2] + dungeon.presentation.directionalLight.offset[2],
|
||||
]}
|
||||
shadow-mapSize={[1024, 1024]}
|
||||
shadow-bias={-0.00025}
|
||||
/>
|
||||
<WailingNaralexEvent />
|
||||
<ManastormPortal />
|
||||
</Physics>
|
||||
<Physics
|
||||
key={encounterWorldKey(activeDungeonId, sessionRevision)}
|
||||
gravity={[0, -18, 0]}
|
||||
paused={simulationBlocked}
|
||||
timeStep={1 / 60}
|
||||
>
|
||||
<DungeonEnvironment onReady={markWorldReady} />
|
||||
{worldReady && (
|
||||
<>
|
||||
<PlayerRig />
|
||||
<PartyPopulation active={!simulationBlocked} />
|
||||
<MobPopulation
|
||||
active={!simulationBlocked}
|
||||
entities={stagePopulation.entities}
|
||||
roamingPacks={roamingPacks}
|
||||
staticSpawns={staticSpawns}
|
||||
allowedRuntimeIds={allowedRuntimeIds}
|
||||
/>
|
||||
<WailingNaralexEvent />
|
||||
<ManastormPortal />
|
||||
</>
|
||||
)}
|
||||
</Physics>
|
||||
</GameGltfLoaderLifecycle>
|
||||
</Canvas>
|
||||
{graphicsRecovery && (
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user