From c71cd35f4d6adbd6fc5e79bc6a2a391bcdf6876a Mon Sep 17 00:00:00 2001 From: Tom Boullay Date: Sat, 2 May 2026 10:58:00 +0200 Subject: [PATCH] fix electricienne debug model loading --- .../models/electricienne_animated/Mat_baseColor.png | 3 +++ public/models/electricienne_animated/Mat_normal.png | 3 +++ .../Mat_occlusionRoughnessMetallic.png | 3 +++ public/models/electricienne_animated/model.bin | 3 +++ public/models/electricienne_animated/model.gltf | 3 +++ src/components/ui/debug/HandTrackingDebugPanel.tsx | 13 +++++++++---- src/data/gameplay/repairGameModelCatalog.ts | 5 ++++- src/pages/page.tsx | 6 +++++- src/world/debug/TestMap.tsx | 7 +++++-- 9 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 public/models/electricienne_animated/Mat_baseColor.png create mode 100644 public/models/electricienne_animated/Mat_normal.png create mode 100644 public/models/electricienne_animated/Mat_occlusionRoughnessMetallic.png create mode 100644 public/models/electricienne_animated/model.bin create mode 100644 public/models/electricienne_animated/model.gltf diff --git a/public/models/electricienne_animated/Mat_baseColor.png b/public/models/electricienne_animated/Mat_baseColor.png new file mode 100644 index 0000000..ba0de35 --- /dev/null +++ b/public/models/electricienne_animated/Mat_baseColor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:142be230a66ff6bebe321b373e4785283624c3bb5f3565114a6acca6e2d056f2 +size 691735 diff --git a/public/models/electricienne_animated/Mat_normal.png b/public/models/electricienne_animated/Mat_normal.png new file mode 100644 index 0000000..c72e6e2 --- /dev/null +++ b/public/models/electricienne_animated/Mat_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f4580790707fc1fc505b3b725a523eac3e985353bc2e566a73ae2d983e87029 +size 1229760 diff --git a/public/models/electricienne_animated/Mat_occlusionRoughnessMetallic.png b/public/models/electricienne_animated/Mat_occlusionRoughnessMetallic.png new file mode 100644 index 0000000..dc6530c --- /dev/null +++ b/public/models/electricienne_animated/Mat_occlusionRoughnessMetallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2abdb28a5b27842d8958480f97357a3603b2c0ab46db9ff6bf08e474600c5d49 +size 650826 diff --git a/public/models/electricienne_animated/model.bin b/public/models/electricienne_animated/model.bin new file mode 100644 index 0000000..3a75871 --- /dev/null +++ b/public/models/electricienne_animated/model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:247407ee9bdb8fa5730a56df06872a224888cde1a4a0592c62d0157608b83f02 +size 2954520 diff --git a/public/models/electricienne_animated/model.gltf b/public/models/electricienne_animated/model.gltf new file mode 100644 index 0000000..fc3c84f --- /dev/null +++ b/public/models/electricienne_animated/model.gltf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35129131d3f1d70b9648b5ea09d704ffecaab6b52aa03c0ab32b476349b25f92 +size 47180 diff --git a/src/components/ui/debug/HandTrackingDebugPanel.tsx b/src/components/ui/debug/HandTrackingDebugPanel.tsx index df2f9b5..0822497 100644 --- a/src/components/ui/debug/HandTrackingDebugPanel.tsx +++ b/src/components/ui/debug/HandTrackingDebugPanel.tsx @@ -21,11 +21,16 @@ export function HandTrackingDebugPanel(): React.JSX.Element | null { } const fist = hands.some((hand) => hand.isFist); - const modelLoaded = hands.some( + const hasLeftHand = hands.some( (hand) => hand.handedness.toLowerCase() === "left", - ) - ? "gant_l" - : "none"; + ); + const hasRightHand = hands.some( + (hand) => hand.handedness.toLowerCase() === "right", + ); + const modelLoaded = + [hasLeftHand ? "gant_l" : null, hasRightHand ? "gant_r" : null] + .filter(Boolean) + .join(", ") || "none"; return (
- + diff --git a/src/world/debug/TestMap.tsx b/src/world/debug/TestMap.tsx index 1f28812..dd53bc9 100644 --- a/src/world/debug/TestMap.tsx +++ b/src/world/debug/TestMap.tsx @@ -27,6 +27,9 @@ import { useOctreeGraphNode } from "@/hooks/three/useOctreeGraphNode"; import type { OctreeReadyHandler } from "@/types/three/three"; import { logModelLoadError } from "@/utils/three/modelLoadLogger"; +const ELECTRICIENNE_ANIMATED_MODEL_PATH = + "/models/electricienne_animated/model.gltf"; + interface TestMapProps { onOctreeReady: OctreeReadyHandler; } @@ -134,9 +137,9 @@ export function TestMap({ onOctreeReady }: TestMapProps): React.JSX.Element { - +