Commit Graph

65 Commits

Author SHA1 Message Date
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
c1503d959e Add configurable feature management system with JSON-based feature flags
Implement comprehensive feature toggle system allowing menu options and features
to be controlled via JSON configuration fetched from API endpoint or static files.

Core System:
- Create FeatureConfig type system with page, feature, and limit-based flags
- Add React Context (FeatureProvider) that fetches from /api/user/features
- Implement custom hooks (useFeatures, useIsFeatureEnabled, useFeatureLimit, etc.)
- Default config disables everything except home page

Integration:
- Update PageHeader to filter menu items based on page flags
- Add ProtectedRoute component to guard routes
- Update VR menu to conditionally render items based on feature flags
- Update CreateDiagramModal to enable/disable options (private, encrypted, invite)
- Update ManageDiagramsModal to use configurable maxDiagrams limit

Configuration Files:
- Add static JSON files for local testing (none, free, basic, pro tiers)
- Add dev proxy for /api/user/features endpoint
- Include README with testing instructions

Updates:
- Complete CLAUDE.md naming conventions section
- Version bump to 0.0.8-27

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 06:52:39 -06:00
cdf59db5b6 Updated config page. 2024-08-30 14:56:13 -05:00
4f39030ed4 Disabled service worker, enhanced management console. 2024-08-30 12:43:19 -05:00
2397ddcd4c Updated UI to use Mantine. 2024-08-30 12:43:19 -05:00
afdf765a8f Forgot arrow image. 2024-08-23 10:27:41 -05:00
2486107041 updated linting warnings, removed unused variables. 2024-08-03 19:16:32 -05:00
a07b53f2a7 refactored web interface, updated image update code. 2024-08-03 19:12:32 -05:00
e0d85a6a3d Added stl person to toolbox. 2024-06-17 11:33:24 -05:00
4e1436b0cc Added smart versioning 2024-06-11 17:00:16 -05:00
cf278fed3a Added smart versioning 2024-06-11 16:58:35 -05:00
2d1a3ba5d6 added row level AES encryption. 2024-06-10 18:22:17 -05:00
3d3f73c259 added row level AES encryption. 2024-06-10 15:52:45 -05:00
d6941fd1bf added view only flag. 2024-06-07 09:21:18 -05:00
e405dc1598 added prod sourcemaps. 2024-06-06 10:16:49 -05:00
7561a06b69 Created new interactive scaling menu. 2024-06-01 09:28:21 -05:00
2872026ac9 Upated babylonjs version, added map, camera, camerawindow. 2024-05-21 06:34:48 -05:00
4c26dca6c5 updated web styles. 2024-05-10 13:33:30 -05:00
15fdb938ee Added SW cache clear mechanism. 2024-05-08 09:17:06 -05:00
bbe54dc3e3 Added background noise. Refactor customEnvironment.ts 2024-05-08 07:55:42 -05:00
3ade3d4d6a Slight simplification refactor (no functional change) 2024-05-07 19:33:06 -05:00
24ae4aad41 Updated icon 2024-05-07 10:29:47 -05:00
ae3a94b8d4 Updated icon 2024-05-07 10:01:10 -05:00
735bd4bb2f updated service worker. 2024-05-07 09:49:58 -05:00
41aeceed69 updated service worker. 2024-05-07 09:40:08 -05:00
5a1c86a0dd updated service worker. 2024-05-07 09:33:04 -05:00
7ccca76119 updated service worker. 2024-05-07 09:20:38 -05:00
2debefd556 updated manifest.webmanifest and images. 2024-05-07 08:06:24 -05:00
c86ed5e9a0 resized images 2024-05-07 07:54:59 -05:00
ce9316d20a resized images 2024-05-07 07:46:59 -05:00
d82df88296 Added Image upload component. 2024-04-29 13:39:05 -05:00
0e4d815225 Added Metadata sync for friendly name 2024-04-27 06:50:04 -05:00
e2d251e8b7 Updated manifest.webmanifest 2024-04-15 08:48:03 -05:00
c6e52138b3 changed main menu order and behavior, updated text node handling, refactored logging from console.log. 2024-04-13 11:34:25 -05:00
73dae9c1cd Re added quest link. 2024-04-02 14:19:27 -05:00
1413a0bda9 Added scale menu button and screen shots. 2024-02-12 09:33:57 -06:00
618c0013ee split out react UI 2024-02-06 15:11:29 -06:00
2ef5379a3b Added 3d closet demo, cleaned up menus. 2024-02-02 15:36:47 -06:00
cdc47f8ac9 Refactor fly/walk mode. 2024-01-15 11:03:07 -06:00
a1adbf5bd9 experiments with glb objects and data based diagrams. 2023-12-23 06:21:58 -06:00
dcd5a8835c Added glb object type loader, cleaned up loggers and change web controller. 2023-12-12 14:00:39 -06:00
4c45ac5ef0 Added netlify _redirects 2023-12-12 07:11:07 -06:00
7d5ef80b5b Updated initial camera position, fixed initial demo. 2023-12-11 10:14:46 -06:00
1c64569d9a Added some textures. 2023-10-12 14:01:09 -05:00
ed26d36941 Added some textures. 2023-10-12 10:59:33 -05:00
31b87e26ae Added uniforms. 2023-09-20 08:36:52 -05:00
f8259670e7 Soccer Components. 2023-09-19 07:21:25 -05:00
1e65773869 Soccer Components. 2023-09-19 07:21:14 -05:00
dd82962260 Network handler code. 2023-09-05 06:48:55 -05:00
6f70e4dfba Forgot new textures. 2023-08-26 09:46:40 -05:00