use-scroll-animate 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/README.md +2 -2
  3. package/README_ja.md +2 -2
  4. package/README_zh.md +2 -2
  5. package/dist/chunks/{generative-BRUZaIsX.js → generative-2LhxG5BJ.js} +2 -2
  6. package/dist/chunks/{generative-BRUZaIsX.js.map → generative-2LhxG5BJ.js.map} +1 -1
  7. package/dist/chunks/{gpu-XHWzeNb5.js → gpu-EjV49FQk.js} +3 -3
  8. package/dist/chunks/{gpu-XHWzeNb5.js.map → gpu-EjV49FQk.js.map} +1 -1
  9. package/dist/chunks/{shared-eweTlzxv.js → shared-CkKHWrtJ.js} +2 -2
  10. package/dist/chunks/{shared-eweTlzxv.js.map → shared-CkKHWrtJ.js.map} +1 -1
  11. package/dist/components/effects.js +3 -3
  12. package/dist/components/fx-gpu.js +3 -3
  13. package/dist/components/fx-light.cjs +221 -0
  14. package/dist/components/fx-light.cjs.map +1 -0
  15. package/dist/components/fx-light.d.cts +72 -0
  16. package/dist/components/fx-light.d.ts +72 -0
  17. package/dist/components/fx-light.js +217 -0
  18. package/dist/components/fx-light.js.map +1 -0
  19. package/dist/components/fx-text.js +1 -1
  20. package/dist/components/fx2.cjs +6 -0
  21. package/dist/components/fx2.cjs.map +1 -1
  22. package/dist/components/fx2.d.cts +29 -1
  23. package/dist/components/fx2.d.ts +29 -1
  24. package/dist/components/fx2.js +9 -5
  25. package/dist/components/fx2.js.map +1 -1
  26. package/dist/components/widgets.cjs +519 -14
  27. package/dist/components/widgets.cjs.map +1 -1
  28. package/dist/components/widgets.d.cts +67 -2
  29. package/dist/components/widgets.d.ts +67 -2
  30. package/dist/components/widgets.js +514 -15
  31. package/dist/components/widgets.js.map +1 -1
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.umd.js +1 -1
  37. package/dist/index.umd.js.map +1 -1
  38. package/dist/widgets.umd.js +1 -1
  39. package/dist/widgets.umd.js.map +1 -1
  40. package/docs/ROADMAP.md +1 -1
  41. package/docs/components.md +29 -1
  42. package/package.json +14 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fx-light.js","sources":["../../src/components/fx2/light.ts"],"sourcesContent":["/**\n * 6.4 — Light & materials (`motionary/components/fx-light`), registered\n * through `registerEffect()`. Persistent effects (use `trigger=\"load\"`)\n * that return a cleanup:\n *\n * - `light-follow` (hover) — a soft point light + specular highlight that\n * follows the pointer over the surface.\n * - `refraction` (hover) — a glass lens that bends and magnifies what is\n * behind it as it follows the pointer (backdrop filter, chromatic rim).\n * - `brushed-metal` (card) — fine brushed lines with an anisotropic sheen\n * that turns with the pointer angle.\n * - `pearlescent` (card) — a nacre / holographic film whose hues shift with\n * the pointer position.\n * - `god-rays` (background) — volumetric light shafts from a source point\n * (Canvas 2D, additive).\n * - `pointer-shadow` (hover) — the pointer is the light: the element casts\n * a soft real-time shadow away from it.\n *\n * Reduced motion: surfaces stay lit from a fixed angle (no tracking),\n * `god-rays` draws one still frame.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\nimport { canvasBackground, hexRgb } from '../effects/generative';\nimport { overlay } from '../effects/shared';\n\n/** Track the pointer over `el` as 0–1 coordinates (`fn(x, y, inside)`); starts at (`x0`, `y0`). Returns a remover. */\nexport function trackPointer(el: HTMLElement, ctx: EffectContext, fn: (x: number, y: number, inside: boolean) => void, x0 = 0.3, y0 = 0.25): () => void {\n fn(x0, y0, false);\n if (ctx.reduced) return () => undefined;\n let raf = 0;\n let px = x0;\n let py = y0;\n let inside = false;\n const flush = () => {\n raf = 0;\n fn(px, py, inside);\n };\n const queue = () => {\n if (!raf) raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame(flush) : (flush(), 0);\n };\n const move = (e: PointerEvent) => {\n const r = el.getBoundingClientRect();\n px = r.width ? Math.min(1, Math.max(0, (e.clientX - r.left) / r.width)) : 0.5;\n py = r.height ? Math.min(1, Math.max(0, (e.clientY - r.top) / r.height)) : 0.5;\n inside = true;\n queue();\n };\n const leave = () => {\n inside = false;\n px = x0;\n py = y0;\n queue();\n };\n el.addEventListener('pointermove', move);\n el.addEventListener('pointerleave', leave);\n return () => {\n if (raf && typeof cancelAnimationFrame === 'function') cancelAnimationFrame(raf);\n el.removeEventListener('pointermove', move);\n el.removeEventListener('pointerleave', leave);\n };\n}\n\nconst rgba = (hex: string, a: number) => {\n const [r, g, b] = hexRgb(hex);\n return `rgba(${r},${g},${b},${a})`;\n};\n\nexport const LIGHT_FX: EffectDefinition[] = [\n {\n name: 'light-follow',\n kind: 'hover',\n reduced: 'run',\n description: 'A soft point light with a specular hot spot follows the pointer over the surface (persistent; `color`, `size` px, `intensity` 0–1).',\n defaults: { color: '#ffffff', size: 260, intensity: 0.55 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const [ov, rm] = overlay(el, 'mix-blend-mode:soft-light;transition:opacity .3s;z-index:1');\n const [spec, rm2] = overlay(el, 'mix-blend-mode:screen;z-index:1');\n const stop = trackPointer(el, ctx, (x, y, inside) => {\n const p = `${(x * 100).toFixed(1)}% ${(y * 100).toFixed(1)}%`;\n ov.style.background = `radial-gradient(${o.size}px circle at ${p}, ${rgba(o.color, o.intensity)}, transparent 70%), radial-gradient(${o.size * 2.4}px circle at ${p}, transparent 30%, rgba(0,0,0,${(o.intensity * 0.45).toFixed(2)}))`;\n spec.style.background = `radial-gradient(${Math.round(o.size / 5)}px circle at ${p}, ${rgba(o.color, inside ? o.intensity * 0.7 : o.intensity * 0.35)}, transparent 70%)`;\n el.style.setProperty('--usa-lx', x.toFixed(3));\n el.style.setProperty('--usa-ly', y.toFixed(3));\n });\n return () => {\n stop();\n rm();\n rm2();\n };\n },\n },\n {\n name: 'refraction',\n kind: 'hover',\n reduced: 'run',\n description: 'A glass lens bends and magnifies what is behind it while following the pointer (persistent; `size` px, `blur`, `rim` color). Uses backdrop-filter.',\n defaults: { size: 120, blur: 1.5, zoom: 1.12, rim: '#9be7ff' },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (getComputedStyle(el).position === 'static') el.style.position = 'relative';\n const lens = document.createElement('span');\n lens.setAttribute('aria-hidden', 'true');\n const s = Number(o.size) || 120;\n lens.style.cssText = `position:absolute;left:0;top:0;width:${s}px;height:${s}px;border-radius:50%;pointer-events:none;z-index:2;` +\n `-webkit-backdrop-filter:blur(${o.blur}px) saturate(1.6) contrast(1.08) brightness(1.08);backdrop-filter:blur(${o.blur}px) saturate(1.6) contrast(1.08) brightness(1.08);` +\n `box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),inset 6px 8px 14px rgba(255,255,255,.45),inset -8px -10px 18px ${rgba(o.rim, 0.45)},0 10px 30px -8px rgba(0,0,0,.35);` +\n `background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.55),rgba(255,255,255,0) 32%),radial-gradient(circle at 70% 78%,${rgba(o.rim, 0.25)},transparent 45%);transform-origin:50% 50%;will-change:transform;transition:opacity .25s`;\n el.appendChild(lens);\n const stop = trackPointer(el, ctx, (x, y, inside) => {\n const w = el.clientWidth;\n const h = el.clientHeight;\n lens.style.transform = `translate(${(x * w - s / 2).toFixed(1)}px,${(y * h - s / 2).toFixed(1)}px) scale(${inside ? o.zoom : 1})`;\n lens.style.opacity = inside || ctx.reduced ? '1' : '.85';\n }, 0.5, 0.5);\n return () => {\n stop();\n lens.remove();\n };\n },\n },\n {\n name: 'brushed-metal',\n kind: 'card',\n reduced: 'run',\n description: 'Fine brushed-metal lines with an anisotropic sheen that turns with the pointer angle (persistent; `tint`, `lines` px).',\n defaults: { tint: '#cbd5e1', lines: 2 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const l = Math.max(1, Number(o.lines) || 2);\n const [grain, rm] = overlay(el, `z-index:0;opacity:.55;mix-blend-mode:overlay;background:repeating-linear-gradient(90deg,rgba(255,255,255,.18) 0 1px,rgba(0,0,0,.12) 1px ${l}px,rgba(255,255,255,.06) ${l}px ${l * 2 + 1}px),linear-gradient(180deg,${rgba(o.tint, 0.9)},${rgba(o.tint, 0.55)})`);\n const [sheen, rm2] = overlay(el, 'z-index:1;mix-blend-mode:soft-light');\n const stop = trackPointer(el, ctx, (x, y) => {\n const ang = Math.atan2(y - 0.5, x - 0.5) * (180 / Math.PI) + 90;\n sheen.style.background = `conic-gradient(from ${ang.toFixed(1)}deg at ${(x * 100).toFixed(1)}% ${(y * 100).toFixed(1)}%, rgba(255,255,255,.75), rgba(0,0,0,.35) 25%, rgba(255,255,255,.6) 50%, rgba(0,0,0,.35) 75%, rgba(255,255,255,.75))`;\n });\n void grain;\n return () => {\n stop();\n rm();\n rm2();\n };\n },\n },\n {\n name: 'pearlescent',\n kind: 'card',\n reduced: 'run',\n description: 'A nacre / holographic film whose hues shift with the pointer position (persistent; `strength` 0–1).',\n defaults: { strength: 0.6 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const [film, rm] = overlay(el, `z-index:1;mix-blend-mode:color-dodge;opacity:${o.strength}`);\n const [gloss, rm2] = overlay(el, 'z-index:1;mix-blend-mode:soft-light');\n const stop = trackPointer(el, ctx, (x, y) => {\n const hue = Math.round((x * 0.7 + y * 0.3) * 360);\n film.style.background = `linear-gradient(${Math.round(115 + x * 50)}deg, hsla(${hue},90%,70%,.55), hsla(${hue + 60},90%,75%,.35) 25%, hsla(${hue + 140},85%,70%,.5) 50%, hsla(${hue + 220},90%,75%,.35) 75%, hsla(${hue + 300},90%,70%,.55))`;\n film.style.backgroundSize = '220% 220%';\n film.style.backgroundPosition = `${(x * 100).toFixed(1)}% ${(y * 100).toFixed(1)}%`;\n gloss.style.background = `radial-gradient(80% 60% at ${(x * 100).toFixed(1)}% ${(y * 100).toFixed(1)}%, rgba(255,255,255,.65), transparent 60%)`;\n });\n return () => {\n stop();\n rm();\n rm2();\n };\n },\n },\n {\n name: 'god-rays',\n kind: 'background',\n reduced: 'run',\n description: 'Volumetric light shafts fan out from a source point and slowly sweep (Canvas 2D, additive; `color`, `rays`, `x` / `y` source 0–1).',\n defaults: { color: '#ffe7a3', background: '#0b1020', rays: 14, x: 0.5, y: -0.1, speed: 1, quality: 1 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const stop = canvasBackground(el, ctx, {\n init: () => ({ seeds: Array.from({ length: Math.max(3, o.rays | 0) }, (_, i) => ({ a: (i / o.rays) * 1.6 - 0.8 + Math.random() * 0.08, w: 0.03 + Math.random() * 0.06, p: Math.random() * 6.28 })) }),\n draw: ({ ctx: g, w, h, t, state }) => {\n g.globalCompositeOperation = 'source-over';\n g.fillStyle = o.background;\n g.fillRect(0, 0, w, h);\n const sx = o.x * w;\n const sy = o.y * h;\n const len = Math.hypot(w, h) * 1.2;\n const [r, gg, b] = hexRgb(o.color);\n g.globalCompositeOperation = 'lighter';\n for (const s of state.seeds) {\n const a = Math.PI / 2 + s.a + Math.sin(t * 0.25 * o.speed + s.p) * 0.08;\n const alpha = 0.1 + 0.08 * Math.sin(t * 0.8 * o.speed + s.p * 2);\n const grad = g.createLinearGradient(sx, sy, sx + Math.cos(a) * len, sy + Math.sin(a) * len);\n grad.addColorStop(0, `rgba(${r},${gg},${b},${(alpha * 2).toFixed(3)})`);\n grad.addColorStop(1, `rgba(${r},${gg},${b},0)`);\n g.fillStyle = grad;\n g.beginPath();\n g.moveTo(sx, sy);\n g.lineTo(sx + Math.cos(a - s.w) * len, sy + Math.sin(a - s.w) * len);\n g.lineTo(sx + Math.cos(a + s.w) * len, sy + Math.sin(a + s.w) * len);\n g.closePath();\n g.fill();\n }\n const glow = g.createRadialGradient(sx, sy, 0, sx, sy, Math.max(w, h) * 0.45);\n glow.addColorStop(0, `rgba(${r},${gg},${b},.45)`);\n glow.addColorStop(1, `rgba(${r},${gg},${b},0)`);\n g.fillStyle = glow;\n g.fillRect(0, 0, w, h);\n g.globalCompositeOperation = 'source-over';\n },\n }, o);\n ctx.onCleanup(stop);\n return stop;\n },\n },\n {\n name: 'pointer-shadow',\n kind: 'hover',\n reduced: 'run',\n description: 'The pointer is the light: the element casts a soft real-time shadow away from it (persistent; `depth` px, `blur`, `color`).',\n defaults: { depth: 22, blur: 18, color: 'rgba(15,23,42,.38)' },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const prev = el.style.filter;\n const stop = trackPointer(el, ctx, (x, y, inside) => {\n const dx = (0.5 - x) * 2 * o.depth;\n const dy = (0.5 - y) * 2 * o.depth;\n const k = inside ? 1 : 0.6;\n el.style.filter = `drop-shadow(${(dx * k).toFixed(1)}px ${(dy * k + 4).toFixed(1)}px ${o.blur}px ${o.color})`;\n }, 0.35, 0.2);\n return () => {\n stop();\n el.style.filter = prev;\n };\n },\n },\n];\n\n/** Register the 6.4 light & materials pack (idempotent). */\nexport function registerLightEffects(): void {\n registerEffects(LIGHT_FX);\n}\n"],"names":[],"mappings":";;;;;AA0BA;AACM,SAAU,YAAY,CAAC,EAAe,EAAE,GAAkB,EAAE,EAAmD,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,IAAI,EAAA;AACxI,IAAA,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC;IACjB,IAAI,GAAG,CAAC,OAAO;AAAE,QAAA,OAAO,MAAM,SAAS;IACvC,IAAI,GAAG,GAAG,CAAC;IACX,IAAI,EAAE,GAAG,EAAE;IACX,IAAI,EAAE,GAAG,EAAE;IACX,IAAI,MAAM,GAAG,KAAK;IAClB,MAAM,KAAK,GAAG,MAAK;QACjB,GAAG,GAAG,CAAC;AACP,QAAA,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC;AACpB,IAAA,CAAC;IACD,MAAM,KAAK,GAAG,MAAK;AACjB,QAAA,IAAI,CAAC,GAAG;YAAE,GAAG,GAAG,OAAO,qBAAqB,KAAK,UAAU,GAAG,qBAAqB,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registry-Bu5NrAyA.js';
