Commit Graph

71 Commits

Author SHA1 Message Date
0e053bf69c Add Quest VR onboarding flow with auto-entry prompt
Implemented comprehensive VR onboarding experience for Quest users:

- Add demo database template with pre-built architecture diagram
- Implement automatic demo template loading on first visit
- Create VREntryPrompt component for seamless VR mode entry
- Add device detection utilities for Quest/VR headset identification
- Integrate export/import functionality for diagram templates
- Add About page with device-aware CTA and VR benefits
- Remove legacy tutorial and FirstVisitVr modal for demo flow
- Add upgrade prompts and tiered feature configuration

Quest users now see prominent VR entry prompt when navigating to /db/** paths,
providing one-tap entry into immersive mode after scene initialization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 10:47:28 -06:00
25963d5289 version bump 2025-11-19 13:35:40 -06:00
c66da87401 Migrate from legacy config to new AppConfig singleton system
Remove dual config system and migrate all code to use appConfigInstance.

**Phase 1: Update VR Controller Code**
- snapAll.ts: Replace getAppConfig() with appConfigInstance.current
  - Use `rotateSnap > 0` instead of rotationSnapEnabled flag
  - Use `locationSnap > 0` instead of locationSnapEnabled flag
  - Remove parseFloat() calls (values already numbers)
- groundMeshObserver.ts: Direct property replacement
  - flyModeEnabled → flyMode
  - snapTurnSnap → turnSnap (remove parseFloat)
- customPhysics.ts: Add enabled checks and update
  - Add `> 0` checks (was applying unconditionally)
  - Use locationSnap and rotateSnap directly

**Phase 2: Remove Legacy Config Bridge**
- vrConfigPanel.ts: Remove syncLegacyConfig() method and all calls
- configModal.tsx: Remove legacy localStorage 'config' writes

**Phase 3: Cleanup**
- appConfig.ts: Remove legacy code (ConfigType, getAppConfig(), setAppConfig())
- Remove unused log import

**Benefits:**
- Eliminates dual config system confusion
- Fixes precision error from string "0" values
- Single source of truth via appConfigInstance
- Reactive updates via Observable pattern
- Cleaner, simpler codebase

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 13:20:18 -06:00
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
0712abe729 Remove old ResizeGizmo integration code from AbstractController
Clean up AbstractController by removing references to old ResizeGizmo implementation:
- Remove utility layer mesh filtering logic
- Remove auto-show gizmo on hover
- Remove gizmo handle click filtering
- Remove unused Ray import
- Bump version to 0.0.8-26

These changes complete the migration to the new simplified ResizeGizmo architecture.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 05:55:17 -06:00
c815db4594 Improve ResizeGizmo hover state and handle interaction
Phase 1 & 2: Handle positioning and wireframe improvements
- Move handles 5% outward from bounding box (was inward)
- Rename boundingBoxPadding → handleOffset for clarity
- Add wireframePadding (3% breathing room around mesh)

Hover boundary detection (prevent loss in whitespace):
- Add isPointerInsideHandleBoundary() with ray-AABB intersection
- Use local space transformation for accurate OBB handling
- Keep HOVER_MESH state when pointer in handle boundary
- Fix: Trust ResizeGizmo state instead of recreating with fake rays

Prevent main scene mesh grab during handle interaction:
- Add ResizeGizmo state check in pointer observable
- Add defense-in-depth guard in grab() method
- Prevents controller from grabbing diagram mesh when hovering handle
- Two-level protection against race conditions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 13:55:18 -06:00
af52d5992c Fix handle rotation to properly match mesh orientation
Handle meshes now correctly rotate to match the target mesh's world-space
orientation instead of appearing axis-aligned.

Root Cause:
- Handle positions from HandleGeometry are calculated in world space
- Setting mesh.position treats values as local space
- This created coordinate system mismatch when rotation was also set
- Result: rotation appeared to have no effect

Solution:
- Extract rotation from mesh world matrix using quaternion decomposition
- Set rotation FIRST (before position)
- Use setAbsolutePosition() for world-space positioning
- This ensures rotation and position work correctly together

Changes:
- Import Quaternion from @babylonjs/core
- Update createHandleMeshes(): decompose world matrix, set rotation,
  then use setAbsolutePosition()
- Rename updateHandlePositions() to updateHandleTransforms()
- Update updateHandleTransforms(): same rotation-then-position approach
- Add null check for _targetMesh in updateHandleTransforms()

Technical Details:
- computeWorldMatrix(true) gets complete transform including parent
- decompose() extracts pure rotation as quaternion (avoids gimbal lock)
- setAbsolutePosition() correctly handles world-space coords with rotation
- Order matters: rotation before position for correct transformation

Result:
 Handle box shapes visually tilt/rotate with mesh
 Handles remain correctly positioned on OBB
 Both wireframe and individual handles rotate together

Files modified:
- ResizeGizmoVisuals.ts: Handle rotation implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 07:36:57 -06:00
26b48b26c8 Implement WebXR resize gizmo with virtual stick scaling and extract adapter to integration layer
- Implement comprehensive WebXR resize gizmo system with three handle types:
  - Corner handles: uniform scaling (all axes)
  - Edge handles: two-axis planar scaling
  - Face handles: single-axis scaling
- Use "virtual stick" metaphor for intuitive scaling:
  - Fixed-length projection from controller to handle intersection
  - Distance-ratio based scaling from mesh pivot point
  - Works naturally with controller rotation and movement
- Add world-space coordinate transformations for VR rig parenting
- Implement manual ray picking for utility layer handle detection
- Add motion controller initialization handling for grip button
- Fix color persistence bug in diagram entities:
  - DiagramEntityAdapter now uses toDiagramEntity() converter
  - Store color in mesh metadata for persistence
  - Add dependency injection for loose coupling
- Extract DiagramEntityAdapter to integration layer:
  - Move from src/gizmos/ResizeGizmo/ to src/integration/gizmo/
  - Add dependency injection for mesh-to-entity converter
  - Keep ResizeGizmo pure and reusable without diagram dependencies
- Add closest color matching for missing toolbox colors
- Handle size now relative to bounding box (20% of avg dimension)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 17:52:23 -06:00
6ad04bb21a Refactor config naming and upgrade dependencies
Config changes:
- Renamed gridSnap to locationSnap for clarity
- Fixed configMenu to reference correct property
- Added debug logging to setAppConfig

Code cleanup:
- Removed commented duplicate exitXR call

Dependencies:
- Upgraded @babylonjs packages from 7.21.5 to 8.16.2
- Upgraded @mantine packages from 7.12.0 to 7.17.8

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 21:36:56 -06:00
5ce0c9ce4f Changed menu to be consistent between mini and main size. 2024-11-22 09:25:22 -05:00
e69d008bfa Added 404 handler, changed page db update. 2024-08-30 12:43:19 -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
b198605643 CHanged connector style 2024-08-22 18:21:08 -05:00
1d6c82a16a Updated db create event detail 2024-07-17 15:57:03 -05:00
1de6270f79 updated encryption to only encrypt when password is set. 2024-07-17 15:29:57 -05:00
d08e86e92f Added websocket presence. 2024-06-14 09:38:16 -05:00
cf278fed3a Added smart versioning 2024-06-11 16:58:35 -05:00
ae73f3e74b Added smart versioning 2024-06-11 16:51:27 -05:00
540658e3d0 Added smart versioning 2024-06-11 16:49:20 -05:00
1d94143b21 Added smart versioning 2024-06-11 16:46:42 -05:00
a334f13e6f added events 2024-06-11 07:20:25 -05:00
da38df7df4 readded pouch-find 2024-06-11 07:07:48 -05:00
3d3f73c259 added row level AES encryption. 2024-06-10 15:52:45 -05:00
724cd79ab3 Removed html renderer, too may problems. 2024-06-06 09:22:39 -05:00
f07ea11817 Stupid hack due to race condition with click menu. 2024-06-05 16:01:49 -05:00
2872026ac9 Upated babylonjs version, added map, camera, camerawindow. 2024-05-21 06:34:48 -05:00
ae3a94b8d4 Updated icon 2024-05-07 10:01:10 -05:00
dc3c3c56a1 Version Bump. 2024-04-30 09:31:44 -05:00
36e4b04957 updated menu positioning, added b-button to enable resetting positions. 2024-04-24 14:24:22 -05:00
5c22c15076 Bumped Version to .3 2024-04-24 12:16:03 -05:00
cfe174d564 Introduction revamp. 2024-04-24 07:50:26 -05:00
81c61fc6f8 Fixed grid and rotation snapping to be more sensible. 2024-04-20 17:22:14 -05:00
b2c5c85d7e Updated click menu to use Html Button. Added Scale feature. 2024-04-20 06:56:42 -05:00
ea5b8789c0 Added babylon-html, updated db to save values correctly in local storage. 2024-04-19 10:36:35 -05:00
9c76c7537d Fixed up logging, changed connector to use material from "from" mesh. 2024-04-15 08:42:36 -05:00
727977d5c6 Simplified interactions, changed menu interactions for changing entities. 2024-04-10 16:36:36 -05:00
73dae9c1cd Re added quest link. 2024-04-02 14:19:27 -05:00
73a850613d Updated menu system to be more consistent. Change toolbox to fixed colors; 2024-03-08 10:41:18 -06:00
e41f8194d5 Added 3d closet demo, cleaned up menus. 2024-02-05 10:46:23 -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
25a63ca182 Updated function, renamed main vr app. 2023-11-30 16:05:53 -06:00
1ae2dd3609 Updated user function to new api. 2023-11-04 12:00:11 -05:00
d7d8b414e5 Updated OPTIONS method for user function 2023-10-31 12:49:36 -05:00
1c64569d9a Added some textures. 2023-10-12 14:01:09 -05:00
97e58928ed Added Pouchdb persistance manager. 2023-10-12 10:58:50 -05:00
6630e52ba4 Fixed mobile scene aspect ratios. 2023-09-27 08:31:01 -05:00
ba35da66bd Added browser based voice recognition test. 2023-09-25 11:45:37 -05:00