diff options
Diffstat (limited to 'docs/prototypes/dupre-kit-additions.js')
| -rw-r--r-- | docs/prototypes/dupre-kit-additions.js | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/docs/prototypes/dupre-kit-additions.js b/docs/prototypes/dupre-kit-additions.js index 005a577..b1846a2 100644 --- a/docs/prototypes/dupre-kit-additions.js +++ b/docs/prototypes/dupre-kit-additions.js @@ -5,12 +5,9 @@ * so they can merge back into the kit with gallery cards. * * Load AFTER widgets.js. Contents: - * - DUPRE.detentFader (NEW) — multi-detent slide attenuator with - * speedbump drag physics. - * - DUPRE.drumRoller (UPGRADE) — backward-compatible redefinition: - * 1..N channels (stock hardcodes exactly two), configurable min/max - * range and stage height. Defaults reproduce the stock instrument. - * - DUPRE.guardedToggle (UPGRADE) — rotateX throw (no planar spin). + * - detentFader, drumRoller and guardedToggle have merged into widgets.js; + * their retired implementation references remain local below while the + * remaining additions continue to load in older casting prototypes. * - DUPRE.batToggle (UPGRADE) — same throw fix. * - DUPRE.slideRule (UPGRADE) — width option; the printed scale * spreads its stops proportionally. Default keeps stock 180px. @@ -101,21 +98,6 @@ const st = document.createElement('style'); st.id = 'dupre-additions-css'; st.textContent = ` -.dupre-dfader{position:relative;display:inline-block;width:230px;height:36px;cursor:ew-resize;touch-action:none} -.dupre-dfader .df-slot{position:absolute;left:8px;right:8px;top:15px;height:6px;border-radius:4px; - background:var(--well,#0a0c0d);border:1px solid #0a0908;box-shadow:inset 0 1px 2px #000} -.dupre-dfader .df-fill{position:absolute;left:9px;top:16px;height:4px;border-radius:3px; - background:linear-gradient(180deg,var(--amber-grad-top,#f2c76a),var(--gold,#e2a038));pointer-events:none} -.dupre-dfader .df-tick{position:absolute;top:9px;width:2px;height:18px;border-radius:1px; - background:var(--steel,#969385);opacity:.55;transform:translateX(-50%);pointer-events:none} -.dupre-dfader .df-tick.df-park{background:var(--gold-hi,#ffbe54);opacity:1; - box-shadow:0 0 5px rgba(var(--glow-hi,255,190,84),.7)} -.dupre-dfader .df-cap{position:absolute;top:5px;width:12px;height:26px;border-radius:3px;transform:translateX(-50%); - background:linear-gradient(90deg,#7e7a70,#e8e5db 45%,#8a867c);border:1px solid #4e4a42; - box-shadow:0 2px 4px #000a;pointer-events:none} -.dupre-dfader .df-cap::after{content:"";position:absolute;left:50%;top:3px;bottom:3px;width:2px; - transform:translateX(-50%);background:rgba(0,0,0,.35);border-radius:1px} -.dupre-dfader.df-parked .df-cap{box-shadow:0 2px 4px #000a,0 0 7px rgba(var(--glow-hi,255,190,84),.55)} .dupre-slsel{display:block;width:220px;cursor:pointer;touch-action:none;user-select:none} .dupre-slsel .sl-cols{display:grid} .dupre-slsel .sl-col{display:flex;flex-direction:column;align-items:center;gap:3px;padding-bottom:5px} @@ -177,7 +159,7 @@ (the detent value or null). CSS lives in the additions block (.dupre-dfader); no other styles involved. */ - DUPRE.detentFader = function (host, opts = {}) { + const mergedDetentFaderReference = function (host, opts = {}) { const onChange = opts.onChange || noop; const detents = (opts.detents || [50]).slice().sort((a, b) => a - b); const MAGNET = opts.magnet !== undefined ? opts.magnet : 3; @@ -255,7 +237,7 @@ each drum drags vertically on its own hit strip. SVG-built: styling is inline attributes plus the shared .rsvg stage block of DUPRE_CSS; gradients are additions-scoped until merge. */ - DUPRE.drumRoller = function (host, opts = {}) { + const mergedDrumRollerReference = function (host, opts = {}) { const onChange = opts.onChange || noop; const MIN = opts.min !== undefined ? opts.min : 1; const MAX = opts.max !== undefined ? opts.max : 10; @@ -313,7 +295,7 @@ foreshortens through the pivot and re-extends downward, never sweeping sideways. Contract unchanged from stock: opts onLabel/offLabel/on/ onChange(on, 'ON'|'OFF'); handle {el, get, set}. */ - DUPRE.guardedToggle = function (host, opts = {}) { + const mergedGuardedToggleReference = function (host, opts = {}) { const onChange = opts.onChange || noop; const s = stageSvg(host, 'rsvg press', 90, 100), cx = 45, cy = 52; grad('dkaDiscRed', 'radialGradient', { cx: '42%', cy: '34%', r: '85%' }, [['0', '#d98a6f'], ['.65', 'var(--fail)'], ['1', '#7a2a1a']]); |
