Skip to content

feat(keys3d): better key sizes — deeper, edge-shaded, angled sharps#860

Open
LegionaryLeader wants to merge 3 commits into
got-feedBack:mainfrom
LegionaryLeader:realistic-key-sizes
Open

feat(keys3d): better key sizes — deeper, edge-shaded, angled sharps#860
LegionaryLeader wants to merge 3 commits into
got-feedBack:mainfrom
LegionaryLeader:realistic-key-sizes

Conversation

@LegionaryLeader

@LegionaryLeader LegionaryLeader commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
image

Summary

Reshapes the Keys Highway 3D piano so key presses read clearly — and tunes the floating-layout falling-note planes to sit correctly against the taller keys. Purely a visual/geometry pass on the keyboard; scoring, timing, note data, and hit-detection are untouched.

What changed

Key geometry (natural + sharp bodies)

  • Taller, deeper key bodies so the live key-depress tilt actually has room to read, and the edge-shaded side walls give every key a defined border.
  • Baked vertex-color edge shading on every key wall (_shadeKeyEdges): the side walls darken toward the base while the top face stays full-bright, turning the seam between neighbouring keys into a soft shadow line so adjacent keys are easy to tell apart.
  • Thin real-piano side gap per key — a left/right render inset only. Key positions and lane widths are deliberately left alone, so falling notes still line up exactly with their key.
  • Angled sharps: a top-edge X-taper (_taperKeyX) plus a front-face slant (_slantFrontFace) give the black keys a chiselled-wedge profile that reads from the top-down camera. The sharp's back edge is anchored to the hit-line so sharps no longer dive backward into the highway, and their visible length is independent of the natural-key length.

Floating-layout note planes

  • Decoupled the floating falling-note gems from the now-tall black-key height. Naturals drop 1K so they read cleanly on the low-down camera as they come in; sharps sit a small fixed lift above the natural base so they still read as raised, independent of BLACK_H (no longer pinned to the tall black key).
  • Floating layout only — the flat and realistic layouts keep their shared WHITE_H note plane and are not touched.

Invariants preserved

  • Key X positions, lane widths, and note X-alignment are unchanged — the widths drive the horizontal tiling; only render-body insets, heights, and depths changed.
  • flat / realistic layouts are unaffected (verified: the change is isolated to the non-_flatMode() branch).
  • Single plugin version bump for the whole branch: 0.2.1 → 0.2.2.

Files

  • plugins/keys_highway_3d/screen.js
  • plugins/keys_highway_3d/plugin.json

Testing

Exercised in the packaged app across the floating layout on the low-down camera: key-depress travel is clearly visible, sharps read as a gentle raise above the naturals, and the naturals come in cleanly without the sharps towering above their keys.

New style is much more readable, key presses are much more visible, the entire piano looks better overall and less flat.

Summary by CodeRabbit

  • New Features

    • Refined 3D piano-key geometry with clearer spacing between neighboring keys.
    • Improved black key shape and side-wall shading for a more dimensional look.
    • Updated key placement and floating note offsets to enhance visual alignment and readability.
  • Chores

    • Updated the Keys Highway 3D plugin version to 0.2.2.

LegionaryLeader and others added 2 commits July 11, 2026 02:45
… keys

Reshape the Keys Highway 3D piano so key presses read clearly, as the
default look (no toggle):
- Taller/longer key bodies for more visible key-depress travel.
- Baked vertex-color edge shading on every key wall (_shadeKeyEdges).
- Thin real-piano side gap on every key (render inset only; positions
  and lane widths untouched, so falling notes still line up).
- Trapezoid sharps: top-edge X taper (_taperKeyX) + front-face slant
  (_slantFrontFace). Sharp back edge anchored to the hit-line so sharps
  no longer dive into the highway and their length is independent of the
  natural-key length.

Bump plugin 0.2.1 -> 0.2.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: LegionaryLeader <legionaryleader@gmail.com>
The taller, edge-shaded keys pushed the floating-layout sharp note gems
far above their keys, and on the low-down camera the natural gems sat a
touch high as they came in. Decouple the floating note planes from the
(now tall) black-key height:

- Naturals: drop the entry plane 1K so they read cleanly on the low cam.
- Sharps: sit +2K over the natural base so they still read as raised,
  independent of BLACK_H (no longer pinned to the tall black key).

Floating layout only — flat/realistic keep their shared WHITE_H plane.
No key geometry, positions, lane widths, or plugin version change.

Signed-off-by: LegionaryLeader <legionaryleader@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c62a5b17-9739-42c1-b7d2-f66d9235fc2d

📥 Commits

Reviewing files that changed from the base of the PR and between bfd962a and 70427ec.

📒 Files selected for processing (1)
  • CHANGELOG.md
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

The Keys Highway 3D plugin updates piano-key dimensions, gap-aware geometry construction, key mesh anchoring, floating-note offsets, changelog documentation, and the manifest version from 0.2.1 to 0.2.2.

Changes

Keys Highway 3D

Layer / File(s) Summary
Key geometry dimensions and shaping
plugins/keys_highway_3d/screen.js
Key dimensions change, with helpers for side-wall shading, tapered footprints, and slanted sharp-key fronts.
Gap-aware keyboard construction
plugins/keys_highway_3d/screen.js
White and black key gaps are incorporated into geometry sizing, while mesh placement uses updated height calculations and a shared back-edge z-plane.
Note offsets and release metadata
plugins/keys_highway_3d/screen.js, plugins/keys_highway_3d/plugin.json, CHANGELOG.md
Natural and sharp floating notes receive new vertical offsets, the plugin version changes to 0.2.2, and the changelog documents the update.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: byrongamatos

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main Keys Highway 3D geometry update and mentions the key visual changes accurately.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@LegionaryLeader
LegionaryLeader marked this pull request as ready for review July 11, 2026 06:56
@LegionaryLeader LegionaryLeader changed the title feat(keys3d): realistic key sizes — deeper, edge-shaded, trapezoid piano keys feat(keys3d): better key sizes — deeper, edge-shaded, angled sharps Jul 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/keys_highway_3d/plugin.json`:
- Line 4: Update the plugin’s CHANGELOG.md by adding or revising the
[Unreleased] section to describe the realistic key geometry and floating-note
alignment changes associated with version 0.2.2.

In `@plugins/keys_highway_3d/screen.js`:
- Around line 3060-3061: Update the black glyph geometry in the sharp-key
rendering code to size it from the tapered black key-top width, using blackBodyW
and the 84% top taper rather than BLACK_W; preserve the existing scale factor
while ensuring the glyph stays within the visible key surface. Leave the
whiteGlyphGeo sizing unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f0c29cbc-0364-41df-8587-d2065addb8db

📥 Commits

Reviewing files that changed from the base of the PR and between 508829c and bfd962a.

📒 Files selected for processing (2)
  • plugins/keys_highway_3d/plugin.json
  • plugins/keys_highway_3d/screen.js

Comment thread plugins/keys_highway_3d/plugin.json
Comment thread plugins/keys_highway_3d/screen.js
Add an [Unreleased] > Changed entry for the reshaped Keys Highway 3D
keys and the floating-layout note-plane tuning, per the per-PR changelog
guideline.

Signed-off-by: LegionaryLeader <legionaryleader@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant