Merge branch 'develop' into feat/shader-net
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled

This commit is contained in:
math-pixel
2026-05-27 18:08:46 +02:00
233 changed files with 34339 additions and 3142 deletions
+11 -1
View File
@@ -1,5 +1,8 @@
import {
GAME_SCENE_FALLBACK_SKY_MODEL_PATH,
GAME_SCENE_FALLBACK_SKY_MODEL_SCALE,
GAME_SCENE_SKY_MODEL_PATH,
GAME_SCENE_SKY_MODEL_SCALE,
PHYSICS_SCENE_BACKGROUND_COLOR,
} from "@/data/world/environmentConfig";
import { useSceneMode } from "@/hooks/debug/useSceneMode";
@@ -14,5 +17,12 @@ export function Environment(): React.JSX.Element {
);
}
return <SkyModel modelPath={GAME_SCENE_SKY_MODEL_PATH} />;
return (
<SkyModel
fallbackModelPath={GAME_SCENE_FALLBACK_SKY_MODEL_PATH}
fallbackScale={GAME_SCENE_FALLBACK_SKY_MODEL_SCALE}
modelPath={GAME_SCENE_SKY_MODEL_PATH}
scale={GAME_SCENE_SKY_MODEL_SCALE}
/>
);
}
+41 -1
View File
@@ -22,6 +22,16 @@ interface LoadedMapNode {
modelUrl: string | null;
}
const MAP_STRUCTURE_NODE_NAMES = new Set(["Scene", "blocking"]);
const LITE_MAP_SKIPPED_NODE_NAMES = new Set([
"arbre",
"buissons",
"champdeble",
"champdesoja",
"champsdetournesol",
"sapin",
]);
interface ErrorBoundaryProps {
children: ReactNode;
fallback: ReactNode;
@@ -133,7 +143,17 @@ export function GameMap({
status: "loading",
});
const loadedMapNodes = sceneData.mapNodes.map((node) => {
const visibleMapNodes = sceneData.mapNodes.filter(liteMap);
const skippedMapNodeCount =
sceneData.mapNodes.length - visibleMapNodes.length;
if (skippedMapNodeCount > 0) {
logger.warn("GameMap", "Lite map skipped heavy map nodes", {
skippedMapNodeCount,
});
}
const loadedMapNodes = visibleMapNodes.map((node) => {
const modelUrl = sceneData.models.get(node.name);
return { node, modelUrl: modelUrl ?? null };
});
@@ -214,6 +234,26 @@ export function GameMap({
);
}
/**
* Temporary development-only map reducer.
*
* TODO: replace this with a real map performance pass: merged static geometry,
* instancing for repeated props, LOD, and/or zone-based loading. For now this
* keeps the app usable on local machines by not rendering the densest exported
* nodes from map.json.
*/
function liteMap(node: MapNode): boolean {
if (MAP_STRUCTURE_NODE_NAMES.has(node.name)) {
return false;
}
if (node.type === "Mesh") {
return false;
}
return !LITE_MAP_SKIPPED_NODE_NAMES.has(node.name);
}
function MapNodeInstance({
node,
modelUrl,
+2 -1
View File
@@ -106,7 +106,8 @@ export function PlayerController({
const velocity = useRef(new THREE.Vector3());
const onFloor = useRef(false);
const wantsJump = useRef(false);
const initializedRef = useRef(false); const canMove = useGameStore((state) => state.missionFlow.canMove);
const initializedRef = useRef(false);
const canMove = useGameStore((state) => state.missionFlow.canMove);
const capsule = useRef(createSpawnCapsule(spawnPosition));