Skip to content

Grip-sense: bar reads clearly red + glow rework & distinct indicators (#74)#76

Merged
petegordon merged 6 commits into
mainfrom
claude/issue-74-gripsense-bar
Jun 20, 2026
Merged

Grip-sense: bar reads clearly red + glow rework & distinct indicators (#74)#76
petegordon merged 6 commits into
mainfrom
claude/issue-74-gripsense-bar

Conversation

@petegordon

@petegordon petegordon commented Jun 19, 2026

Copy link
Copy Markdown
Member

Fixes #74.

Summary

Started as "make the grip-sense bar activation read clearly red" and, through review feedback, grew into a clear split between the two grip-sense indicators plus a glow rework. The grip-sense glow (on-top marker) and bars (handle strip meshes) are now two independent, separately-toggled indicators.

Grip-sense bars — the #74 fix

The bars now sit at an inert rest grey and ease to the grip color (red) with a fixed emissive lift while that side is gripped, then fade back on release — so the bar itself unmistakably reads activation (the original "white→red was too faint" report).

  • Per-side materials are cloned, so left/right light independently.
  • Excluded from the body/accent theme groups so they don't vanish into the body color; driven on their own.
  • Toggled by Show Grip Sense Bars (setGripBarsVisible).

Grip-sense glow — rework

The glow marker (Bar/cylinder shape) reads as a real glow again instead of a flat painted cylinder:

  • A band texture that wraps the full circumference (consistent from any angle) and fills most of the length with soft fades at the ends.
  • Normal blending so it stays visible over the light handles (pure additive vanished over near-white — no headroom).
  • The Glow Length slider now scales the lit length as expected (max ≈ full handle).
  • New per-profile gripMarkerYaw knob angles each glow's bumper/trigger end toward the controller centerline (set to 18° for the Steam Controller) — best seen in the Top view.

Distinct definitions

Glow and bars are now cleanly separated, and the docs/tooltips match the code:

  • Glow: _gripEnabled / setGripVisible / overlay:gripViz; Brightness slider = glow peak opacity only.
  • Bars: _gripBarsVisible / setGripBarsVisible / overlay:gripBars; lit emissive is a fixed constant, independent of the Brightness slider.
  • Shared grip color drives both (one picker) — now documented.
  • Refreshed stale "bars are static/cosmetic" comments and the settings tooltips.

Also

Testing

  • node --check clean on all changed files; core (85) + visualizer (5) tests pass.
  • Live checks (Steam Controller): enable Show Grip Sense Bars, grip a handle → that side's bar goes grey→red and fades back (left/right independent). Enable Show Grip Sense Glow, grip → the cylinder glow shows as a soft band; run the Glow Length slider 1→5 (fills the handle at 5); confirm the inward yaw in the Top view. Open a settings dropdown → options readable.

🤖 Generated with Claude Code

claude and others added 2 commits June 19, 2026 11:06
…74)

The grip-sense bar was meant to read white when idle and red when the grip
is held, but only the emissive glow changed on activation. Sitting on top of
the model's near-white bar material, a saturated grip color (default red)
blended out to a faint pink, so the activation was easy to miss.

Drive the bar mesh's BASE color from its original (white) toward the grip
color while held, lerping back on release. Per-mesh materials are already
cloned, and the original color is captured once into material.userData, so
this is safe and reversible. A reusable scratch THREE.Color avoids a
per-frame allocation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🔎 PR #76 preview — test it in isolation

🌐 Web overlay: https://lab.usersfirst.games/pr-preview/pr-76/overlay/
(landing page: https://lab.usersfirst.games/pr-preview/pr-76/)

💻 Desktop installers (prerelease): https://github.com/UsersFirst/tandemonium-controller-lab/releases/tag/pr-76

  • Windows…-Setup.exe (installer) or .zip (portable)
  • macOSWebHID-Controller-Overlay.dmg or .zip (unsigned: right-click → Open)

Updated for a64cf23. Web preview and prerelease are torn down when this PR closes.

@Ivanim13

Copy link
Copy Markdown
image Web version has the correct activation color on the grip-sense, but not the installer/portable versions. In addition, a second grip-sense strip appears inside the model. Ideally, the grip-sense strip that's outside of the model should be inside the model, just like the duplicated one.

@petegordon

Copy link
Copy Markdown
Member Author

Ok. So the Grip Sense Bars (should be the bars that are display to the left and the right of the controller body. The Grip Sense Glow is the is the width and length in side the controller that glows.

The brightness changes the GLob (not the bar)
The bars on the web flash a light color and then change to the dark color--this is not correct for the web interface and the electron app to behave different.
Lastly, the Grip Sense Glows are too close to the center and need to move out from the center of the controller towards the edge and within the controller handles. (left needs to go farther left and right needs to go farther right)
Double check on the use of Grip Sense Glow versus Bar in settings.

…dback)

Reworks the #74 attempt per the reviewer's clarification of the model:
the BARS are the cosmetic left/right side strips; the GLOW (the on-top marker
inside the handle) is the activation indicator, and Grip Brightness drives the
glow.

- Stop tinting/flashing the bars on touch. The #74 white→color base-color lerp
  (plus the brightness-scaled bar emissive) made the bars flash light→dark and
  rendered differently on web vs the Electron build. The bars are now left
  fully static, so activation is shown solely by the glow and both targets
  render identically.
- setGripState now only animates the glow marker opacity (brightness = peak).
- Move the glow markers farther out into the handles
  (gripMarkerSideOffset 0.06 → 0.14) so they sit where the hands grip instead
  of bunched near center.
- Clarify settings wording: "Grip Brightness" → "Grip Glow Brightness", and
  drop the "bars highlight on touch" / "+ bar highlight" copy so Glow vs Bar
  reflect the actual behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1

Copy link
Copy Markdown
Member Author

Reworked per the clarified model (bars = cosmetic side strips, glow = the activation indicator):

  • Bars no longer flash. Removed the GripSense bar activation isn't noticeable #74 white→color base-color tint (and the brightness-scaled bar emissive) — that's what made the bars flash light→dark and rendered differently on web vs the Electron build. The bars are now fully static, so activation is shown solely by the glow and both targets render identically.
  • Brightness affects the glow only (the bar no longer reacts to it). Renamed the setting to "Grip Glow Brightness" and fixed the Bars / Color tooltips so Glow-vs-Bar wording matches behavior.
  • Glows moved outward into the handlesgripMarkerSideOffset 0.06 → 0.14, so the left glow goes farther left and the right farther right, sitting where the hands grip instead of bunched near center.

On the "second strip inside the model": that's the two distinct features working as intended — the bar (outside strip) and the glow (inside the handle), now pushed out within the handle. Shout if you'd actually prefer them merged.

Two things to confirm on the refreshed build (https://lab.usersfirst.games/pr-preview/pr-76/overlay/ + the rebuilt pr-76 installer):

  1. Web and the installer now show the same activation — removing the per-frame bar color change was the most likely cause of the web/desktop difference, but please verify on the new installer since I can't run the desktop build here.
  2. The 0.14 outward offset is a first pass — if the glows want to go a touch more or less, it's a one-number tweak.

Generated by Claude Code

claude and others added 3 commits June 19, 2026 19:39
…the grip color

Root cause of the bar color confusion (spotted in review): the grip-sense bar
meshes (left/right_gripsense) were listed in the Steam profile's
bodyColorMeshes, so they took the body color and changed with it — washing
into the body instead of reading as the grip-sense indicator.

- Remove left/right_gripsense from bodyColorMeshes (light body = shells only).
- Paint the bars with the grip color via a new _applyGripBarColor(), called on
  model setup and whenever setGripColor changes — so the bars track the
  "Grip Sense Color" setting and stay distinct from the body.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
Grip-sense glow (on-top marker) and bars (handle strip meshes) are now two
clearly separate, independently-toggled indicators:

- Bars react to grip: sit at an inert rest grey and ease to the grip color
  (with a fixed emissive lift) while that side is gripped — so the bar itself
  reads activation (#74). Per-side materials are cloned so left/right light
  independently. Driven by setGripBarsVisible, independent of the glow.
- Glow rework: the cylinder reads as a real glow again — a band texture that
  wraps the full circumference (consistent from any angle) and fills most of
  the length with soft fades at the ends, using normal blending so it stays
  visible over the light handles (additive vanished over near-white). The
  Glow Length slider now scales the lit length as expected.
- gripMarkerYaw knob (per profile, degrees) angles each glow's bumper/trigger
  end toward the controller centerline; set to 18 for the Steam Controller.
- Decoupled the bar's lit emissive from the Grip Glow Brightness slider
  (fixed GRIP_BAR_LIT_EMISSIVE) so brightness is glow-only, matching its
  label. Refreshed all stale "bars are static/cosmetic" docs + tooltips.

Also: fix settings dropdowns rendering light text on a white popup on Windows
(color-scheme: dark + explicit option colors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@petegordon petegordon changed the title Make grip-sense bar activation read clearly red (#74) Grip-sense: bar reads clearly red + glow rework & distinct indicators (#74) Jun 20, 2026
@petegordon petegordon merged commit b50c3e4 into main Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GripSense bar activation isn't noticeable

3 participants