2
2
  import { u as srText } from '../chunks/base-DchG4q_S.js';
3
- import { a as all, r as rand, f as fxLayer, s as spawn } from '../chunks/shared-eweTlzxv.js';
3
+ import { a as all, r as rand, f as fxLayer, s as spawn } from '../chunks/shared-CkKHWrtJ.js';
4
4
 
5
5
  /** Split `el`'s text into `aria-hidden` inline-block characters (idempotent). Returns them. */
6
6
  function splitChars(el) {
@@ -2,6 +2,7 @@
2
2
 
3
3
  var components_fxGpu = require('../chunks/gpu-BBRLgEzM.cjs');
4
4
  var components_fxText = require('./fx-text.cjs');
5
+ var components_fxLight = require('./fx-light.cjs');
5
6
  require('../chunks/registry-DehBVRDV.cjs');
6
7
  require('../chunks/base-BaQV-2ha.cjs');
7
8
  require('../chunks/generative-BHIj-NU0.cjs');
@@ -11,11 +12,13 @@ require('../chunks/shared-jkgRH-Hx.cjs');
11
12
  const FX2_PACKS = {
12
13
  gpu: components_fxGpu.GPU_FX,
13
14
  text: components_fxText.TEXT3_FX,
15
+ light: components_fxLight.LIGHT_FX,
14
16
  };
15
17
  /** Register every 6.x pack (idempotent). */
16
18
  function registerFx2() {
17
19
  components_fxGpu.registerGpuEffects();
18
20
  components_fxText.registerTextEffects3();
21
+ components_fxLight.registerLightEffects();
19
22
  }
20
23
 
21
24
  exports.GLSL_HEAD = components_fxGpu.GLSL_HEAD;
@@ -27,6 +30,9 @@ exports.supportsWebGL2 = components_fxGpu.supportsWebGL2;
27
30
  exports.TEXT3_FX = components_fxText.TEXT3_FX;
28
31
  exports.registerTextEffects3 = components_fxText.registerTextEffects3;
29
32
  exports.splitChars = components_fxText.splitChars;
33
+ exports.LIGHT_FX = components_fxLight.LIGHT_FX;
34
+ exports.registerLightEffects = components_fxLight.registerLightEffects;
35
+ exports.trackPointer = components_fxLight.trackPointer;
30
36
  exports.FX2_PACKS = FX2_PACKS;
31
37
  exports.registerFx2 = registerFx2;
32
38
  //# sourceMappingURL=fx2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n}\n"],"names":["GPU_FX","TEXT3_FX","registerGpuEffects","registerTextEffects3"],"mappings":";;;;;;;;;AAaA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAEA,uBAAM;AACX,IAAA,IAAI,EAAEC,0BAAQ;;AAGhB;SACgB,WAAW,GAAA;AACzB,IAAAC,mCAAkB,EAAE;AACpB,IAAAC,sCAAoB,EAAE;AACxB;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\nimport { LIGHT_FX, registerLightEffects, trackPointer } from './light';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightEffects, trackPointer };\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n registerLightEffects();\n}\n"],"names":["GPU_FX","TEXT3_FX","LIGHT_FX","registerGpuEffects","registerTextEffects3","registerLightEffects"],"mappings":";;;;;;;;;;AAgBA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAEA,uBAAM;AACX,IAAA,IAAI,EAAEC,0BAAQ;AACd,IAAA,KAAK,EAAEC,2BAAQ;;AAGjB;SACgB,WAAW,GAAA;AACzB,IAAAC,mCAAkB,EAAE;AACpB,IAAAC,sCAAoB,EAAE;AACtB,IAAAC,uCAAoB,EAAE;AACxB;;;;;;;;;;;;;;;;;"}
@@ -86,6 +86,34 @@ declare const TEXT3_FX: EffectDefinition[];
86
86
  /** Register the 6.3 text pack (idempotent). */
87
87
  declare function registerTextEffects3(): void;
88
88
 
89
+ /**
90
+ * 6.4 — Light & materials (`motionary/components/fx-light`), registered
91
+ * through `registerEffect()`. Persistent effects (use `trigger="load"`)
92
+ * that return a cleanup:
93
+ *
94
+ * - `light-follow` (hover) — a soft point light + specular highlight that
95
+ * follows the pointer over the surface.
96
+ * - `refraction` (hover) — a glass lens that bends and magnifies what is
97
+ * behind it as it follows the pointer (backdrop filter, chromatic rim).
98
+ * - `brushed-metal` (card) — fine brushed lines with an anisotropic sheen
99
+ * that turns with the pointer angle.
100
+ * - `pearlescent` (card) — a nacre / holographic film whose hues shift with
101
+ * the pointer position.
102
+ * - `god-rays` (background) — volumetric light shafts from a source point
103
+ * (Canvas 2D, additive).
104
+ * - `pointer-shadow` (hover) — the pointer is the light: the element casts
105
+ * a soft real-time shadow away from it.
106
+ *
107
+ * Reduced motion: surfaces stay lit from a fixed angle (no tracking),
108
+ * `god-rays` draws one still frame.
109
+ */
110
+
111
+ /** Track the pointer over `el` as 0–1 coordinates (`fn(x, y, inside)`); starts at (`x0`, `y0`). Returns a remover. */
112
+ declare function trackPointer(el: HTMLElement, ctx: EffectContext, fn: (x: number, y: number, inside: boolean) => void, x0?: number, y0?: number): () => void;
113
+ declare const LIGHT_FX: EffectDefinition[];
114
+ /** Register the 6.4 light & materials pack (idempotent). */
115
+ declare function registerLightEffects(): void;
116
+
89
117
  /**
90
118
  * 5.5 — generative backgrounds on Canvas 2D, registered through
91
119
  * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
@@ -158,5 +186,5 @@ declare const FX2_PACKS: Record<string, EffectDefinition[]>;
158
186
  /** Register every 6.x pack (idempotent). */
159
187
  declare function registerFx2(): void;
160
188
 
161
- export { FX2_PACKS, GLSL_HEAD, GPU_FX, TEXT3_FX, fieldFallback, registerFx2, registerGpuEffects, registerTextEffects3, shaderBackground, splitChars, supportsWebGL2 };
189
+ export { FX2_PACKS, GLSL_HEAD, GPU_FX, LIGHT_FX, TEXT3_FX, fieldFallback, registerFx2, registerGpuEffects, registerLightEffects, registerTextEffects3, shaderBackground, splitChars, supportsWebGL2, trackPointer };
162
190
  export type { ShaderSpec };
@@ -86,6 +86,34 @@ declare const TEXT3_FX: EffectDefinition[];
86
86
  /** Register the 6.3 text pack (idempotent). */
87
87
  declare function registerTextEffects3(): void;
88
88
 
89
+ /**
90
+ * 6.4 — Light & materials (`motionary/components/fx-light`), registered
91
+ * through `registerEffect()`. Persistent effects (use `trigger="load"`)
92
+ * that return a cleanup:
93
+ *
94
+ * - `light-follow` (hover) — a soft point light + specular highlight that
95
+ * follows the pointer over the surface.
96
+ * - `refraction` (hover) — a glass lens that bends and magnifies what is
97
+ * behind it as it follows the pointer (backdrop filter, chromatic rim).
98
+ * - `brushed-metal` (card) — fine brushed lines with an anisotropic sheen
99
+ * that turns with the pointer angle.
100
+ * - `pearlescent` (card) — a nacre / holographic film whose hues shift with
101
+ * the pointer position.
102
+ * - `god-rays` (background) — volumetric light shafts from a source point
103
+ * (Canvas 2D, additive).
104
+ * - `pointer-shadow` (hover) — the pointer is the light: the element casts
105
+ * a soft real-time shadow away from it.
106
+ *
107
+ * Reduced motion: surfaces stay lit from a fixed angle (no tracking),
108
+ * `god-rays` draws one still frame.
109
+ */
110
+
111
+ /** Track the pointer over `el` as 0–1 coordinates (`fn(x, y, inside)`); starts at (`x0`, `y0`). Returns a remover. */
112
+ declare function trackPointer(el: HTMLElement, ctx: EffectContext, fn: (x: number, y: number, inside: boolean) => void, x0?: number, y0?: number): () => void;
113
+ declare const LIGHT_FX: EffectDefinition[];
114
+ /** Register the 6.4 light & materials pack (idempotent). */
115
+ declare function registerLightEffects(): void;
116
+
89
117
  /**
90
118
  * 5.5 — generative backgrounds on Canvas 2D, registered through
91
119
  * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
@@ -158,5 +186,5 @@ declare const FX2_PACKS: Record<string, EffectDefinition[]>;
158
186
  /** Register every 6.x pack (idempotent). */
159
187
  declare function registerFx2(): void;
160
188
 
161
- export { FX2_PACKS, GLSL_HEAD, GPU_FX, TEXT3_FX, fieldFallback, registerFx2, registerGpuEffects, registerTextEffects3, shaderBackground, splitChars, supportsWebGL2 };
189
+ export { FX2_PACKS, GLSL_HEAD, GPU_FX, LIGHT_FX, TEXT3_FX, fieldFallback, registerFx2, registerGpuEffects, registerLightEffects, registerTextEffects3, shaderBackground, splitChars, supportsWebGL2, trackPointer };
162
190
  export type { ShaderSpec };
@@ -1,22 +1,26 @@
1
- import { G as GPU_FX, r as registerGpuEffects } from '../chunks/gpu-XHWzeNb5.js';
2
- export { a as GLSL_HEAD, f as fieldFallback, s as shaderBackground, b as supportsWebGL2 } from '../chunks/gpu-XHWzeNb5.js';
1
+ import { G as GPU_FX, r as registerGpuEffects } from '../chunks/gpu-EjV49FQk.js';
2
+ export { a as GLSL_HEAD, f as fieldFallback, s as shaderBackground, b as supportsWebGL2 } from '../chunks/gpu-EjV49FQk.js';
3
3
  import { TEXT3_FX, registerTextEffects3 } from './fx-text.js';
4
4
  export { splitChars } from './fx-text.js';
5
+ import { LIGHT_FX, registerLightEffects } from './fx-light.js';
6
+ export { trackPointer } from './fx-light.js';
5
7
  import '../chunks/registry-Bu5NrAyA.js';
6
8
  import '../chunks/base-DchG4q_S.js';
7
- import '../chunks/generative-BRUZaIsX.js';
8
- import '../chunks/shared-eweTlzxv.js';
9
+ import '../chunks/generative-2LhxG5BJ.js';
10
+ import '../chunks/shared-CkKHWrtJ.js';
9
11
 
10
12
  /** The 6.x effect packs by name. */
11
13
  const FX2_PACKS = {
12
14
  gpu: GPU_FX,
13
15
  text: TEXT3_FX,
16
+ light: LIGHT_FX,
14
17
  };
15
18
  /** Register every 6.x pack (idempotent). */
16
19
  function registerFx2() {
17
20
  registerGpuEffects();
18
21
  registerTextEffects3();
22
+ registerLightEffects();
19
23
  }
20
24
 
21
- export { FX2_PACKS, GPU_FX, TEXT3_FX, registerFx2, registerGpuEffects, registerTextEffects3 };
25
+ export { FX2_PACKS, GPU_FX, LIGHT_FX, TEXT3_FX, registerFx2, registerGpuEffects, registerLightEffects, registerTextEffects3 };
22
26
  //# sourceMappingURL=fx2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n}\n"],"names":[],"mappings":";;;;;;;;;AAaA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;;AAGhB;SACgB,WAAW,GAAA;AACzB,IAAA,kBAAkB,EAAE;AACpB,IAAA,oBAAoB,EAAE;AACxB;;;;"}
1
+ {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\nimport { LIGHT_FX, registerLightEffects, trackPointer } from './light';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightEffects, trackPointer };\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n registerLightEffects();\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;;AAGjB;SACgB,WAAW,GAAA;AACzB,IAAA,kBAAkB,EAAE;AACpB,IAAA,oBAAoB,EAAE;AACtB,IAAA,oBAAoB,EAAE;AACxB;;;;"}