diff --git a/README.md b/README.md index b2dcd37..dfa1236 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ WS ws://localhost:8000/ws | `docs/technical/hand-tracking.md` | Webcam, backend/browser MediaPipe, glove, and gesture flow | | `docs/technical/zustand.md` | Game, settings, and subtitle stores | | `docs/technical/three-debugging.md` | DevTools workflow for stepping into Three.js internals | +| `docs/technical/map-performance.md` | Map draw-call bottlenecks and optimization notes | | `docs/technical/editor.md` | Editor implementation details | | `docs/technical/animation.md` | Animated, explodable, and reusable 3D model components | | `docs/user/features.md` | Implemented feature inventory | diff --git a/docs/technical/map-performance.md b/docs/technical/map-performance.md new file mode 100644 index 0000000..84d7538 --- /dev/null +++ b/docs/technical/map-performance.md @@ -0,0 +1,187 @@ +# Map Performance Notes + +This document tracks the current map-rendering performance pass. + +## Current Runtime Path + +- `public/map.json` is the source of map transforms. +- `src/world/GameMap.tsx` renders regular visual map nodes. +- `src/world/vegetation/VegetationSystem.tsx` already instances dense vegetation. +- `src/world/map-instancing/MapInstancingSystem.tsx` instances selected repeated static map assets. +- `src/world/GameMapCollision.tsx` keeps terrain collision separate for the player octree. + +## Draw-Call Bottlenecks Found + +The first performance bottleneck was draw calls. Some assets were exported as many small GLTF primitives even when they used only a few materials. + +| Model | Instances | Meshes / primitives | Notes | +| ---------------- | --------: | ------------------: | ---------------------------------------------------------------- | +| `generateur` | 3 | 3152 | Worst draw-call offender. Needs asset-side mesh merging. | +| `lafabrik` | 4 | 56 | Moderate draw calls, heavy 2048 texture set. | +| `ecole` | 1 | 107 | One material but many primitives; should be merged. | +| `fermeverticale` | 3 | 1 | Geometry is fine; textures are large for the visible complexity. | + +`generateur` was especially expensive because three visible instances could multiply thousands of primitives into thousands of draw calls. Instancing reduces repeated instance cost, but the source asset still needs a cleaner export. + +## Runtime Merge Pass + +`InstancedMapAsset` now groups source meshes by material and compatible geometry attributes before creating `THREE.InstancedMesh` objects. This reduces the runtime draw groups even when the source GLTF is exported as many small meshes. + +Estimated source primitive count versus runtime merged groups: + +| Model | Source primitives | Runtime merged groups | +| ------------ | ----------------: | --------------------: | +| `generateur` | 3152 | 8 | +| `ecole` | 107 | 2 | +| `eolienne` | 118 | 8 | +| `lafabrik` | 56 | 14 | + +This is a code-side safety net, not a replacement for clean asset exports. Clean GLB exports with merged meshes and fewer textures remain the preferred long-term path. + +## Current Triangle Bottleneck + +After the runtime merge pass, draw calls can drop dramatically, but FPS can still stay low because the scene now remains triangle-bound. A debug capture after the merge showed roughly: + +```txt +138 draw calls +~69.6M triangles +~10 FPS +``` + +That means the renderer is no longer mostly blocked by draw-call submission. It is mostly drawing too many visible triangles. + +Estimated triangle contribution from `map.json` instance counts: + +| Model | Instances | Triangles each | Estimated total triangles | +| ------------------- | --------: | -------------: | ------------------------: | +| `buisson` | 646 | 37 500 | ~24.2M | +| `champdesoja` | 1181 | 16 268 | ~19.2M | +| `arbre` | 291 | 38 906 | ~11.3M | +| `champdeble` | 1307 | 6 260 | ~8.2M | +| `champsdetournesol` | 1163 | 3 264 | ~3.8M | +| `sapin` | 93 | 23 972 | ~2.2M | + +These vegetation and crop assets account for almost all of the current `~69M` triangle count. By comparison, the previously suspicious static buildings are much smaller in triangle cost: + +| Model | Estimated total triangles | +| ---------------- | ------------------------: | +| `generateur` | ~123k | +| `lafabrik` | ~124k | +| `ecole` | ~5k | +| `fermeverticale` | ~1k | + +`InstancedMesh` reduces draw calls, but it does not reduce triangle count. If 646 bushes each contain 37 500 triangles, the GPU still has to draw about 24 million bush triangles when those instances are visible. + +## Debug Performance Controls + +The next useful runtime tool is a debug-only performance folder that can isolate model families. This should be mounted only when `?debug` is enabled. + +Proposed controls: + +```txt +Performance / Map +- vegetation +- crops +- trees +- buildings +- landmarks +- props +- terrain +- sky +``` + +Useful per-model toggles: + +```txt +buisson +arbre +sapin +champdeble +champdesoja +champsdetournesol +fermeverticale +lafabrik +immeuble1 +eolienne +pylone +``` + +The purpose is diagnostic, not final gameplay behavior. The expected workflow is: + +1. Open `/?debug` with R3F perf enabled. +2. Disable one family or model type. +3. Watch `triangles`, `calls`, and FPS. +4. Identify which model groups need LOD, density reduction, or asset re-export. + +Recommended implementation files: + +```txt +src/managers/stores/useMapPerformanceStore.ts +src/hooks/debug/useMapPerformanceDebug.ts +src/world/vegetation/VegetationSystem.tsx +src/world/map-instancing/MapInstancingSystem.tsx +src/world/GameMap.tsx +``` + +The store should stay runtime/debug-only. It should not change persisted production map data. + +## Triangle-Reduction Follow-Up + +Once the expensive model families are isolated, the real triangle fixes are: + +1. Lower-poly vegetation and crop exports. +2. LOD variants for trees, bushes, and crop fields. +3. Distance-based culling for vegetation/crop instances. +4. Chunked instancing so Three.js can frustum-cull groups instead of one huge global `InstancedMesh`. +5. Billboard/impostor versions for far vegetation. + +Chunked instancing is especially important. A single `InstancedMesh` containing every bush has one global bounding sphere. If that bounding sphere is visible, Three.js may keep the whole batch visible. Splitting instances into grid chunks allows entire offscreen chunks to be skipped. + +## Current Code-Side Optimization + +Repeated static assets are configured in: + +```txt +src/world/map-instancing/mapInstancingConfig.ts +``` + +Those names are excluded from the regular `GameMap` clone path, then rendered by `MapInstancingSystem` with merged `THREE.InstancedMesh` batches. + +This keeps the existing map authoring format while reducing repeated draw calls for selected assets. + +## Generated R3F Model Path + +Unique static map assets can use explicit R3F components instead of the generic cloned GLTF path. This follows the same intent as `gltfjsx`: expose the model as a React component, then keep control over mesh/material setup in code. + +Current generated map-model entry point: + +```txt +src/world/map-generated/GeneratedMapNodeInstance.tsx +``` + +Current generated model component: + +```txt +src/components/three/models/generated/EcoleModel.tsx +``` + +`ecole` is a safe first candidate because it appears once in `map.json`, has one material, and does not participate in player collision or repair gameplay. Its source GLTF has 107 primitives, so the generated component also merges compatible geometry groups before mounting the meshes. + +This path should be used selectively. It improves control and can remove clone overhead, but it does not reduce source triangle count by itself. + +## Asset-Side Follow-Up + +Design/export should prioritize: + +1. Produce lower-poly `buisson`, `arbre`, `sapin`, and crop assets. +2. Add LOD or billboard variants for far vegetation. +3. Merge `generateur` meshes from 3152 primitives to a small number of material groups. +4. Reduce `lafabrik` texture count and downscale flat/low-detail maps. +5. Merge `ecole` primitives because it uses a single material. +6. Prefer runtime `.glb` or compressed runtime textures when the pipeline supports it. + +## Safety Rules + +- Do not instance `terrain` for player collision without validating `Octree.fromGraphNode` support. +- Do not replace repair-game models with optimized map models unless repair node names are preserved. +- Dispose only GPU resources created locally. Do not dispose textures or geometries owned by `useGLTF`'s cache. diff --git a/public/models/ebike/Cable 1_baseColor.png b/public/models/ebike/Cable 1_baseColor.png deleted file mode 100644 index 3245455..0000000 --- a/public/models/ebike/Cable 1_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3dfa719cde9daa39a0333c8a1b8d0bee72692c69b3bbf1da388df0deb0f4ba0e -size 16904 diff --git a/public/models/ebike/Cable 1_normal.png b/public/models/ebike/Cable 1_normal.png deleted file mode 100644 index a42b114..0000000 --- a/public/models/ebike/Cable 1_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:afc88d8cbb75c5b4e5761fc40cdb1f937beae4d8483f05ca845ab56e19f15c90 -size 3066150 diff --git a/public/models/ebike/Cable 1_occlusionRoughnessMetallic.png b/public/models/ebike/Cable 1_occlusionRoughnessMetallic.png deleted file mode 100644 index 8747c04..0000000 --- a/public/models/ebike/Cable 1_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77cf06f5e7e08653f290c353cd4c37ff91c118602436be1256280e13e52cd173 -size 353293 diff --git a/public/models/ebike/Cable2_baseColor.png b/public/models/ebike/Cable2_baseColor.png deleted file mode 100644 index 033cb1d..0000000 --- a/public/models/ebike/Cable2_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d414328fbcbd2216d6bb2f3722f4892aa9d004280772b5b2de814335c4fd8b2 -size 16905 diff --git a/public/models/ebike/Cable2_normal.png b/public/models/ebike/Cable2_normal.png deleted file mode 100644 index 3679ba1..0000000 --- a/public/models/ebike/Cable2_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd3f1dcf7d1309b3e907939fd96fcfb9740fcce0a7755aca372b72297aa17f9d -size 3033832 diff --git a/public/models/ebike/Cable2_occlusionRoughnessMetallic.png b/public/models/ebike/Cable2_occlusionRoughnessMetallic.png deleted file mode 100644 index f0c1d5f..0000000 --- a/public/models/ebike/Cable2_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:937bba888a3f821daba2aec3653bbcc3f393234d51cd604dd9341d6320c92cb2 -size 355460 diff --git a/public/models/ebike/Carroserie_baseColor.png b/public/models/ebike/Carroserie_baseColor.png deleted file mode 100644 index 0171d51..0000000 --- a/public/models/ebike/Carroserie_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:957d7b537a82fbdbf1049291af8c36431c4abd4fbd9e94381dbd49215b2b50b2 -size 16905 diff --git a/public/models/ebike/Carroserie_normal.png b/public/models/ebike/Carroserie_normal.png deleted file mode 100644 index dbdd88e..0000000 --- a/public/models/ebike/Carroserie_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c692839659b369d9694709deea005faf71e4b448d24b7bbeec9f8d1c47b94485 -size 2510257 diff --git a/public/models/ebike/Carroserie_occlusionRoughnessMetallic.png b/public/models/ebike/Carroserie_occlusionRoughnessMetallic.png deleted file mode 100644 index 05ff7d9..0000000 --- a/public/models/ebike/Carroserie_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6abf72de5fcfce9738ac6f49bc3352160b11f1af7680ae5da84266d5fb4aaa2 -size 261088 diff --git a/public/models/ebike/Ferail_baseColor.png b/public/models/ebike/Ferail_baseColor.png deleted file mode 100644 index b2e286e..0000000 --- a/public/models/ebike/Ferail_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72fc78eb3273eb8ae80c523319de0e3e69924a5f7ec15d88a6330083ccfffd8f -size 276020 diff --git a/public/models/ebike/Ferail_normal.png b/public/models/ebike/Ferail_normal.png deleted file mode 100644 index 2f2b172..0000000 --- a/public/models/ebike/Ferail_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:efb159756d206de812e300c1bc40df771b5cd2606c4d856682af5873584b7761 -size 2554815 diff --git a/public/models/ebike/Ferail_occlusionRoughnessMetallic.png b/public/models/ebike/Ferail_occlusionRoughnessMetallic.png deleted file mode 100644 index 52689a4..0000000 --- a/public/models/ebike/Ferail_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25a3b05c805e06b38fd94bb27eff7c8ae72ce4bf14fbdb15e59366ac2e1f45f1 -size 349895 diff --git a/public/models/ebike/Reservoir_baseColor.png b/public/models/ebike/Reservoir_baseColor.png deleted file mode 100644 index 7ec7dac..0000000 --- a/public/models/ebike/Reservoir_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81cda14600b32f5ab26e00d9db40924010e1beb1939c5eed0ce6386e358d3b1d -size 53203 diff --git a/public/models/ebike/Reservoir_normal.png b/public/models/ebike/Reservoir_normal.png deleted file mode 100644 index 1bfb989..0000000 --- a/public/models/ebike/Reservoir_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4702cd610157f13b0bf2c4bb04dd40489e80719e90fc7cb57f1c30f6a4cc2658 -size 2272453 diff --git a/public/models/ebike/Reservoir_occlusionRoughnessMetallic.png b/public/models/ebike/Reservoir_occlusionRoughnessMetallic.png deleted file mode 100644 index b46ab8d..0000000 --- a/public/models/ebike/Reservoir_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7aec1cadb1ffd038a54e648b875609458725c1ef652959e252afa0f03a3f7f1e -size 16902 diff --git a/public/models/ebike/Sac_baseColor.png b/public/models/ebike/Sac_baseColor.png deleted file mode 100644 index a5a1f2e..0000000 --- a/public/models/ebike/Sac_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4050254074e54089f003380521fac6e72590cd8f0b00be951dfe77bd16fe55b -size 16904 diff --git a/public/models/ebike/Sac_normal.png b/public/models/ebike/Sac_normal.png deleted file mode 100644 index be10189..0000000 --- a/public/models/ebike/Sac_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9fced262e1eb6b4dfa10bea86eaa2e8c497304fc26f055dffc03e1459588c231 -size 2343888 diff --git a/public/models/ebike/Sac_occlusionRoughnessMetallic.png b/public/models/ebike/Sac_occlusionRoughnessMetallic.png deleted file mode 100644 index 45e9c20..0000000 --- a/public/models/ebike/Sac_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c539f92a27e495d88074dc87f3cd463d66b96b7de73188957b5f6d361b1e7b95 -size 105767 diff --git a/public/models/ebike/Siege_baseColor.png b/public/models/ebike/Siege_baseColor.png deleted file mode 100644 index 77303d5..0000000 --- a/public/models/ebike/Siege_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ebe579bfb6a336e8d580323c6ac660e755836d180d5c9ba4276c11c1e44f59d -size 16904 diff --git a/public/models/ebike/Siege_normal.png b/public/models/ebike/Siege_normal.png deleted file mode 100644 index 08c1c41..0000000 --- a/public/models/ebike/Siege_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c813675da9d47425a2cac86909e98646a82c2a42b73378f7eab8a5af79f08f7e -size 2800715 diff --git a/public/models/ebike/Siege_occlusionRoughnessMetallic.png b/public/models/ebike/Siege_occlusionRoughnessMetallic.png deleted file mode 100644 index c6b768c..0000000 --- a/public/models/ebike/Siege_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a11a02281f5443ef44ec0ccb93d4ab1b4972e16e673741834acda5a3b60390c -size 308036 diff --git a/public/models/ebike/color.png b/public/models/ebike/color.png new file mode 100644 index 0000000..45d6540 --- /dev/null +++ b/public/models/ebike/color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f427aa9def171588521008b42339f804d9d7e1c9865b92ac35834ac2205d441 +size 409273 diff --git a/public/models/ebike/ebike.bin b/public/models/ebike/ebike.bin deleted file mode 100644 index 30c7a57..0000000 --- a/public/models/ebike/ebike.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed6d61d76b9acb99c87b45b497dcd0214e2f0c0eb2ab7390e3a14d0debbe26b4 -size 3865056 diff --git a/public/models/ebike/model.bin b/public/models/ebike/model.bin new file mode 100644 index 0000000..4829829 --- /dev/null +++ b/public/models/ebike/model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f476c9e9d1fa2437f83edf54d7702889b556520257fc0b5c3bec99aefdd5541 +size 3086528 diff --git a/public/models/ebike/model.gltf b/public/models/ebike/model.gltf index 90c018b..178b740 100644 --- a/public/models/ebike/model.gltf +++ b/public/models/ebike/model.gltf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c63499eef242474ceecaefcd8e242af239d63d77ef6dc854fea19ab802c6e40c -size 311438 +oid sha256:73e93ccfb92f831905c5573f5b55f92592bf3dfffde876a678ac414416b20aa0 +size 2592 diff --git a/public/models/ebike/normal.png b/public/models/ebike/normal.png new file mode 100644 index 0000000..a091c9e --- /dev/null +++ b/public/models/ebike/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1dda1b74dd9e72a248f8ff1c9e9442801a7399f913a2e239b2edce44422916e +size 695202 diff --git a/public/models/ebike/phare_baseColor.png b/public/models/ebike/phare_baseColor.png deleted file mode 100644 index 05209c8..0000000 --- a/public/models/ebike/phare_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:91c23d60933bb685bbb96bdae47672f5c7ec1a62552a56d0eeee1b22448cb66d -size 16905 diff --git a/public/models/ebike/phare_normal.png b/public/models/ebike/phare_normal.png deleted file mode 100644 index 7919b63..0000000 --- a/public/models/ebike/phare_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a4a1e9491ca5d182d658a29095d24616f7927b8084a68733f5e2eca638b0e7f -size 2905767 diff --git a/public/models/ebike/phare_occlusionRoughnessMetallic.png b/public/models/ebike/phare_occlusionRoughnessMetallic.png deleted file mode 100644 index b0edb22..0000000 --- a/public/models/ebike/phare_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:808064a2e6581764a06ead7add5c07bf3d3bd33f3fefb9d76dfe96b8fd3ec3a3 -size 76759 diff --git a/public/models/ebike/pneu_baseColor.png b/public/models/ebike/pneu_baseColor.png deleted file mode 100644 index f0070f9..0000000 --- a/public/models/ebike/pneu_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66b5bd694173370dad3acaf0b8f51fbb3430aaa8ab485b4e9edda391ceccbd89 -size 16903 diff --git a/public/models/ebike/pneu_normal.png b/public/models/ebike/pneu_normal.png deleted file mode 100644 index 36b9922..0000000 --- a/public/models/ebike/pneu_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39901ec91b5cebd09a5cd47e8113c702639cd4469c0f9163fae482f22ed259d0 -size 2906834 diff --git a/public/models/ebike/pneu_occlusionRoughnessMetallic.png b/public/models/ebike/pneu_occlusionRoughnessMetallic.png deleted file mode 100644 index 1c9776d..0000000 --- a/public/models/ebike/pneu_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e148f1d006dbbc26e4e2d846b359c6099a49ceec3fca57373293aad70709257e -size 175094 diff --git a/public/models/ebike/refroidisseur_baseColor.png b/public/models/ebike/refroidisseur_baseColor.png deleted file mode 100644 index d42ddd3..0000000 --- a/public/models/ebike/refroidisseur_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0a26f992b5a35bb17d7413706137eda6556b1efa06b166d4b304ca779a5e40a -size 16905 diff --git a/public/models/ebike/refroidisseur_normal.png b/public/models/ebike/refroidisseur_normal.png deleted file mode 100644 index 2d305a2..0000000 --- a/public/models/ebike/refroidisseur_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17af9328e0fd9ab1616a4ded1beded04ff74354c94a08353aeeaaa2c1a121088 -size 2681590 diff --git a/public/models/ebike/refroidisseur_occlusionRoughnessMetallic.png b/public/models/ebike/refroidisseur_occlusionRoughnessMetallic.png deleted file mode 100644 index 7472735..0000000 --- a/public/models/ebike/refroidisseur_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db6b826f7944bebcd541739518eb6f9c4b4fbc2039666f7e09f67c8249e4f42f -size 392559 diff --git a/public/models/ebike/resort_baseColor.png b/public/models/ebike/resort_baseColor.png deleted file mode 100644 index 15c01a0..0000000 --- a/public/models/ebike/resort_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de9b0d8cdb09ea492a643f3df39485dfa0a079c35d64ce1e9a07f96b13911f77 -size 16906 diff --git a/public/models/ebike/resort_normal.png b/public/models/ebike/resort_normal.png deleted file mode 100644 index d51da9b..0000000 --- a/public/models/ebike/resort_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51249f7261e440e355c85abc2abc453760f7a51f98e868e3132dbf6431f5b47b -size 2929670 diff --git a/public/models/ebike/resort_occlusionRoughnessMetallic.png b/public/models/ebike/resort_occlusionRoughnessMetallic.png deleted file mode 100644 index 106d8d6..0000000 --- a/public/models/ebike/resort_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a1420af59e0ebc0d2707ca3e5148f4bb621fa73daabff45b6ed723f766836e9 -size 100634 diff --git a/public/models/ecole/Panneau_baseColor.png b/public/models/ecole/Panneau_baseColor.png deleted file mode 100644 index 6a5a13d..0000000 --- a/public/models/ecole/Panneau_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ccd0b05ec597b6c659ff5839c5ea711e0f69812b5bbfe3bcae283d80524b3a2d -size 553813 diff --git a/public/models/ecole/Panneau_normal.png b/public/models/ecole/Panneau_normal.png deleted file mode 100644 index f6bc270..0000000 --- a/public/models/ecole/Panneau_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c34c69d4745aecdf3be9ecf1ac598fcc83247ad8f56dcd154b37639f997d7fa0 -size 2598855 diff --git a/public/models/ecole/Panneau_occlusionRoughnessMetallic.png b/public/models/ecole/Panneau_occlusionRoughnessMetallic.png deleted file mode 100644 index 0316814..0000000 --- a/public/models/ecole/Panneau_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90e855f9f4f329a67193ae5a72d80f958b57c51ee54bb30a9f8334e201ac0b3f -size 364876 diff --git a/public/models/ecole/color.png b/public/models/ecole/color.png new file mode 100644 index 0000000..e429381 --- /dev/null +++ b/public/models/ecole/color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b780ab89e3b5c3abbff2e391b3b9f73ce89beb6f95277c039ab96f3e4a55ff06 +size 1092715 diff --git a/public/models/ecole/ecole2.bin b/public/models/ecole/ecole2.bin deleted file mode 100644 index f5fcd05..0000000 --- a/public/models/ecole/ecole2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69ec620396ceb5440723b060af92c1420fa20c72ba2d61ba9f59d192bc7b1e11 -size 188088 diff --git a/public/models/ecole/fenetre_baseColor.png b/public/models/ecole/fenetre_baseColor.png deleted file mode 100644 index ee24397..0000000 --- a/public/models/ecole/fenetre_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68f2d77c0b477b48080e1b27ad11074c5fd23c5928ae13577a92bd4bd1ff19f7 -size 107157 diff --git a/public/models/ecole/fenetre_normal.png b/public/models/ecole/fenetre_normal.png deleted file mode 100644 index cb6a532..0000000 --- a/public/models/ecole/fenetre_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bbef2db5e7556f13115744dfbbb4520e36379810a5340603e83159e8683f58ce -size 2413075 diff --git a/public/models/ecole/fenetre_occlusionRoughnessMetallic.png b/public/models/ecole/fenetre_occlusionRoughnessMetallic.png deleted file mode 100644 index e8f138a..0000000 --- a/public/models/ecole/fenetre_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc52932715c82b80d92e7c020def7181f3f13936eaf8a4c8db35e8c20d39d078 -size 83608 diff --git a/public/models/ecole/maison_baseColor.png b/public/models/ecole/maison_baseColor.png deleted file mode 100644 index 4376b24..0000000 --- a/public/models/ecole/maison_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:550d3a896dd06ebc8e9abd668645f057dc45f0095628d209664991bc7cb8ff13 -size 794881 diff --git a/public/models/ecole/maison_normal.png b/public/models/ecole/maison_normal.png deleted file mode 100644 index 6cc1302..0000000 --- a/public/models/ecole/maison_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d123398ca52c2d4f38e15103029cc2e19f7b27fa8e2568cc3348359517cfe780 -size 3434766 diff --git a/public/models/ecole/maison_occlusionRoughnessMetallic.png b/public/models/ecole/maison_occlusionRoughnessMetallic.png deleted file mode 100644 index ed72cd8..0000000 --- a/public/models/ecole/maison_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6e8e5f141654f7cafa573f8362b33c50c53cd7e07ddaf28c4acc98f1309f6d8 -size 1065333 diff --git a/public/models/ecole/model.bin b/public/models/ecole/model.bin new file mode 100644 index 0000000..cd94e10 --- /dev/null +++ b/public/models/ecole/model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b87d09fedf8e84a66f1f81954305898639e52f98a4e76b1df5d6cc56685eaaa +size 276500 diff --git a/public/models/ecole/model.gltf b/public/models/ecole/model.gltf index 6056361..c4303b3 100644 --- a/public/models/ecole/model.gltf +++ b/public/models/ecole/model.gltf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d724bb99c0f36d0984018f4eb9f9304d02b1328a002caf3c175390d3972888b -size 22590156 +oid sha256:4bad63ebcfc99e298c275aff15230b889f43157610756becfa61ee6dd1157f93 +size 110421 diff --git a/public/models/ecole/normal.png b/public/models/ecole/normal.png new file mode 100644 index 0000000..79dd979 --- /dev/null +++ b/public/models/ecole/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:319fd68e7daaabf75a02d4e8616a8511cd9549c983c83919dc6405060b1b29d3 +size 66300 diff --git a/public/models/ecole/porte_baseColor.png b/public/models/ecole/porte_baseColor.png deleted file mode 100644 index ccdaaec..0000000 --- a/public/models/ecole/porte_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2840b14685c2e82ead9acad4048be357ce2bd4f0084ed2100cbf3244609c5cc6 -size 28307 diff --git a/public/models/ecole/porte_normal.png b/public/models/ecole/porte_normal.png deleted file mode 100644 index c482fa3..0000000 --- a/public/models/ecole/porte_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc4c48303b594a6c391c4a2d45bf7fffc5424a0b97d756af32cf45601c2816e6 -size 2477905 diff --git a/public/models/ecole/porte_occlusionRoughnessMetallic.png b/public/models/ecole/porte_occlusionRoughnessMetallic.png deleted file mode 100644 index d85ee2e..0000000 --- a/public/models/ecole/porte_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06bce47a6b2308c10bdd2cac2ada91149892e8212bc290c2f01e29bd830b97c6 -size 31863 diff --git a/public/models/ecole/tiges_baseColor.png b/public/models/ecole/tiges_baseColor.png deleted file mode 100644 index 3bb4087..0000000 --- a/public/models/ecole/tiges_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a742cb3a3643caf18d499f48a4fe1ee9c8d19aa634e1e86c9c8b23cf08169ed -size 16906 diff --git a/public/models/ecole/tiges_normal.png b/public/models/ecole/tiges_normal.png deleted file mode 100644 index 801e9cd..0000000 --- a/public/models/ecole/tiges_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bbd2c70e1e64f74362b4e59c3782ad586e05f4b10a58e8ef07736c5b23f27d47 -size 2272612 diff --git a/public/models/immeuble1/color.png b/public/models/immeuble1/color.png new file mode 100644 index 0000000..b9561f6 --- /dev/null +++ b/public/models/immeuble1/color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:627af289dfdb9d7b3a3b8a6f2b9a6ee1293c8349d3bd52e8111f33d64b86f235 +size 2648457 diff --git a/public/models/immeuble1/fenetre_baseColor.png b/public/models/immeuble1/fenetre_baseColor.png deleted file mode 100644 index e9ff418..0000000 --- a/public/models/immeuble1/fenetre_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0333ccfd6a8b93765faa75b9e4de74219c2c9aea6322d2739179d46a4a428599 -size 438684 diff --git a/public/models/immeuble1/fenetre_normal.png b/public/models/immeuble1/fenetre_normal.png deleted file mode 100644 index 2162385..0000000 --- a/public/models/immeuble1/fenetre_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec655e8917d20496f4b817e683644be638bd6ce8dda607257a7873edb974d82f -size 2152600 diff --git a/public/models/immeuble1/fenetre_occlusionRoughnessMetallic.png b/public/models/immeuble1/fenetre_occlusionRoughnessMetallic.png deleted file mode 100644 index b70c3be..0000000 --- a/public/models/immeuble1/fenetre_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6171b80ff86434c9aca5dd7432bd02124b7a794d747084512dca66ed33b1fbf4 -size 156923 diff --git a/public/models/immeuble1/immeuble1.bin b/public/models/immeuble1/immeuble1.bin deleted file mode 100644 index 818eace..0000000 --- a/public/models/immeuble1/immeuble1.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e047ba0f4242c619be71a33482914a9baa747fb53bf630facddb49d15a2bd214 -size 280656 diff --git a/public/models/immeuble1/maison_baseColor.png b/public/models/immeuble1/maison_baseColor.png deleted file mode 100644 index 1129d97..0000000 --- a/public/models/immeuble1/maison_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47a4bb98cf55e631dde6454338a21a18e8001427b605b0ef1456a438aafdfed1 -size 1342311 diff --git a/public/models/immeuble1/maison_normal.png b/public/models/immeuble1/maison_normal.png deleted file mode 100644 index 43f7096..0000000 --- a/public/models/immeuble1/maison_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d6666c7bc78a0c0d44239e831feba5c89c0b59b6a2ecd91029e15a733718267 -size 3387063 diff --git a/public/models/immeuble1/maison_occlusionRoughnessMetallic.png b/public/models/immeuble1/maison_occlusionRoughnessMetallic.png deleted file mode 100644 index d3f60a9..0000000 --- a/public/models/immeuble1/maison_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6c00c1afbaf784c4ee1fecaaa1d0ce70179151786ff4076e16ad6f85076b786c -size 847795 diff --git a/public/models/immeuble1/model.bin b/public/models/immeuble1/model.bin new file mode 100644 index 0000000..4a6408a --- /dev/null +++ b/public/models/immeuble1/model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c69ade934b8890790e8ee89ee9cc75a98ba169b46864fdf6e48d5f446e0e68df +size 453600 diff --git a/public/models/immeuble1/model.gltf b/public/models/immeuble1/model.gltf index 61bdca2..3d5a75a 100644 --- a/public/models/immeuble1/model.gltf +++ b/public/models/immeuble1/model.gltf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12038659fd8f1f307b3944dd85bb49b7dbae7d4d743ac2691cf8799ce28d2289 -size 21200262 +oid sha256:c82cd0bd2065ada46519b770c04c384a7e1a4cedec63fa4a7187b27efbe64b62 +size 28234 diff --git a/public/models/immeuble1/normal.png b/public/models/immeuble1/normal.png new file mode 100644 index 0000000..bb87a3f --- /dev/null +++ b/public/models/immeuble1/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9554f7bcdb15868ce51f69289f426354716f8c3825e870208a961aea9614f47 +size 1758943 diff --git a/public/models/immeuble1/panneau_baseColor.png b/public/models/immeuble1/panneau_baseColor.png deleted file mode 100644 index 612d3f2..0000000 --- a/public/models/immeuble1/panneau_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5395a39476a7b70e41ddbebf59ee9708ffe47ca394e335c0eef6c8d75593a545 -size 1694296 diff --git a/public/models/immeuble1/panneau_normal.png b/public/models/immeuble1/panneau_normal.png deleted file mode 100644 index f84126e..0000000 --- a/public/models/immeuble1/panneau_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f56909948a9d0a6a9cb54f0a6954a7261d3a22278a6f1898dd043c6bd8f8e076 -size 2114513 diff --git a/public/models/immeuble1/panneau_occlusionRoughnessMetallic.png b/public/models/immeuble1/panneau_occlusionRoughnessMetallic.png deleted file mode 100644 index 7f9d8a3..0000000 --- a/public/models/immeuble1/panneau_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:967588a06b49fd51fb96e13bd87371586de467a2ca4d68e83f59e58abc51f928 -size 16902 diff --git a/public/models/immeuble1/porte_baseColor.png b/public/models/immeuble1/porte_baseColor.png deleted file mode 100644 index 10a3e61..0000000 --- a/public/models/immeuble1/porte_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2fa0656f9c2b5e5d9ebf00b4fbd53367ae94e394529599dda2b3fc85bfa2dcc8 -size 18733 diff --git a/public/models/immeuble1/porte_normal.png b/public/models/immeuble1/porte_normal.png deleted file mode 100644 index 7d38fd6..0000000 --- a/public/models/immeuble1/porte_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87ad68ab55f27a0cf8e33899831521af30fbc323414df48f548532830328fd93 -size 1863657 diff --git a/public/models/immeuble1/porte_occlusionRoughnessMetallic.png b/public/models/immeuble1/porte_occlusionRoughnessMetallic.png deleted file mode 100644 index 3a0a7ca..0000000 --- a/public/models/immeuble1/porte_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e8e5ccad40ed15664a16bcb6b3668a306f51d9fec1a580797a5afd9f8f0872a2 -size 20423 diff --git a/public/models/maison1/color.png b/public/models/maison1/color.png new file mode 100644 index 0000000..5d543d7 --- /dev/null +++ b/public/models/maison1/color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b24c1299cd8f203ca1d8935c2e559de03bd96bcec0d31231ac0c2e90a6f74f74 +size 2679549 diff --git a/public/models/maison1/contours_baseColor.png b/public/models/maison1/contours_baseColor.png deleted file mode 100644 index 278ef0d..0000000 --- a/public/models/maison1/contours_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed22c250b879f0e66e30e2baf16ab290eea6c894f93e0105a45da960b26e5f21 -size 131187 diff --git a/public/models/maison1/contours_normal.png b/public/models/maison1/contours_normal.png deleted file mode 100644 index 642bd3b..0000000 --- a/public/models/maison1/contours_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c93319fc83c2304d0b09ddaea32a33c32c5405b4340348ae2c45c0177df06b75 -size 2511652 diff --git a/public/models/maison1/contours_occlusionRoughnessMetallic.png b/public/models/maison1/contours_occlusionRoughnessMetallic.png deleted file mode 100644 index 04535d6..0000000 --- a/public/models/maison1/contours_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0c8332caf3085222d4ffa4296cf454f5006605f686c750a0f6b7ca4b6ea3c6b -size 160217 diff --git a/public/models/maison1/fenetre_baseColor.png b/public/models/maison1/fenetre_baseColor.png deleted file mode 100644 index 80c71ce..0000000 --- a/public/models/maison1/fenetre_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1ba9976d7416ace83e7ae729fed9f6e012254e75616405c7a60ed9436c50205 -size 216048 diff --git a/public/models/maison1/fenetre_normal.png b/public/models/maison1/fenetre_normal.png deleted file mode 100644 index 23fdaff..0000000 --- a/public/models/maison1/fenetre_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c73191bf8151222ab91994ba282f78ca5b12cd2b3a6967e4259899802c526e62 -size 2389204 diff --git a/public/models/maison1/fenetre_occlusionRoughnessMetallic.png b/public/models/maison1/fenetre_occlusionRoughnessMetallic.png deleted file mode 100644 index eaf10e8..0000000 --- a/public/models/maison1/fenetre_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f9ed0f001f98c1f7c6549e118cfae46c2cbddfd998338c0c2f298f9cfaf55b9 -size 366670 diff --git a/public/models/maison1/maison.bin b/public/models/maison1/maison.bin deleted file mode 100644 index af0bdae..0000000 --- a/public/models/maison1/maison.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc606b94117b5aeb6ef04df7e3f314400ef6526370d1c070ca1e1f2aa0cdd31f -size 16288416 diff --git a/public/models/maison1/maison_baseColor.png b/public/models/maison1/maison_baseColor.png deleted file mode 100644 index 0c3cc07..0000000 --- a/public/models/maison1/maison_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71c03de33eda3c95e56652d86950ecbce978e6f224785e7f2bfe8bb8c462382f -size 452807 diff --git a/public/models/maison1/maison_normal.png b/public/models/maison1/maison_normal.png deleted file mode 100644 index a775c1b..0000000 --- a/public/models/maison1/maison_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06f73d59d07820ba9a7934955fb47e30066724996bb6ac138ff94733d314043c -size 2588052 diff --git a/public/models/maison1/maison_occlusionRoughnessMetallic.png b/public/models/maison1/maison_occlusionRoughnessMetallic.png deleted file mode 100644 index 39f8fd5..0000000 --- a/public/models/maison1/maison_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07db7e6bf0f396669bccd8361a4deec0b7faccc528163e8e748e7333eed530b6 -size 1043188 diff --git a/public/models/maison1/model.bin b/public/models/maison1/model.bin new file mode 100644 index 0000000..17302c6 --- /dev/null +++ b/public/models/maison1/model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d92a8b8ece4c72688d69efca91ed09d93854bab7a1b3c3e6b0b96ed25d984ce5 +size 307680 diff --git a/public/models/maison1/model.gltf b/public/models/maison1/model.gltf index 4f61689..b4d4276 100644 --- a/public/models/maison1/model.gltf +++ b/public/models/maison1/model.gltf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e21381ca52401e439a97d898358cf8d0ea62c3b6aaf45efd625c4572de89319e -size 26605137 +oid sha256:4cfe2485b5625b4a401b451fd10173faa3c59a309463a6b3e584aa91e331d81f +size 8583 diff --git a/public/models/maison1/normal.png b/public/models/maison1/normal.png new file mode 100644 index 0000000..05b82fa --- /dev/null +++ b/public/models/maison1/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6945018029e37532831c07dbfd9ea0a6b853a0f69e491ae7295fd29a3f0e626a +size 1928811 diff --git a/public/models/maison1/panneau_baseColor.png b/public/models/maison1/panneau_baseColor.png deleted file mode 100644 index 866ba7f..0000000 --- a/public/models/maison1/panneau_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:499e858e82bb910f251386f57bb751743b0a557a70383a68e5b534a8e8e30854 -size 1138223 diff --git a/public/models/maison1/panneau_normal.png b/public/models/maison1/panneau_normal.png deleted file mode 100644 index f513b6d..0000000 --- a/public/models/maison1/panneau_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e7db9b77efbfb0c62ec4924b2522babb191ec4a5e51687dc4de8971f044a8f5 -size 2487930 diff --git a/public/models/maison1/panneau_occlusionRoughnessMetallic.png b/public/models/maison1/panneau_occlusionRoughnessMetallic.png deleted file mode 100644 index 2604685..0000000 --- a/public/models/maison1/panneau_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d091dfbc9d62ae4a2bd978a66bb9efe0ad82e3cbcb9c01b07cd92cc16061ef22 -size 220552 diff --git a/public/models/maison1/porte_baseColor.png b/public/models/maison1/porte_baseColor.png deleted file mode 100644 index a134b08..0000000 --- a/public/models/maison1/porte_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73f7d6de8d7e25c3c467d3629db998700f3174f0f72c54853fb8fdb5e57e08f6 -size 75625 diff --git a/public/models/maison1/porte_normal.png b/public/models/maison1/porte_normal.png deleted file mode 100644 index 98e8af4..0000000 --- a/public/models/maison1/porte_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db6673d76ec56a40ae3cfeb5618106698e61af67640da37d3c2bdb83fae1bd62 -size 1958641 diff --git a/public/models/maison1/porte_occlusionRoughnessMetallic.png b/public/models/maison1/porte_occlusionRoughnessMetallic.png deleted file mode 100644 index 439356d..0000000 --- a/public/models/maison1/porte_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b177a895acb638a7f2afd94b33dae973d0295ca1a4ab2ae591bb570b9465185 -size 99517 diff --git a/public/models/maison1/toit_baseColor.png b/public/models/maison1/toit_baseColor.png deleted file mode 100644 index 5fafc94..0000000 --- a/public/models/maison1/toit_baseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e3ba3cf444b3f8f93c95a0152595c1aed06f29e33e2222ebc129ee264489595 -size 837804 diff --git a/public/models/maison1/toit_normal.png b/public/models/maison1/toit_normal.png deleted file mode 100644 index f711d78..0000000 --- a/public/models/maison1/toit_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0664dcc0ab1332c29cef088788981340d8244c5d6707a89a9fee25061945e021 -size 2795898 diff --git a/public/models/maison1/toit_occlusionRoughnessMetallic.png b/public/models/maison1/toit_occlusionRoughnessMetallic.png deleted file mode 100644 index 3e356ba..0000000 --- a/public/models/maison1/toit_occlusionRoughnessMetallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b4b5b1127a02b617fc739bc3736f12f4fd9cfae19aca5c4e82b4d495b1f6ea1 -size 1027685 diff --git a/public/models/panneausolaire/model.gltf b/public/models/panneausolaire/model.gltf new file mode 100644 index 0000000..002641e --- /dev/null +++ b/public/models/panneausolaire/model.gltf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ce2d53dd8eb292af843fa18beabe526c452db6e015a1e391c4945db5979c0a7 +size 5990 diff --git a/public/models/panneausolaire/panneau_baseColor.png b/public/models/panneausolaire/panneau_baseColor.png new file mode 100644 index 0000000..fbcb15c --- /dev/null +++ b/public/models/panneausolaire/panneau_baseColor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:291240525290666ce1a48bdd582632fbe16114bb43afe40cec3f9ed9fa283da2 +size 877220 diff --git a/public/models/panneausolaire/panneau_normal.png b/public/models/panneausolaire/panneau_normal.png new file mode 100644 index 0000000..2bdfa8b --- /dev/null +++ b/public/models/panneausolaire/panneau_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f36f484bda29faf64227231fccc888eadd6a76cb100004398820b368669ecec7 +size 2510158 diff --git a/public/models/ecole/tiges_occlusionRoughnessMetallic.png b/public/models/panneausolaire/panneau_occlusionRoughnessMetallic.png similarity index 100% rename from public/models/ecole/tiges_occlusionRoughnessMetallic.png rename to public/models/panneausolaire/panneau_occlusionRoughnessMetallic.png diff --git a/public/models/panneausolaire/panneausolaire.bin b/public/models/panneausolaire/panneausolaire.bin new file mode 100644 index 0000000..9b10fef --- /dev/null +++ b/public/models/panneausolaire/panneausolaire.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d00887ad0abedf4c8280c29c5d27effbfbb3a27330a61aae5f8484d6755a955 +size 93288 diff --git a/public/models/panneausolaire/poteau_baseColor.png b/public/models/panneausolaire/poteau_baseColor.png new file mode 100644 index 0000000..9832ff9 --- /dev/null +++ b/public/models/panneausolaire/poteau_baseColor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:059dd5d07b5588f5fced3d2dbec525257c04ffa8542afe6c355206603e8bcf72 +size 445627 diff --git a/public/models/panneausolaire/poteau_normal.png b/public/models/panneausolaire/poteau_normal.png new file mode 100644 index 0000000..64e00d4 --- /dev/null +++ b/public/models/panneausolaire/poteau_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3ce849aea06f3e3bba3a3e17fd6f26fa646c3ec4660d73f6d0c10a3856731e0 +size 3064096 diff --git a/public/models/panneausolaire/poteau_occlusionRoughnessMetallic.png b/public/models/panneausolaire/poteau_occlusionRoughnessMetallic.png new file mode 100644 index 0000000..22b7e21 --- /dev/null +++ b/public/models/panneausolaire/poteau_occlusionRoughnessMetallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50b6339bbfb029f8bcac8f3253d28b68d6ae4968d5171ba477d0a29c5e806192 +size 607725 diff --git a/public/sounds/effect/ebike-depart.mp3 b/public/sounds/effect/ebike-depart.mp3 new file mode 100644 index 0000000..be8d682 --- /dev/null +++ b/public/sounds/effect/ebike-depart.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6d7e15fbd0f3354918028b7c3c64d475bc43a1c04e49ddbe901ce5da4009636 +size 88980 diff --git a/public/sounds/effect/ebike-panne.mp3 b/public/sounds/effect/ebike-panne.mp3 new file mode 100644 index 0000000..b73c038 --- /dev/null +++ b/public/sounds/effect/ebike-panne.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e932bf066558e36fae41bcd7bd22f864b9e93001b7b3c2526f52bbf14957f3f2 +size 67009 diff --git a/public/sounds/effect/ebike-ralenti.mp3 b/public/sounds/effect/ebike-ralenti.mp3 new file mode 100644 index 0000000..77f8561 --- /dev/null +++ b/public/sounds/effect/ebike-ralenti.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a57ab7b73e84e50c1e8e63bf88d2b72dd0a6aa1d9211385366b9bebee8b24729 +size 87855 diff --git a/public/sounds/effect/ebike-roule.mp3 b/public/sounds/effect/ebike-roule.mp3 new file mode 100644 index 0000000..56d50bd --- /dev/null +++ b/public/sounds/effect/ebike-roule.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:251fa21bc7e750c75ceba76c2554d2f8422210eb4fc7d1c82feab1f533dad1aa +size 254127 diff --git a/public/sounds/effect/galet-eclatement.mp3 b/public/sounds/effect/galet-eclatement.mp3 new file mode 100644 index 0000000..890f8b1 --- /dev/null +++ b/public/sounds/effect/galet-eclatement.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85f3e7b9eba7e6953f003f0f111d5100a6586d6d455f52bf952e5a6b47040af8 +size 33303 diff --git a/public/sounds/effect/galet-miseenplace.mp3 b/public/sounds/effect/galet-miseenplace.mp3 new file mode 100644 index 0000000..4e1f5b7 --- /dev/null +++ b/public/sounds/effect/galet-miseenplace.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa95716082fc138a5c654a130c19dba39c91e5dc41eab637a1e04f76ff32ecad +size 40984 diff --git a/public/sounds/effect/galet-scan.mp3 b/public/sounds/effect/galet-scan.mp3 new file mode 100644 index 0000000..6c83436 --- /dev/null +++ b/public/sounds/effect/galet-scan.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02e9cf69c777347371f9c6f3d5ac3d47b5ec318b925f69851c8ca6b063bcc36b +size 106260 diff --git a/public/sounds/effect/generateur-powerdown.mp3 b/public/sounds/effect/generateur-powerdown.mp3 new file mode 100644 index 0000000..d43d2fe --- /dev/null +++ b/public/sounds/effect/generateur-powerdown.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59a0d42cb04f7b11f8d5ad83edea89946967e2798e8c2e348df8bd0abf5d216e +size 89175 diff --git a/public/sounds/effect/generateur-powerup.mp3 b/public/sounds/effect/generateur-powerup.mp3 new file mode 100644 index 0000000..0921d7b --- /dev/null +++ b/public/sounds/effect/generateur-powerup.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:049cde5639528a1eb627bd64799d39381023f85277ba37a3f3b3422bd630f3e5 +size 135092 diff --git a/public/sounds/effect/lac.mp3 b/public/sounds/effect/lac.mp3 new file mode 100644 index 0000000..2896ba5 --- /dev/null +++ b/public/sounds/effect/lac.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be20a2b013e0cfc4652c82a3d129c344222917cc1c87aabe889db915acdad849 +size 522893 diff --git a/public/sounds/effect/pas-fabrik.mp3 b/public/sounds/effect/pas-fabrik.mp3 new file mode 100644 index 0000000..fb18f38 --- /dev/null +++ b/public/sounds/effect/pas-fabrik.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d216ece017a4b80476352e1d51119161fb479ca6be418a1e03ee5b8183e3b386 +size 44818 diff --git a/public/sounds/effect/pas-gravier.mp3 b/public/sounds/effect/pas-gravier.mp3 new file mode 100644 index 0000000..6ff2fe9 --- /dev/null +++ b/public/sounds/effect/pas-gravier.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acea100b6fa75fb09b03453fe5c33277d53d6d2b9636cd03978d6e7ef165948e +size 40979 diff --git a/public/sounds/effect/reparation-alarme.mp3 b/public/sounds/effect/reparation-alarme.mp3 new file mode 100644 index 0000000..ed20b14 --- /dev/null +++ b/public/sounds/effect/reparation-alarme.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a20795d459226c41f76ee1731b094e459de9c8669519a9922077d9c3273953b8 +size 19865 diff --git a/public/sounds/effect/reparation-finie.mp3 b/public/sounds/effect/reparation-finie.mp3 new file mode 100644 index 0000000..5ce5f26 --- /dev/null +++ b/public/sounds/effect/reparation-finie.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdaf18c5e17dc5b20171505896566a87021597205525eb3f47839153d763c1fb +size 35224 diff --git a/public/sounds/effect/reparation-uiclick.mp3 b/public/sounds/effect/reparation-uiclick.mp3 new file mode 100644 index 0000000..87f9e03 --- /dev/null +++ b/public/sounds/effect/reparation-uiclick.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92e701744a21c9542f02c1d8d7664c52665e69acb974282fe4c77bad5fb85846 +size 14103 diff --git a/public/sounds/effect/talkie-bip.mp3 b/public/sounds/effect/talkie-bip.mp3 new file mode 100644 index 0000000..6cc6cb9 --- /dev/null +++ b/public/sounds/effect/talkie-bip.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb649dcb817676013038abaddf4d3bdb921db88b86b84b9bce5127b1f054d0a2 +size 12939 diff --git a/public/sounds/effect/ui-click.mp3 b/public/sounds/effect/ui-click.mp3 new file mode 100644 index 0000000..479e593 --- /dev/null +++ b/public/sounds/effect/ui-click.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b31cde808a0e6f6e4552e477256e7c4c1da1da82ca649f4aacd7aaba5a7684e7 +size 14093 diff --git a/public/sounds/musique/musique-fin.mp3 b/public/sounds/musique/musique-fin.mp3 new file mode 100644 index 0000000..36b56a1 --- /dev/null +++ b/public/sounds/musique/musique-fin.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76cdacf228c2c8ba8b66820e94d6d7237a92429d0a03a1c6590fef50e2d76945 +size 2998879 diff --git a/public/sounds/musique/musique-jeu.mp3 b/public/sounds/musique/musique-jeu.mp3 new file mode 100644 index 0000000..9955e44 --- /dev/null +++ b/public/sounds/musique/musique-jeu.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3e1598f43a86f71249855464792cf38e38ab6f35aedace1f2e655b8c855ca48 +size 2123810 diff --git a/public/sounds/musique/musique-reparation.mp3 b/public/sounds/musique/musique-reparation.mp3 new file mode 100644 index 0000000..58faa79 --- /dev/null +++ b/public/sounds/musique/musique-reparation.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3df05508dc7303b06b3b544f10b5c748ce8dbc60d6bddf44ea33c1ac5d525d10 +size 1273149 diff --git a/src/components/three/models/generated/EcoleModel.tsx b/src/components/three/models/generated/EcoleModel.tsx new file mode 100644 index 0000000..e165e79 --- /dev/null +++ b/src/components/three/models/generated/EcoleModel.tsx @@ -0,0 +1,161 @@ +import { useEffect, useRef } from "react"; +import * as THREE from "three"; +import { useGLTF } from "@react-three/drei"; +import { mergeGeometries } from "three/addons/utils/BufferGeometryUtils.js"; +import type { Vector3Tuple } from "@/types/three/three"; + +const ECOLE_MODEL_PATH = "/models/ecole/model.gltf"; + +interface EcoleModelProps { + position: Vector3Tuple; + rotation: Vector3Tuple; + scale: Vector3Tuple; + castShadow?: boolean; + receiveShadow?: boolean; + onLoaded?: () => void; +} + +interface MergedMeshData { + geometry: THREE.BufferGeometry; + material: THREE.Material | THREE.Material[]; +} + +interface GeometryGroup { + geometries: THREE.BufferGeometry[]; + material: THREE.Material | THREE.Material[]; +} + +function cloneMaterial( + material: THREE.Material | THREE.Material[], +): THREE.Material | THREE.Material[] { + return Array.isArray(material) + ? material.map((item) => item.clone()) + : material.clone(); +} + +function disposeMaterial(material: THREE.Material | THREE.Material[]): void { + if (Array.isArray(material)) { + for (const item of material) { + item.dispose(); + } + return; + } + + material.dispose(); +} + +function createGeometrySignature(geometry: THREE.BufferGeometry): string { + const attributes = Object.entries(geometry.attributes) + .map(([name, attribute]) => { + return `${name}:${attribute.itemSize}:${attribute.normalized}`; + }) + .sort() + .join("|"); + + return `${geometry.index ? "indexed" : "non-indexed"}:${attributes}`; +} + +function createMaterialKey( + material: THREE.Material | THREE.Material[], +): string { + if (Array.isArray(material)) { + return material.map((item) => item.uuid).join("|"); + } + + return material.uuid; +} + +function createMergedMeshes(scene: THREE.Group): MergedMeshData[] { + const groups = new Map(); + + scene.updateMatrixWorld(true); + scene.traverse((child) => { + if (!(child instanceof THREE.Mesh)) return; + + const geometry = child.geometry.clone(); + geometry.applyMatrix4(child.matrixWorld); + const material = child.material; + const key = `${createMaterialKey(material)}:${createGeometrySignature(geometry)}`; + const group = groups.get(key); + + if (group) { + group.geometries.push(geometry); + return; + } + + groups.set(key, { + geometries: [geometry], + material: cloneMaterial(material), + }); + }); + + return [...groups.values()].map((group) => { + if (group.geometries.length === 1) { + return { + geometry: group.geometries[0] as THREE.BufferGeometry, + material: group.material, + }; + } + + const geometry = mergeGeometries(group.geometries, false); + + for (const sourceGeometry of group.geometries) { + sourceGeometry.dispose(); + } + + return { + geometry, + material: group.material, + }; + }); +} + +export function EcoleModel({ + position, + rotation, + scale, + castShadow = true, + receiveShadow = true, + onLoaded, +}: EcoleModelProps): React.JSX.Element { + const { scene } = useGLTF(ECOLE_MODEL_PATH); + const groupRef = useRef(null); + + useEffect(() => { + const group = groupRef.current; + if (!group) return; + + const mergedMeshes = createMergedMeshes(scene); + const meshes = mergedMeshes.map((meshData) => { + const mesh = new THREE.Mesh(meshData.geometry, meshData.material); + mesh.castShadow = castShadow; + mesh.receiveShadow = receiveShadow; + return mesh; + }); + + for (const mesh of meshes) { + group.add(mesh); + } + + onLoaded?.(); + + return () => { + for (const mesh of meshes) { + group.remove(mesh); + mesh.geometry.dispose(); + disposeMaterial(mesh.material); + } + }; + }, [castShadow, onLoaded, receiveShadow, scene]); + + return ( + + ); +} + +useGLTF.preload(ECOLE_MODEL_PATH); diff --git a/src/components/three/world/SkyModel.tsx b/src/components/three/world/SkyModel.tsx index 9e37722..00be19d 100644 --- a/src/components/three/world/SkyModel.tsx +++ b/src/components/three/world/SkyModel.tsx @@ -3,10 +3,10 @@ import { useGLTF } from "@react-three/drei"; import { Component, useEffect, useMemo, useRef, type ReactNode } from "react"; import * as THREE from "three"; import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF"; -import { disposeObject3D } from "@/utils/three/dispose"; interface SkyModelProps { modelPath: string; + fallbackColor?: string | undefined; fallbackModelPath?: string | undefined; fallbackScale?: number | undefined; scale?: number | undefined; @@ -28,6 +28,7 @@ interface SkyModelErrorBoundaryState { const SKY_MODEL_SCALE = 1; const SKY_MODEL_RENDER_ORDER = -1000; +const SKYBOX_MODEL_PATH = "/models/skybox/model.gltf"; const LEGACY_SKY_MODEL_PATH = "/models/sky/model.glb"; class SkyModelErrorBoundary extends Component< @@ -53,14 +54,22 @@ class SkyModelErrorBoundary extends Component< } export function SkyModel({ + fallbackColor, fallbackModelPath, fallbackScale = SKY_MODEL_SCALE, modelPath, scale = SKY_MODEL_SCALE, }: SkyModelProps): React.JSX.Element { - const fallback = fallbackModelPath ? ( - + const colorFallback = fallbackColor ? ( + ) : null; + const fallback = fallbackModelPath ? ( + + + + ) : ( + colorFallback + ); return ( @@ -83,7 +92,7 @@ function SkyModelContent({ useEffect(() => { return () => { - disposeObject3D(model); + disposeSkyModelMaterials(model); }; }, [model]); @@ -129,5 +138,20 @@ function createSkyMaterial(material: T): T { return skyMaterial as T; } -useGLTF.preload("/models/skybox/model.gltf"); +function disposeSkyModelMaterials(model: THREE.Object3D): void { + model.traverse((object) => { + if (!(object instanceof THREE.Mesh)) return; + + if (Array.isArray(object.material)) { + for (const material of object.material) { + material.dispose(); + } + return; + } + + object.material.dispose(); + }); +} + +useGLTF.preload(SKYBOX_MODEL_PATH); useGLTF.preload(LEGACY_SKY_MODEL_PATH); diff --git a/src/components/three/world/TerrainModel.tsx b/src/components/three/world/TerrainModel.tsx index 62d10c3..34de05c 100644 --- a/src/components/three/world/TerrainModel.tsx +++ b/src/components/three/world/TerrainModel.tsx @@ -2,7 +2,6 @@ import { useEffect, useMemo, useRef } from "react"; import * as THREE from "three"; import { useGLTF } from "@react-three/drei"; import type { Vector3Tuple } from "@/types/three/three"; -import { disposeObject3D } from "@/utils/three/dispose"; const TERRAIN_MODEL_PATH = "/models/terrain/model.gltf"; const TERRAIN_DEFAULT_POSITION: Vector3Tuple = [0, 0, 0]; @@ -47,12 +46,6 @@ export function TerrainModel({ return model; }, [scene, receiveShadow]); - useEffect(() => { - return () => { - disposeObject3D(terrainModel); - }; - }, [terrainModel]); - useEffect(() => { onLoaded?.(); }, [onLoaded]); diff --git a/src/components/ui/GameSettingsMenu.tsx b/src/components/ui/GameSettingsMenu.tsx index e737bb6..8151d39 100644 --- a/src/components/ui/GameSettingsMenu.tsx +++ b/src/components/ui/GameSettingsMenu.tsx @@ -1,10 +1,12 @@ import { useEffect } from "react"; -import { X } from "lucide-react"; +import { RotateCcw, X } from "lucide-react"; +import { useGameStore } from "@/managers/stores/useGameStore"; import { useSettingsStore } from "@/managers/stores/useSettingsStore"; import type { RepairRuntime, SubtitleLanguage, } from "@/managers/stores/useSettingsStore"; +import { isDebugEnabled } from "@/utils/debug/isDebugEnabled"; function formatPercent(value: number): string { return `${Math.round(value * 100)}%`; @@ -52,6 +54,7 @@ function VolumeSlider({ } export function GameSettingsMenu(): React.JSX.Element | null { + const resetGame = useGameStore((state) => state.resetGame); const { isSettingsMenuOpen, musicVolume, @@ -93,6 +96,13 @@ export function GameSettingsMenu(): React.JSX.Element | null { window.location.assign("/"); }; + const handleRestart = (): void => { + resetGame(); + window.location.reload(); + }; + + const showDebugRestart = isDebugEnabled(); + return (
@@ -190,6 +200,17 @@ export function GameSettingsMenu(): React.JSX.Element | null {
+ {showDebugRestart ? ( + + ) : null} +