immersive2/src/diagram
Michael Mainguy ebad30ce4d Implement Virtual Stick scaling with modular ResizeGizmo architecture
Refactored ResizeGizmo into modular structure:
- ResizeGizmo.ts: Main implementation with Virtual Stick scaling
- enums.ts: HandleType and HandleState enums
- types.ts: TypeScript interfaces
- index.ts: Barrel exports

Implemented Virtual Stick scaling approach:
- Fixed-length virtual stick extends from controller forward
- Scaling based on distance ratio in mesh local space
- World-to-local coordinate transforms for proper rotation handling
- Smooth continuous scaling during drag (no rounding)
- Snap to 0.1 increments on grip release
- Face handles: round only scaled axis
- Corner handles: round uniformly on all axes

Fixed scaling oscillation issues:
- Freeze handle position updates during active scaling
- Prevents feedback loop between scaling and handle positioning
- Use absoluteRotationQuaternion for proper handle rotation

Added WebXRDefaultExperience parameter to constructor for proper controller integration with manual ray casting in world space.

Added test shortcuts:
- Ctrl+Shift+T: Create test entities (sphere and box)
- Ctrl+Shift+X: Clear all entities

Wired Close button to dispose active ResizeGizmo.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 11:43:17 -06:00
..
functions Fix color persistence using metadata and source mesh ID fallback 2025-11-15 08:05:49 -06:00
types Added webxr exit button 2025-02-14 11:01:27 -06:00
diagramManager.ts Implement Virtual Stick scaling with modular ResizeGizmo architecture 2025-11-16 11:43:17 -06:00
diagramMenuManager.ts Implement Virtual Stick scaling with modular ResizeGizmo architecture 2025-11-16 11:43:17 -06:00
diagramObject.ts Optimize connection raycasting with position caching 2025-11-12 21:46:57 -06:00