20 Commits

Author SHA1 Message Date
Tom Boullay a30a9a2d29 fix(handtracking): absorb React StrictMode double-mount
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
In dev, <StrictMode> intentionally mounts → unmounts → remounts each
effect to surface non-idempotent code. The hand tracking hooks were
calling getUserMedia and creating MediaPipe / WebSocket runtimes on
every mount, which in practice ran the full start/stop/start cycle
inside a few milliseconds and pushed WebGL over its limit on top
of the loaded scene → context lost.

Add HAND_TRACKING_RUNTIME_START_DELAY_MS (80ms) and delay the actual
start() call behind a setTimeout in both useBrowserHandTracking and
useRemoteHandTracking. The cleanup clears the timer, so a fast
mount/unmount never reaches start(). 80ms is invisible to the user
(<5 frames at 60fps) and also absorbs rapid `nearby` toggles at
trigger borders.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:54:28 +02:00
Tom Boullay d217c3376b fix(handtracking): reduce GPU pressure on WebGL context loss
Several mitigations against the WebGL context lost that fires when
hand tracking starts on a loaded scene:

- Canvas: fixed DPR [1,1], antialias off, scoped id="game-canvas",
  context-lost handler releases MediaPipe and logs GPU memory counters
- optimizeGLTFScene: cap anisotropy at 2 and stop forcing mipmaps /
  needsUpdate on every pass — avoids massive texture re-uploads
- MediaPipe: force CPU delegate (HAND_TRACKING_BROWSER_DELEGATE),
  cache the landmarker instance, and expose releaseBrowserHandLandmarker
- useBrowserHandTracking / useRemoteHandTracking: idempotent cleanup
  guarded by a cleanedUp flag, try/catch around the detect loop, and
  release of the landmarker on stop
- World: mount HandTrackingGlove only when the matching hand is
  actually present in the snapshot (status connected + hands.length > 0)
- HandTrackingGlove: drop the eager useGLTF.preload that was running
  at startup whether or not hand tracking was used

