immersive2/src
Michael Mainguy 970f6fc78a Fix label positioning, add billboard mode, fix XR entry shift, and fix config system
Label Positioning Fixes:
- Fix labels accounting for mesh scaling using maximumWorld coordinates
- Labels now properly positioned on scaled objects (spheres, boxes, etc.)
- Restore world→local coordinate transformation in updateLabelPosition

Billboard Mode Implementation:
- Add configurable label rendering modes: fixed, billboard, dynamic, distance-based
- Implement billboard mode (labels always face camera using BILLBOARDMODE_Y)
- Add label rendering mode to AppConfig with default 'billboard'
- Add UI selector in ConfigModal for label rendering mode
- Observable pattern updates all existing labels when mode changes

XR Entry Positioning Fix:
- Synchronize desktop camera position to platform before entering XR
- Transfer camera world position and rotation to prevent scene shift
- Reset physics velocity on XR entry to prevent drift
- Add debug logging for position synchronization

Config System Architecture Fix:
- Create singleton appConfigInstance to ensure single source of truth
- Update DiagramObject to use singleton instead of creating instances
- Update DiagramManager to use singleton
- Fix ConfigModal to update AppConfig directly (was only updating legacy config)
- ConfigModal now triggers Observable notifications via appConfigInstance setters
- Maintain legacy config for backward compatibility
- Fixes issue where label rendering mode changes didn't take effect

Files Modified:
- src/diagram/diagramObject.ts - Label positioning, billboard mode, singleton config
- src/diagram/diagramManager.ts - Use singleton config
- src/util/appConfig.ts - Add labelRenderingMode, export singleton
- src/util/appConfigType.ts - Add LabelRenderingMode type
- src/react/pages/configModal.tsx - Update AppConfig directly, add label mode UI
- src/util/functions/groundMeshObserver.ts - Add camera position sync on XR entry
- public/api/user/features - Update test config
- package.json - Version bump

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 08:52:04 -06:00
..
controllers Implement Virtual Stick scaling with modular ResizeGizmo architecture 2025-11-16 11:43:17 -06:00
diagram Fix label positioning, add billboard mode, fix XR entry shift, and fix config system 2025-11-18 08:52:04 -06:00
gizmos Adjust ResizeGizmo handle appearance and sizing 2025-11-18 04:57:22 -06:00
information Removed dead code. 2024-08-30 12:43:19 -05:00
integration Implement WebXR resize gizmo with virtual stick scaling and extract adapter to integration layer 2025-11-13 17:52:23 -06:00
maps added row level AES encryption. 2024-06-10 15:52:45 -05:00
menus Implement WebXR resize gizmo with virtual stick scaling and extract adapter to integration layer 2025-11-13 17:52:23 -06:00
objects Convert to unlit rendering and fix connection update error 2025-11-12 21:16:29 -06:00
react Fix label positioning, add billboard mode, fix XR entry shift, and fix config system 2025-11-18 08:52:04 -06:00
toolbox Implement WebXR resize gizmo with virtual stick scaling and extract adapter to integration layer 2025-11-13 17:52:23 -06:00
tutorial Removed html renderer, too may problems. 2024-06-06 09:22:39 -05:00
users Added websocket presence. 2024-06-14 09:38:16 -05:00
util Fix label positioning, add billboard mode, fix XR entry shift, and fix config system 2025-11-18 08:52:04 -06:00
visualization experiments with glb objects and data based diagrams. 2023-12-23 06:21:58 -06:00
vrcore Fix initialization errors when navigating to db/public/local 2025-09-15 16:25:15 -05:00
defaultScene.ts Add face handles and transform tracking to ResizeGizmo 2025-11-17 17:06:32 -06:00
env.d.ts Simplified interactions, changed menu interactions for changing entities. 2024-04-10 16:36:36 -05:00
vrApp.ts Fix initialization errors when navigating to db/public/local 2025-09-15 16:25:15 -05:00
webApp.ts Updated UI to use Mantine. 2024-08-30 12:43:19 -05:00