55 lines
2.3 KiB
Markdown
55 lines
2.3 KiB
Markdown
|
||
|
||
## Plan: Help Button + Full Rotation Controls (X, Y, Z)
|
||
|
||
### 1. Add rotX and rotZ to the store
|
||
|
||
Update `src/stores/useModelStore.ts`:
|
||
- Add `rotX: number` and `rotZ: number` to the `FineTuning` interface
|
||
- Set defaults to 0 in `defaultFineTuning`
|
||
|
||
### 2. Apply rotX/rotZ to the XR model
|
||
|
||
Update `src/pages/XRSession.tsx` (`XRModel` component):
|
||
- Read `rotX`, `rotZ` from fineTuning
|
||
- Change `rotation={[0, rotYRad, 0]}` to `rotation={[rotXRad, rotYRad, rotZRad]}`
|
||
|
||
Update `ControllerFineTuning`:
|
||
- Map additional controller inputs (e.g., A/B buttons or grip+joystick combos) to rotX/rotZ, or leave rotation to the HUD controls
|
||
|
||
### 3. Add rotX/rotZ controls to XRHud
|
||
|
||
Update `src/components/XRHud.tsx`:
|
||
- In the fine-tuning expanded panel, add rotation rows for X° and Z° alongside the existing Y° control (same `+/−` button pattern)
|
||
|
||
### 4. Create Help panel with (?) button
|
||
|
||
Update `src/components/XRHud.tsx`:
|
||
- Add a `HelpCircle` (?) icon button to the main toolbar
|
||
- When pressed, open a full-height slide-out panel (same pattern as the checklist panel) containing a scrollable list of all tools and controls with descriptions:
|
||
|
||
Content sections:
|
||
- **Posicionar (Hit-Test)**: Tap to place model on real surfaces
|
||
- **Snap**: Auto-align to detected planes (floor, wall, table)
|
||
- **Mover (Free Move)**: Use left joystick for X/Y, right joystick for Z movement
|
||
- **Grid**: Toggle reference grid
|
||
- **Sólido / Wire / Bordas**: Render mode switching
|
||
- **Medir**: Tap two points to measure distance in mm
|
||
- **Screenshot**: Capture current AR view
|
||
- **Inspeção**: Open checklist to approve/reject items
|
||
- **Opacidade**: Adjust model transparency
|
||
- **Posição (mm)**: Fine-tune X/Y/Z in 1mm steps
|
||
- **Rotação X° / Y° / Z°**: Rotate model around each axis
|
||
- **Controladores Quest 3**: Joystick left = move X/Y, joystick right = move Z + rotate Y, grip = hold to move (when Free Move is off)
|
||
|
||
### 5. Also apply rotX/rotZ in desktop ModelViewer (if used)
|
||
|
||
Check `src/components/three/ModelViewer.tsx` and update rotation there too for consistency.
|
||
|
||
### Files to modify
|
||
- `src/stores/useModelStore.ts` — add rotX, rotZ fields
|
||
- `src/pages/XRSession.tsx` — apply 3-axis rotation, update controller mapping
|
||
- `src/components/XRHud.tsx` — add rotation controls for X/Z, add help (?) panel
|
||
- `src/components/three/ModelViewer.tsx` — apply rotX/rotZ if fineTuning is used there
|
||
|