Does not yet absorb the React StrictMode double-mount — that is the
follow-up commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:48:39 +02:00
Tom Boullay 864e075b42 chore(debug): keep hand tracking source controller display in sync
Store the lil-gui Source controller so setHandTrackingSource() from
the settings menu can refresh its display, and log the transition
for traceability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:34:05 +02:00
Tom Boullay 3fe5b32de2 fix(player): scope pointer lock and ground snap to game scene
PointerLockControls now targets #game-canvas and respects the
settings menu, and document.exitPointerLock() only runs when a
pointer lock is actually active. The terrain ground snap in
PlayerController is gated on sceneMode === "game" so it doesn't
fight the physics test scene's flat floor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:33:54 +02:00
Tom Boullay 72cb9f5be6 update: ebike model 2026-06-02 16:33:42 +02:00
Tom Boullay f708c4cd2e chore(debug): tune physics test scene and drop noisy waypoint logs
Lower grabbable spawn, expose GPS preview position/rotation as
constants, fix physics spawn to use PLAYER_EYE_HEIGHT, and silence
the console.log noise around waypoint loading in TestMap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:33:39 +02:00
Tom Boullay c61760dafd docs: document webgl context lost investigation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 16:02:58 +02:00
Tom Boullay 18dd2ae49d fix(electricienne): remove alphaMode BLEND + doubleSided causing face artifacts
Solid character mesh does not need transparency; BLEND combined with doubleSided
caused depth-sort issues rendering inside-faces over front-faces (visible as
triangular orange artifacts on the face). Default OPAQUE single-sided is correct.
2026-06-02 15:36:43 +02:00
Tom Boullay def0609383 chore(talkie): consolidate to single GLB, remove orphan LOD assets
- Replace public/models/talkie/* (PNG textures + .bin + .gltf) with single model.glb
- Delete unused public/models/talkie-LOD/ folder (no longer referenced in MAP_LOD_MODEL_PATHS)
- Remove farm-radio-distractor (talkie) from farm repair mission distractors
2026-06-02 15:36:20 +02:00
Tom Boullay 19a1d20a97 fix(repair): remove talkie LOD + drop talkie distractor from ebike
- Talkie does not need a LOD swap; remove the entry from
  MAP_LOD_MODEL_PATHS so the same model.glb is used at any distance.
- The ebike repair distractors are meant to be other disassembled bike
  parts, not random props. Drop the talkie radio distractor and keep
  only the (thematically plausible) insulation glove alongside the
  correct cooling core replacement.
2026-06-02 15:27:30 +02:00
Tom Boullay 49ebacfbfb chore(talkie): point full-detail talkie path at model.glb
The talkie folder now ships a single binary GLB; update the four call
sites (TalkieModel, gallery, two repair mission entries) to load
model.glb. The talkie-LOD path is unchanged.
2026-06-02 15:06:44 +02:00
Tom Boullay 68253fae41 Update lightingConfig.ts
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
2026-06-02 14:52:54 +02:00
Tom Boullay 2dabb73d3d fix(vegetation): scale-correct sapin and buisson LOD meshes
The exported sapin-LOD and buisson-LOD models do not match their full
detail counterpart's baseline scale, so they appear oversized once the
LOD swap kicks in. Add MAP_LOD_SCALE_MULTIPLIERS keyed by map name
(sapin: 0.5, buisson: 0.8) and apply it on top of the chunk's existing
scaleMultiplier whenever the resolved model path is the LOD variant.
2026-06-02 14:50:07 +02:00
Tom Boullay 4f1b3b4ff3 fix(graphics): tune presets, single-line ui, vegetation LOD by nearest instance
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
- Bump high to 30m chunk / HD<20m and ultra to HD<30m so HD models
  persist further before swapping.
- Render the 5 graphics preset cards on a single row.
- Vegetation LOD selection now uses the distance to the nearest instance
  in each chunk instead of the chunk centre, matching MapInstancingSystem
  and avoiding premature LOD swaps when the camera enters a chunk.
2026-06-02 14:33:16 +02:00
Tom Boullay 627c8d4eb9 feat(vegetation): wire arbre/sapin/buisson into LOD system
Register the three new vegetation LOD models in MAP_LOD_MODEL_PATHS and
extend VegetationSystem with per-chunk distance-based LOD selection
(mirroring MapInstancingSystem). Chunk model paths are re-evaluated on
the existing CHUNK_CONFIG.updateInterval cadence and Suspense keys
include the resolved path so a swap unmounts the previous instanced mesh
cleanly.
2026-06-02 14:17:19 +02:00
Tom Boullay 0b801888f0 update: fix name assets + add LOD 2026-06-02 14:13:55 +02:00
Tom Boullay a180b89ee6 fix(pylone): convert lampe BLEND to MASK in GLTFs
Switching alphaMode from BLEND to MASK with a 0.5 cutoff lets the lampe
material participate in instanced shadow rendering correctly. BLEND is
known to interact badly with InstancedMesh shadow casting, producing
incorrect or missing shadows on the pylone lampe.
2026-06-02 13:52:08 +02:00
Tom Boullay 3e66e31117 feat(graphics): add max preset (no chunk streaming, LOD@50m)
Restore ultra to its original behaviour (50m chunk streaming, HD within
20m, no fog) and introduce a new max preset that disables chunk streaming
entirely (loads all chunks unconditionally) and pushes the HD/LOD swap
distance to 50m. Add chunkStreamingEnabled flag to GraphicsPresetConfig
so the streaming gate honours the preset. The settings card label shows
'All' when streaming is off.
2026-06-02 13:51:33 +02:00
Tom Boullay 2c194cdd2e fix: use player ebike speed
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
2026-06-02 09:48:44 +02:00
Tom Boullay feaf502e44 feat: support webm mission notifications 2026-06-02 09:40:18 +02:00
248 changed files with 859 additions and 716 deletions
@@ -0,0 +1,367 @@
# WebGL Context Lost - Investigation
## Résumé court
Le projet subit des pertes de contexte WebGL pendant les phases où le jeu active
ou prépare le hand tracking, les interactions physiques ou le repair game.
Le symptôme visible côté console est :
```txt
THREE.WebGLRenderer: Context Lost.
[ERROR] [WebGL] Context lost - attempting auto-restore
THREE.WebGLRenderer: Context Restored.
```
Le problème est bloquant parce que le hand tracking et le repair game sont au
coeur de l'expérience. Quand le contexte WebGL saute, la scène Three.js peut se
remonter, le joueur peut revenir au spawn, le pointer lock peut être perdu, et
les tests de gameplay deviennent instables.
## Ce qui fonctionne aujourd'hui
La page principale monte un `<Canvas>` React Three Fiber dans
`src/pages/page.tsx`.
`src/world/World.tsx` compose ensuite :
- la scène de jeu ou la scène de test physique ;
- le player ;
- les systèmes visuels de monde ;
- les gants de hand tracking ;
- les systèmes de debug.
Le hand tracking est centralisé dans
`src/providers/gameplay/HandTrackingProvider.tsx`.
Il peut utiliser deux sources :
- `browser` : MediaPipe JS dans le navigateur ;
- `backend` : backend Python local via WebSocket.
L'activation est déclenchée par :
- certaines étapes du repair game ;
- les zones d'interaction qui demandent explicitement les mains ;
- la scène Physique en debug, selon les objets présents.
## Problème observé
Les context lost arrivent dans plusieurs situations :
- entrée dans une zone d'interaction ;
- lancement du hand tracking ;
- lancement d'un repair game ;
- scène Physique avec `TestMap`, `Physics`, `AnimatedModel`, waypoints GPS et
objets interactifs ;
- source browser JS ;
- source backend.
Le fait que le crash existe avec les deux sources indique que le problème n'est
probablement pas limité au backend Python ni à MediaPipe JS seul. Le hand
tracking semble être un déclencheur fort, mais il arrive au moment où plusieurs
ressources GPU et systèmes runtime se réveillent ensemble.
## Pourquoi c'est bloquant
Ce bug bloque la feature principale du projet :
- le repair game dépend du hand tracking pour valider certaines actions ;
- les interactions main sont nécessaires pour tester les objets grabbables ;
- un context lost casse la continuité du gameplay ;
- le joueur peut être replacé au spawn après reconstruction ;
- le pointer lock peut être perdu ;
- les logs deviennent difficiles à lire parce que le jeu tente de restaurer la
scène en boucle ;
- le comportement n'est pas fiable pour une démo ou un déploiement.
Tant que ce problème n'est pas stable, on ne peut pas valider correctement :
- la mission e-bike ;
- la mission pylône ;
- la mission ferme ;
- les interactions main ;
- le switch browser/backend ;
- le comportement en build de production.
## Hypothèses principales
### 1. Pression GPU au lancement du hand tracking
MediaPipe browser peut créer ses propres ressources GPU. Si Three.js charge
déjà beaucoup de géométries, textures, ombres et modèles, l'ajout du hand
tracking peut faire passer le navigateur au-dessus d'une limite GPU.
Le stash contient une tentative de mitigation en forçant MediaPipe browser et le
backend à utiliser le CPU.
### 2. Activation trop brusque du runtime mains
Les logs montrent des transitions rapides :
```txt
Browser JS runtime starting
Runtime source selected
Runtime snapshot changed
Browser JS runtime stopped
Browser JS runtime starting
```
Ce type de start/stop rapide peut provoquer :
- création webcam ;
- création MediaPipe ;
- montage des gants ;
- update du state React ;
- re-render du monde ;
- stress GPU au même moment.
### 3. Les gants 3D sont montés trop tôt
Si les gants de hand tracking sont montés avant d'avoir de vraies mains
détectées, le jeu charge et prépare des modèles GPU sans utilité immédiate.
Le stash contient une tentative pour ne rendre les gants que lorsqu'une main
existe réellement dans le snapshot.
### 4. Re-upload textures / GLTF trop agressif
`src/utils/three/optimizeGLTFScene.ts` modifie des textures GLTF. Si cette
optimisation force trop souvent `needsUpdate`, mipmaps ou anisotropy, le
navigateur peut recharger beaucoup de textures vers le GPU.
Le stash limite cette pression en évitant de forcer les mipmaps et en abaissant
l'anisotropy.
### 5. Permission caméra au mauvais moment
Demander la caméra au moment exact où le joueur entre dans une interaction ou
lance le repair game ajoute un gros événement runtime au pire moment.
Le stash contient une tentative de warmup caméra pour obtenir la permission plus
tôt et réutiliser le stream au moment où le hand tracking devient nécessaire.
### 6. La scène Physique ajoute du bruit
La scène Physique est une scène de test volontairement riche :
- `Physics` Rapier ;
- `GrabbableObject` ;
- `TriggerObject` ;
- `RepairGame` ;
- `AnimatedModel` ;
- GPS preview ;
- waypoints verts ;
- player ;
- debug overlay.
Cette richesse est normale pour une scène de test, mais elle complique
l'investigation parce qu'elle active beaucoup de systèmes à la fois.
## Fichiers modifiés dans le stash
Le stash `stash@{0}` contient 28 fichiers modifiés, environ `+530 / -152`.
Il ne contient pas de fichiers untracked.
| Fichier | Rôle dans l'investigation |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `README.md` | Note sur les commandes backend depuis la racine du repo. |
| `backend/README.md` | Documentation plus claire pour lancer le backend et réparer un `.venv` cassé. |
| `backend/hand_tracker.py` | Force le backend MediaPipe en CPU. |
| `docs/user/main-feature.md` | Ajustements de documentation utilisateur. |
| `public/sounds/dialogue/subtitles/fr/electricienne.srt` | Ajustements de sous-titres, pas central pour le context lost. |
| `public/sounds/dialogue/subtitles/fr/narrateur.srt` | Ajustements de sous-titres, pas central pour le context lost. |
| `src/components/debug/DebugPlayerModel.tsx` | Ajustements de modèle debug player. |
| `src/components/three/handTracking/HandTrackingGlove.tsx` | Retire le preload automatique des gants pour réduire la pression GPU. |
| `src/components/three/interaction/GrabbableObject.tsx` | Marque les grabbables qui nécessitent vraiment le hand tracking. |
| `src/components/three/interaction/InteractableObject.tsx` | Ajoute le flag `handTracking` aux interactables. |
| `src/data/debug/testSceneConfig.ts` | Stabilise la scène Physique : sol, GPS, hauteur des waypoints. |
| `src/data/handTrackingConfig.ts` | Ajoute délai d'activation, TTL warmup caméra, delegate CPU browser. |
| `src/data/player/playerConfig.ts` | Corrige le spawn Physique avec `PLAYER_EYE_HEIGHT`. |
| `src/hooks/debug/useSceneMode.ts` | Force `game` hors debug actif pour éviter des scènes debug en prod. |
| `src/hooks/handTracking/useBothFistsHold.ts` | Sort le hold des deux poings de `useFrame` R3F vers `requestAnimationFrame`. |
| `src/hooks/handTracking/useBrowserHandTracking.ts` | Encadre `detectForVideo`, release MediaPipe en cleanup, gère les erreurs. |
| `src/hooks/three/useTerrainHeight.ts` | Ajustements terrain, liés au snap/player. |
| `src/lib/handTracking/browserHandTracking.ts` | Force delegate CPU, garde une instance MediaPipe, ajoute `releaseBrowserHandLandmarker`. |
| `src/lib/handTracking/handTrackingSession.ts` | Ajoute warmup caméra, cache stream, timeout et consommation du stream préparé. |
| `src/managers/InteractionManager.ts` | Ajoute `handTrackingNearby` pour ne pas activer les mains sur toute interaction. |
| `src/pages/page.tsx` | Gestion WebGL context lost/restored, DPR fixe, antialias off, release MediaPipe au crash. |
| `src/providers/gameplay/HandTrackingProvider.tsx` | Ajoute activation différée, snapshot queued, warmup runtime. |
| `src/types/interaction/interaction.ts` | Ajoute `handTracking` et `handTrackingNearby` aux types interaction. |
| `src/utils/debug/Debug.ts` | Synchronise l'affichage du controller hand tracking source. |
| `src/utils/three/optimizeGLTFScene.ts` | Réduit la pression GPU des textures GLTF. |
| `src/world/World.tsx` | Ne rend les gants que si une main correspondante est détectée. |
| `src/world/debug/TestMap.tsx` | Nettoie les logs, stabilise waypoints/GPS/scène Physique. |
| `src/world/player/PlayerCamera.tsx` | Ajustements pointer lock/canvas ciblé. |
## Fichiers actuellement modifiés dans le worktree
Etat observé au moment de cette note :
| Fichier | Statut |
| --------------------------------------------------------- | --------------------------------------------------------- |
| `public/models/talkie/*` | Beaucoup d'anciennes textures/fichiers `.gltf` supprimés. |
| `public/models/talkie/model.glb` | Nouveau fichier non suivi. |
| `src/components/three/handTracking/HandTrackingGlove.tsx` | Modifié. |
| `src/data/debug/testSceneConfig.ts` | Modifié. |
| `src/data/gameplay/repairMissions.ts` | Modifié. |
| `src/data/handTrackingConfig.ts` | Modifié. |
| `src/data/player/playerConfig.ts` | Modifié. |
| `src/data/world/mapLodConfig.ts` | Modifié. |
| `src/hooks/handTracking/useBrowserHandTracking.ts` | Modifié. |
| `src/hooks/handTracking/useRemoteHandTracking.ts` | Modifié. |
| `src/lib/handTracking/browserHandTracking.ts` | Modifié. |
| `src/lib/handTracking/handTrackingSession.ts` | Modifié. |
| `src/pages/page.tsx` | Modifié. |
| `src/providers/gameplay/HandTrackingProvider.tsx` | Modifié. |
| `src/utils/debug/Debug.ts` | Modifié. |
| `src/utils/three/optimizeGLTFScene.ts` | Modifié. |
| `src/world/World.tsx` | Modifié. |
| `src/world/debug/TestMap.tsx` | Modifié. |
| `src/world/player/Player.tsx` | Modifié. |
| `src/world/player/PlayerCamera.tsx` | Modifié. |
| `src/world/player/PlayerController.tsx` | Modifié. |
| `src/components/ui/RuntimeLoadingIndicator.tsx` | Nouveau fichier non suivi. |
| `src/hooks/handTracking/useHandTrackingRuntimeWarmup.ts` | Nouveau fichier non suivi. |
| `src/world/player/playerRuntimeSnapshot.ts` | Nouveau fichier non suivi. |
Attention : les fichiers supprimés/nouveaux du talkie semblent être un sujet
séparé du context lost. Il faut les garder séparés dans les commits.
## Fichiers directement impactés par le bug
### Canvas et WebGL
- `src/pages/page.tsx`
- `src/world/World.tsx`
- `src/utils/three/optimizeGLTFScene.ts`
Ces fichiers influencent directement la charge GPU, la configuration du canvas,
les ressources GLTF et le comportement au context lost/restored.
### Hand tracking
- `src/providers/gameplay/HandTrackingProvider.tsx`
- `src/hooks/handTracking/useBrowserHandTracking.ts`
- `src/hooks/handTracking/useRemoteHandTracking.ts`
- `src/hooks/handTracking/useBothFistsHold.ts`
- `src/hooks/handTracking/useHandTrackingRuntimeWarmup.ts`
- `src/lib/handTracking/browserHandTracking.ts`
- `src/lib/handTracking/handTrackingSession.ts`
- `src/data/handTrackingConfig.ts`
- `src/components/three/handTracking/HandTrackingGlove.tsx`
- `backend/hand_tracker.py`
Ces fichiers contrôlent le déclenchement, la source, la caméra, MediaPipe, le
backend et le rendu visuel des mains.
### Interactions et repair game
- `src/components/three/interaction/GrabbableObject.tsx`
- `src/components/three/interaction/InteractableObject.tsx`
- `src/managers/InteractionManager.ts`
- `src/types/interaction/interaction.ts`
- `src/components/three/gameplay/RepairGame.tsx`
- `src/hooks/gameplay/useRepairMissionStep.ts`
- `src/hooks/gameplay/useRepairMovementLocked.ts`
Ces fichiers sont impactés parce que l'entrée dans une zone ou une étape repair
peut déclencher le hand tracking.
### Player et restauration après crash
- `src/world/player/Player.tsx`
- `src/world/player/PlayerCamera.tsx`
- `src/world/player/PlayerController.tsx`
- `src/world/player/playerRuntimeSnapshot.ts`
- `src/data/player/playerConfig.ts`
Ces fichiers influencent le spawn, la caméra, le pointer lock, et la possibilité
de récupérer la dernière position après un context lost.
### Scène Physique / debug
- `src/world/debug/TestMap.tsx`
- `src/data/debug/testSceneConfig.ts`
- `src/components/debug/DebugPlayerModel.tsx`
- `src/hooks/debug/useSceneMode.ts`
- `src/utils/debug/Debug.ts`
Ces fichiers ne sont pas forcément la cause racine, mais ils créent une scène de
stress utile pour reproduire le bug.
## Ce que le stash essayait de corriger
Le stash essaye de réduire le risque de context lost avec plusieurs leviers :
1. passer MediaPipe browser/backend en CPU ;
2. libérer MediaPipe quand le runtime s'arrête ou quand WebGL saute ;
3. éviter de monter les gants sans mains détectées ;
4. retarder l'activation du hand tracking pour éviter les start/stop violents ;
5. demander la caméra plus tôt et réutiliser le stream ;
6. réduire la charge GPU du canvas avec DPR fixe et antialias off ;
7. limiter les re-uploads de textures GLTF ;
8. distinguer les interactions qui demandent vraiment le hand tracking ;
9. restaurer WebGL avec une limite pour éviter les boucles infinies ;
10. conserver la position du joueur après restauration.
## Ce qui reste à prouver
Il faut encore isoler le déclencheur exact :
- crash avec hand tracking désactivé complètement ;
- crash avec source browser JS seulement ;
- crash avec source backend seulement ;
- crash avec gants 3D désactivés ;
- crash avec MediaPipe CPU ;
- crash avec `AnimatedModel` de TestMap désactivé ;
- crash avec GPS preview/waypoints désactivés ;
- crash avec shadows/antialias/DPR réduits ;
- crash en scène game réelle, pas seulement scène Physique.
## Plan d'investigation recommandé
1. Stabiliser le worktree et ne pas mélanger assets talkie, LOD, docs backend et
context lost dans le même commit.
2. Garder le stash tant que le fix final n'est pas validé.
3. Créer un commit ou patch isolé pour les logs context lost seulement.
4. Ajouter un switch debug qui permet de couper séparément :
- hand tracking runtime ;
- gants 3D ;
- MediaPipe browser ;
- backend ;
- GPS preview ;
- AnimatedModel de TestMap.
5. Reproduire le bug avec une matrice claire.
6. Garder les changements qui diminuent réellement les context lost.
7. Supprimer les logs temporaires une fois le diagnostic terminé.
## Recommandation Git
Ne pas supprimer le stash maintenant.
Il contient du travail réel sur le context lost. Même s'il n'est pas parfait, il
sert de trace d'investigation et contient des morceaux utiles.
Avant de le supprimer, sauvegarder le patch :
```bash
git stash show -p stash@{0} > context-lost-stash.patch
```
Ensuite seulement, si tout a été repris dans des commits propres :
```bash
git stash drop stash@{0}
```
## Commits logiques proposés
Séparer en plusieurs commits pour éviter un gros commit illisible :
1. `docs: document webgl context lost investigation`
2. `fix: reduce handtracking gpu pressure`
3. `fix: delay handtracking activation`
4. `fix: preserve player state after webgl restore`
5. `fix: stabilize physics debug scene`
6. `docs: clarify backend handtracking setup`
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More