Steam Controller float layout: spacing fix, defaults & Edit Layout editor (#75)#79
Conversation
…ft paddles (#75) Issue #61's tighter float spread packed the Steam Controller's popped parts together: the triggers landed right on top of the bumpers, and the back paddles dropped so far under the body they were half hidden behind it. These parts use per-part floatTuning (floatFactor/lateralBias don't apply to tuned parts), so adjust the tuning: - Triggers pushed further off the back surface (back 0.22→0.34, up 0.24→0.36) to reopen the gap above the bumpers. - Paddles raised (up -0.14→-0.06) and pulled further toward the camera (back -0.45→-0.58) so they clear the body's bottom edge instead of hiding. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
🔎 PR #79 preview — torn downThis PR is closed; its web preview and desktop prerelease have been removed. |
|
Let’s see if we can extend this PR to start the edit layout control selection from the Chevy position and not reorientation when clicked and add a floating panel when clicked to do numeric values adjusted precisely in addition to the Q/E and arrow keys. |
…rotation (#75 PR feedback) Addresses the editing-UX feedback on PR #79: 1. Selecting/grabbing a part no longer resets its orientation. The override was seeded with euler {0,0,0}, discarding the part's intended tilt (triggers/bumpers' tiltUp) or camera-facing pose (paddles). It's now seeded from the part's current popped orientation (mode-aware), so the first edit is visually a no-op. Bare selection is non-destructive — getSelectedLayout() derives values read-only without committing an override. 2. A numeric editor in the Edit Layout panel, shown when a part is selected: precise X/Y/Z position and pitch/yaw/roll degrees, in addition to drag and the Q/E + arrow keys. Fields sync live while dragging/nudging, and edits apply per-axis (empty fields are left untouched) via the new getSelectedLayout()/setSelectedLayout() overlay API. A tip notes how to set mirrored values for a symmetrical layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
|
Pushed the editor-UX improvements to this PR: 1. Selecting a part no longer resets its orientation. The override used to seed 2. Precise numeric position + rotation. When a part is selected, the Edit Layout panel now shows X/Y/Z position and pitch/yaw/roll (°) fields alongside the existing drag + Q/E/arrow controls. They update live as you drag/nudge, and apply per-axis. For a symmetric layout, give the left/right parts matching values with X negated (e.g. Best tested on the refreshed preview once this run finishes: https://lab.usersfirst.games/pr-preview/pr-79/overlay/ → Settings → Edit float layout, then click a part. The float-default tweak from the first commit is still here too, but with the numeric editor you can now dial in exact defaults — happy to bake whatever values you settle on into the profile as the new defaults. Generated by Claude Code |
- Steam Controller: bake the Edit-Layout trigger/bumper positions into a profile `defaultLayout` (applied before any user override) so the popout layout matches the hand-tuned spots out of the box. - Camera: default every controller to the Top view instead of Player (still persisted, so a user's pick is remembered). - Reset all defaults: also reset the window size, which lives in the main process (window-state.json), not localStorage — new reset-window-size IPC drops the persisted size and snaps the window back to the mode default. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The per-axis Position/Rotation fields lived inside the settings panel, which is closed while you drag parts in the 3D view — so the fine-tune controls were effectively invisible. Move them into a self-contained popup that appears on selection, independent of the settings panel. - Floating, draggable popup (#layout-editor-popup) shown when a part is selected; close (×) deselects, "Reset this part" clears just its override. - X/Y/Z axis labels on each Position/Rotation input; roomy, evenly-sized fields so full values stay readable as they change. - Shift + ↑/↓ in a field does a fine nudge (Position 0.001, Rotation 0.1°); plain ↑/↓ keep the coarse step. Documented on the popup. - New overlay clearLayoutSelection() backs the close button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"Reset this part" / "RESET LAYOUT" cleared the override to null, which falls back to the computed floatTuning offset — a different spot than the hand-tuned defaultLayout shown when Edit Layout opens. Restore the position editing started from instead: the profile's defaultLayout if it lists the part (Steam triggers/bumpers), otherwise null → floatTuning (paddles, other controllers). So reset undoes the user's tweaks rather than jumping elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>



Fixes #75.
Summary
Started as the #75 float-spacing fix and grew into a broader pass on the Steam Controller float/popout layout and its Edit Layout editor:
1. Float spacing fix (#75)
These parts are positioned by per-part
floatTuning(floatFactor/floatLateralBiasonly apply to untuned parts, so the tuning is the only lever). Adjusted the Steam Controller profile:back 0.22, up 0.24back 0.34, up 0.36up -0.14, back -0.45up -0.06, back -0.58Bumpers (
back 0.08, up 0.12) and the paddleside(-0.13) are unchanged.2. Hand-tuned defaults
defaultLayouton the Steam Controller profile holds the exact trigger/bumper offsets captured from the Edit Layout editor, applied as a baseline on top offloatTuning(a user's own saved edits still win).3. Edit Layout — floating numeric editor
The per-axis Position/Rotation fields lived inside the settings panel, which is closed while you drag parts in the 3D view — so the fine-tune controls were effectively invisible. Moved them into a self-contained popup shown when a part is selected:
0.001, Rotation0.1°); plain ↑/↓ keep the coarse step.defaultLayoutif the part has one, else the computedfloatTuningspot — instead of jumping to a different procedural value.4. Full "Reset to all defaults"
Window size lives in the Electron main process (
window-state.json), not localStorage, so it survived a reset. Added areset-window-sizeIPC that drops the persisted size and snaps the window to the mode default (720×540 single / 1100×520 multi); the reset handler awaits it before reloading.Files
packages/visualizer/src/controller-profiles.js— float tuning +defaultLayoutpackages/visualizer/src/controller-overlay.js— applydefaultLayout, numeric get/set, reset-to-default,clearLayoutSelectionapps/overlay/src/index.html+src/js/app.js— popup UI + wiring, Top camera default, reset-window-size callapps/overlay/electron/main.js+preload.js—reset-window-sizeIPCTesting
node --checkclean on every changed JS file.packages/core+visualizer; the overlay UI (popup, window reset) is Electron-only, so verify on the desktop preview build:🤖 Generated with Claude Code