Skip to content

feat(render): Classic 2D Highway parity — perspective falling-fret renderer (v0.1.16) - #10

Closed
ChrisBeWithYou wants to merge 1 commit into
feat/bass-low-fifthfrom
feat/2d-classic-parity
Closed

ChrisBeWithYou wants to merge 1 commit into
feat/bass-low-fifthfrom
feat/2d-classic-parity

Conversation

@ChrisBeWithYou

Copy link
Copy Markdown
Collaborator

Stacked on #9 (→ #8 → #7 → #6 → #5). Review only this diff.

What

The highway_2d view slot (added in #7) rendered our horizontal-lane tab scroller — not the 2D highway you meant. Clarified: Byron's "Classic 2D Highway" — the perspective falling-fret highway (X = fret, notes fall toward a strike line at y≈0.82 with project() depth scaling; the 2D cousin of the 3D highway). This PR ports it.

HOST CHECK (2026-07-10): that renderer is createHighway()'s private _defaultRenderer (static/highway.js + static/js/highway-{geometry,draw,state-primitives}.js) — core, closure-fed + websocket-fed, no viz factory → MIRROR (host issue got-feedBack/feedBack#835 asks for a bundle-driven feedBackViz_highway_2d, which would flip this to a clean borrow).

How

New makeClassic2DHighwayRenderer() reading our bundle, host constants/geometry lifted from source:

  • #080810 BG, perspective project() (VISIBLE_SECONDS 3.0 / Z_CAM 2.2 / Z_MAX 10.0, strike at y=0.82), centered fretX() trapezoid, converging fret lines, beat sweep, DEFAULT_STRING_COLORS/DIM/BRIGHT palette, glowing now-line, falling perspective-scaled fret-number gems (body + dim glow + white number, open-string wide bar, dead-note X, technique glyphs), sustain trails, amber fret rail with the live anchor-window highlight.
  • Fret window follows chart anchors via the host's smoothed displayMaxFret (0.4 rate), falls back to notes' max fret when a chart has no anchors. Lefty mirror + inverted string order honored.
  • resolveRendererFactory highway_2d fallback → this (was makeBuiltin2DRenderer); the borrow-first vizFactoryFor('highway_2d') probe is unchanged, so the host factory still wins when #835 ships. makeBuiltin2DRenderer stays the Jumping-Tab (builtin_2d) + >8-string path, untouched.

Deliberate approximations (documented in the renderer header)

  • Exotic host overlays our bundle doesn't feed — unison-bend connectors, strum-group brackets, master-difficulty phrase filtering, lyrics, chord frames — omitted.
  • A credited hit keeps Virtuoso's green-gem grammar (#22c55e + glow — the cross-surface "a hit is unmistakable" guarantee from the 2026-07-09 tester fix) rather than the host's string-bright lit gem, so a hit reads as clearly here as on our Tab/Notation surfaces. Consume-the-judge: credit stays verifier-only; this is display.

Verification

Screenshot-confirmed static (receding trapezoid, fret lines, strike line, string palette, 0–8 amber rail) and playing (numbered gems falling with perspective scale + sustain trails, near gem landing on the strike line). Full smoke 16/19 — only the 3 pre-existing base reds; smoke-renderers' pixel-enforced highway_2d row green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MS2YFb6UUSwJVV6CmEa25i

…nderer (v0.1.16)

The `highway_2d` view slot rendered our horizontal-lane tab scroller, not the
2D highway Christian meant: Byron's "Classic 2D Highway" — the perspective
falling-fret highway that is createHighway()'s private _defaultRenderer
(static/highway.js + static/js/highway-{geometry,draw,state-primitives}.js).
HOST CHECK 2026-07-10 verdict was MIRROR (core/closure-fed, no viz factory to
borrow; issue got-feedBack/feedBack#835 asks the host to expose one, which
would flip this to a pure borrow).

New makeClassic2DHighwayRenderer() — a faithful port reading our bundle, with
the host constants/geometry lifted from source: #080810 BG, the perspective
project() (VISIBLE_SECONDS 3.0 / Z_CAM 2.2 / Z_MAX 10.0, strike line at
y=0.82), the centered fretX() trapezoid, converging fret lines, the beat
sweep, the DEFAULT_STRING_COLORS/DIM/BRIGHT palette, the glowing now line,
falling perspective-scaled fret-number gems (rounded-rect body + dim glow +
white fret number, open-string wide bar, dead-note X, technique glyphs),
sustain trails, and the amber fret-number rail with the live anchor-window
highlight. Fret window follows the chart anchors via the host's smoothed
displayMaxFret (0.4 rate), falling back to the notes' max fret when a chart
carries no anchors. Lefty mirror + inverted string order honored.

resolveRendererFactory's highway_2d slot now falls back to this (was
makeBuiltin2DRenderer); the borrow-first vizFactoryFor('highway_2d') probe is
unchanged, so the host factory still wins when #835 ships. makeBuiltin2DRenderer
stays the Jumping-Tab (builtin_2d) fallback and the >8-string path, untouched.

Deliberate approximations (documented in the renderer header, not oversights):
the exotic host overlays our bundle doesn't feed — unison-bend connectors,
strum-group brackets, master-difficulty phrase filtering, lyrics, chord frames
— are omitted; and a CREDITED hit keeps Virtuoso's own green-gem grammar
(#22c55e + glow, the cross-surface "a hit is unmistakable" guarantee from the
2026-07-09 tester fix) rather than the host's string-bright lit gem, so a hit
reads as clearly here as on our Tab/Notation surfaces (consume-the-judge:
credit stays verifier-only; this is display).

Verification: screenshot-confirmed static (receding trapezoid, fret lines,
strike line, string palette, 0-8 amber rail) AND playing (numbered gems
falling with perspective scale + sustain trails, near gem at the strike line).
Full smoke 16/19 - only the 3 pre-existing base reds (backing-engine,
progress, variation); smoke-renderers' pixel-enforced highway_2d row green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MS2YFb6UUSwJVV6CmEa25i
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f55bff3b-b9ea-452f-b63d-065292d711c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/2d-classic-parity

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

@ChrisBeWithYou

Copy link
Copy Markdown
Collaborator Author

Landed on virtuoso-dev via the 2026-07-14 batch integration (v0.2.2), not a GitHub merge event — these branches predate the main→dev reconcile (Byron's Gold-rung #11 took the line to 0.2.x) and were rebased, so their head SHAs don't match the commits that reached dev. All content is verified present in dev (incl. #5's 62fc72e tuningMidis, cherry-picked as f0c78c6). Closing to avoid a duplicate re-merge; the work ships to main via the dev→main PR #4 line. — automated

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