Repository navigation
feat(render): Classic 2D Highway parity — perspective falling-fret renderer (v0.1.16) - #10
ChrisBeWithYou wants to merge 1 commit into
Conversation
…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
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Landed on |
What
The
highway_2dview 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 withproject()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-drivenfeedBackViz_highway_2d, which would flip this to a clean borrow).How
New
makeClassic2DHighwayRenderer()reading our bundle, host constants/geometry lifted from source:#080810BG, perspectiveproject()(VISIBLE_SECONDS 3.0 / Z_CAM 2.2 / Z_MAX 10.0, strike at y=0.82), centeredfretX()trapezoid, converging fret lines, beat sweep,DEFAULT_STRING_COLORS/DIM/BRIGHTpalette, 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.displayMaxFret(0.4 rate), falls back to notes' max fret when a chart has no anchors. Lefty mirror + inverted string order honored.resolveRendererFactoryhighway_2dfallback → this (wasmakeBuiltin2DRenderer); the borrow-firstvizFactoryFor('highway_2d')probe is unchanged, so the host factory still wins when #835 ships.makeBuiltin2DRendererstays the Jumping-Tab (builtin_2d) + >8-string path, untouched.Deliberate approximations (documented in the renderer header)
#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-enforcedhighway_2drow green.🤖 Generated with Claude Code
https://claude.ai/code/session_01MS2YFb6UUSwJVV6CmEa25i