feat add model loading diagnostics

This commit is contained in:
Tom Boullay
2026-05-02 00:14:47 +02:00
parent 4d7d2efdcc
commit 1d64582383
13 changed files with 218 additions and 29 deletions
@@ -8,6 +8,7 @@ import {
} from "@/data/gameplay/repairCaseConfig";
import { AudioManager } from "@/managers/AudioManager";
import type { Vector3Tuple } from "@/types/three/three";
import { logModelLoadError } from "@/utils/three/modelLoadLogger";
interface RepairCaseErrorBoundaryProps {
children: ReactNode;
@@ -31,7 +32,15 @@ class RepairCaseErrorBoundary extends Component<
}
componentDidCatch(error: Error): void {
console.warn("Failed to load repair case model", error);
logModelLoadError(
{
modelPath: REPAIR_CASE_MODEL_PATH,
scope: "RepairCaseObject",
position: [0, -0.45, 0],
scale: 1.5,
},
error,
);
}
render(): ReactNode {