From 9a5ec36f471d6a751f4afaaaa4f72a0d5a26f18c Mon Sep 17 00:00:00 2001 From: topkoa Date: Sat, 18 Jul 2026 20:26:01 -0400 Subject: [PATCH] feat(highway_3d): gem rims flash string-coloured, wire-fashion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a confirmed hit the gem's outline now flashes in the STRING'S OWN colour with the same intensity treatment as the fret wires — the FRET_WIRE_HIT_INTENSITY emissive ramp, faded by the provider's alpha — instead of the fixed spring-green mHitBright rim. Just the rims: the lateral face fill keeps its existing green, and the sustain trail is untouched. Mechanics mirror the wires' pattern. mRimFlash[s] is one material per string (created with the other per-string materials, palette-retint aware, fog-exempt, disposed in teardown); drawNote() assigns it as the outline on a good verdict and records the verdict alpha into a per-frame per-string max (_rimFlashIn); the flash pass applies the intensity ramp once per string. Shared-per-string is the same compromise mGlow already makes — two same-string gems flashing in different phases share the brighter alpha. No decay tail of our own, deliberately: the material is only assigned while the provider confirms the note, and the provider's alpha already fades. When it goes silent the outline reverts, so idle intensity never shows. Signed-off-by: topkoa --- CHANGELOG.md | 4 +- plugins/highway_3d/screen.js | 32184 +++++++++++++++++---------------- 2 files changed, 16112 insertions(+), 16076 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7320a..3769d89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,7 +55,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 survives only as the fallback on anchor-less charts). At most **two wires are ever lit at once**: when overlapping decay tails (fast passages) would light a run of wires, the flash collapses to the outermost pair of the lit span — one bracket, never a picket - fence. With no scorer attached, nothing changes. + fence. The gem's rim joins in: on a confirmed hit the outline flashes in the + string's own colour with the same intensity treatment as the wires, fading with the + scorer's alpha. With no scorer attached, nothing changes. ### Changed - **`GET /api/song/{f}?stems=1`** (new, opt-in) — returns the pack's playable stem diff --git a/plugins/highway_3d/screen.js b/plugins/highway_3d/screen.js index ecba3fb..390785e 100644 --- a/plugins/highway_3d/screen.js +++ b/plugins/highway_3d/screen.js @@ -1,16075 +1,16109 @@ -// 3D Highway visualization plugin — Three.js note highway. -// Visual layer from joel's prototype (vibrant palette, glowing strings, -// fret heat, dynamic lane, chord frame-boxes, per-note connector labels, -// board projection, outline+core note meshes) adapted into the -// feedBackViz setRenderer contract (feedBack#36) so it works in the -// main player and per-panel in splitscreen without any architectural -// changes. - -(function () { - 'use strict'; - - /* ====================================================================== - * Constants - * ====================================================================== */ - - // Three.js is vendored under static/vendor/three/ in core (pinned r170 — - // see static/vendor/three/VERSION). The bundled plugin loads from the - // same origin to avoid the first-launch CDN round-trip and to pin the - // version against breakages from upstream Three.js drift. - const THREE_URL = '/static/vendor/three/three.module.min.js'; - const THREE_CDN = 'https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.min.js'; - - /* ── Butterchurn audio-reactive background ────────────────────────── - * Mounts a Butterchurn (WebGL MilkDrop) canvas BEHIND the transparent - * 3D highway. On desktop it's driven by the guitar/mic input (the song - * audio lives in JUCE, not the webview