o think is not that

This commit is contained in:
math-pixel
2026-06-01 22:26:58 +02:00
parent cd0afcda8c
commit d975aac018
6 changed files with 117 additions and 19 deletions
+14 -1
View File
@@ -1,6 +1,7 @@
import { Ebike } from "@/components/ebike/Ebike";
import { InteractableObject } from "@/components/three/interaction/InteractableObject";
import { RepairGame } from "@/components/three/gameplay/RepairGame";
import { RepairGamePreloader } from "@/components/three/gameplay/RepairGamePreloader";
import { PylonDownedPylon } from "@/components/gameplay/pylon/PylonDownedPylon";
import { PylonNarrativeFlow } from "@/components/gameplay/pylon/PylonNarrativeFlow";
import { ZoneDebugVisual } from "@/components/zone/ZoneDetection";
@@ -91,6 +92,14 @@ export function GameStageContent(): React.JSX.Element {
return (
<>
{/* Preload ONLY the next upcoming mission's assets so we never keep a
finished mission's heavy textures resident (ebike alone is ~40MB).
Holding every mission at once is what saturated GPU memory. */}
{mainState === "intro" || mainState === "ebike" ? (
<RepairGamePreloader mission="pylon" />
) : null}
{mainState === "pylon" ? <RepairGamePreloader mission="farm" /> : null}
{mainState === "intro" ? <StageAnchor {...INTRO_STAGE_ANCHOR} /> : null}
<Ebike position={EBIKE_WORLD_POSITION} />
<PylonDownedPylon />
@@ -104,7 +113,11 @@ export function GameStageContent(): React.JSX.Element {
{REPAIR_MISSION_POSITION_ENTRIES.map(({ mission }) => {
const position = getRepairMissionPosition(mission, anchors);
if (!position) return null;
if (mission === "pylon" && pylonInNarrative) return null;
if (
mission === "pylon" &&
(pylonInNarrative || pylonStep === "waiting")
)
return null;
return (
<RepairGame key={mission} mission={mission} position={position} />
);