Commit Graph

65 Commits

Author SHA1 Message Date
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
f44b2129c8 decomposed functions. 2023-08-23 14:15:44 -05:00
7796a23ad9 Added initial demo config. 2023-08-19 15:45:19 -05:00
ceaf6c4fb5 Committed new Relic Starting point.
Committed new Relic Starting point.
2023-08-17 09:26:46 -05:00
a147506d7e Refactored api path. 2023-08-11 07:51:46 -05:00
cf228c92a2 changed to simple response. 2023-08-11 07:09:02 -05:00
00dac7f4ec Added voice manager, integrated cloud function capability. 2023-08-10 11:56:10 -05:00