motionary 10.4.0 → 10.6.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 (125) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +97 -0
  3. package/dist/chunks/{anim-image-blQgPFFS.cjs → anim-image-DECLkPH4.cjs} +2 -2
  4. package/dist/chunks/{anim-image-blQgPFFS.cjs.map → anim-image-DECLkPH4.cjs.map} +1 -1
  5. package/dist/chunks/{anim-image-DDdb9q3X.js → anim-image-DNghy017.js} +2 -2
  6. package/dist/chunks/{anim-image-DDdb9q3X.js.map → anim-image-DNghy017.js.map} +1 -1
  7. package/dist/chunks/{keyframes-tC3I7anQ.cjs → keyframes-CbUZjD_5.cjs} +2 -2
  8. package/dist/chunks/{keyframes-tC3I7anQ.cjs.map → keyframes-CbUZjD_5.cjs.map} +1 -1
  9. package/dist/chunks/{keyframes-B5PWe5bU.js → keyframes-F6vp6tZZ.js} +2 -2
  10. package/dist/chunks/{keyframes-B5PWe5bU.js.map → keyframes-F6vp6tZZ.js.map} +1 -1
  11. package/dist/chunks/{registry-CT-TT_bx.js → registry-D8LAoXI-.js} +2 -2
  12. package/dist/chunks/{registry-CT-TT_bx.js.map → registry-D8LAoXI-.js.map} +1 -1
  13. package/dist/chunks/{registry-tzwKkldE.cjs → registry-dr1CPTk1.cjs} +2 -2
  14. package/dist/chunks/{registry-tzwKkldE.cjs.map → registry-dr1CPTk1.cjs.map} +1 -1
  15. package/dist/chunks/{ticker-Un0bvTWR.cjs → ticker-DaAlEyOd.cjs} +2 -2
  16. package/dist/chunks/{ticker-Un0bvTWR.cjs.map → ticker-DaAlEyOd.cjs.map} +1 -1
  17. package/dist/chunks/{ticker-C8lSGml9.js → ticker-Do9bGsaV.js} +2 -2
  18. package/dist/chunks/{ticker-C8lSGml9.js.map → ticker-Do9bGsaV.js.map} +1 -1
  19. package/dist/chunks/{tween-BcejKpsx.js → tween-BzCGq_Ba.js} +2 -2
  20. package/dist/chunks/{tween-BcejKpsx.js.map → tween-BzCGq_Ba.js.map} +1 -1
  21. package/dist/chunks/{tween-CwLLC3Ko.cjs → tween-CmkdSyaC.cjs} +2 -2
  22. package/dist/chunks/{tween-CwLLC3Ko.cjs.map → tween-CmkdSyaC.cjs.map} +1 -1
  23. package/dist/components/lite.cjs +179 -0
  24. package/dist/components/lite.cjs.map +1 -1
  25. package/dist/components/lite.js +176 -1
  26. package/dist/components/lite.js.map +1 -1
  27. package/dist/components/tokens.cjs +179 -0
  28. package/dist/components/tokens.cjs.map +1 -1
  29. package/dist/components/tokens.d.cts +36 -1
  30. package/dist/components/tokens.d.ts +36 -1
  31. package/dist/components/tokens.js +176 -1
  32. package/dist/components/tokens.js.map +1 -1
  33. package/dist/components/widgets.cjs +1138 -213
  34. package/dist/components/widgets.cjs.map +1 -1
  35. package/dist/components/widgets.d.cts +401 -2
  36. package/dist/components/widgets.d.ts +401 -2
  37. package/dist/components/widgets.js +1124 -214
  38. package/dist/components/widgets.js.map +1 -1
  39. package/dist/components.cjs +4 -0
  40. package/dist/components.cjs.map +1 -1
  41. package/dist/components.d.cts +36 -1
  42. package/dist/components.d.ts +36 -1
  43. package/dist/components.js +1 -1
  44. package/dist/components.umd.js +2 -2
  45. package/dist/components.umd.js.map +1 -1
  46. package/dist/index.umd.js.map +1 -1
  47. package/dist/llms-full.txt +273 -1
  48. package/dist/llms.txt +14 -2
  49. package/dist/manifest.json +736 -1
  50. package/dist/runtime/format-apng.cjs +4 -4
  51. package/dist/runtime/format-apng.js +4 -4
  52. package/dist/runtime/format-css.cjs +4 -4
  53. package/dist/runtime/format-css.js +4 -4
  54. package/dist/runtime/format-gif.cjs +4 -4
  55. package/dist/runtime/format-gif.js +4 -4
  56. package/dist/runtime/format-gltf.cjs +207 -0
  57. package/dist/runtime/format-gltf.cjs.map +1 -0
  58. package/dist/runtime/format-gltf.d.cts +251 -0
  59. package/dist/runtime/format-gltf.d.ts +251 -0
  60. package/dist/runtime/format-gltf.iife.js +2 -0
  61. package/dist/runtime/format-gltf.iife.js.map +1 -0
  62. package/dist/runtime/format-gltf.js +200 -0
  63. package/dist/runtime/format-gltf.js.map +1 -0
  64. package/dist/runtime/format-motion.cjs +4 -4
  65. package/dist/runtime/format-motion.js +4 -4
  66. package/dist/runtime/format-obj.cjs +181 -0
  67. package/dist/runtime/format-obj.cjs.map +1 -0
  68. package/dist/runtime/format-obj.d.cts +176 -0
  69. package/dist/runtime/format-obj.d.ts +176 -0
  70. package/dist/runtime/format-obj.iife.js +2 -0
  71. package/dist/runtime/format-obj.iife.js.map +1 -0
  72. package/dist/runtime/format-obj.js +174 -0
  73. package/dist/runtime/format-obj.js.map +1 -0
  74. package/dist/runtime/format-sprite.cjs +3 -3
  75. package/dist/runtime/format-sprite.js +3 -3
  76. package/dist/runtime/format-svg.cjs +3 -3
  77. package/dist/runtime/format-svg.js +3 -3
  78. package/dist/runtime/format-webp.cjs +4 -4
  79. package/dist/runtime/format-webp.js +4 -4
  80. package/dist/runtime/gl.cjs +763 -0
  81. package/dist/runtime/gl.cjs.map +1 -0
  82. package/dist/runtime/gl.d.cts +260 -0
  83. package/dist/runtime/gl.d.ts +260 -0
  84. package/dist/runtime/gl.iife.js +2 -0
  85. package/dist/runtime/gl.iife.js.map +1 -0
  86. package/dist/runtime/gl.js +739 -0
  87. package/dist/runtime/gl.js.map +1 -0
  88. package/dist/runtime/scroll.cjs +2 -2
  89. package/dist/runtime/scroll.js +2 -2
  90. package/dist/runtime/smooth.cjs +1 -1
  91. package/dist/runtime/smooth.js +1 -1
  92. package/dist/runtime/text.cjs +1 -1
  93. package/dist/runtime/text.js +1 -1
  94. package/dist/runtime/vector.cjs +704 -0
  95. package/dist/runtime/vector.cjs.map +1 -0
  96. package/dist/runtime/vector.d.cts +306 -0
  97. package/dist/runtime/vector.d.ts +306 -0
  98. package/dist/runtime/vector.iife.js +2 -0
  99. package/dist/runtime/vector.iife.js.map +1 -0
  100. package/dist/runtime/vector.js +692 -0
  101. package/dist/runtime/vector.js.map +1 -0
  102. package/dist/runtime.cjs +3 -3
  103. package/dist/runtime.d.cts +1 -1
  104. package/dist/runtime.d.ts +1 -1
  105. package/dist/runtime.iife.js +1 -1
  106. package/dist/runtime.iife.js.map +1 -1
  107. package/dist/runtime.js +5 -5
  108. package/dist/widgets.umd.js +1 -1
  109. package/dist/widgets.umd.js.map +1 -1
  110. package/docs/ROADMAP.md +2 -2
  111. package/docs/components/README.md +11 -1
  112. package/docs/components/usa-gl-scene.md +66 -0
  113. package/docs/components/usa-gpu-particles.md +32 -0
  114. package/docs/components/usa-lottie-player.md +60 -0
  115. package/docs/components/usa-rive.md +57 -0
  116. package/docs/components/usa-shader-backdrop.md +36 -0
  117. package/docs/components/usa-three-scene.md +20 -0
  118. package/docs/components/usa-token-editor.md +32 -0
  119. package/docs/components.md +120 -0
  120. package/docs/runtime/format-gltf.md +63 -0
  121. package/docs/runtime/format-obj.md +59 -0
  122. package/docs/runtime/gl.md +62 -0
  123. package/docs/runtime/rive.md +55 -0
  124. package/docs/runtime/vector.md +67 -0
  125. package/package.json +47 -3
@@ -1,4 +1,4 @@
1
- # Motionary 10.4.0 — full component reference
1
+ # Motionary 10.6.0 — full component reference
2
2
 
3
3
  Generated from the source. Machine-readable version: https://harrisoncn.github.io/Motionary/components.json (schema https://harrisoncn.github.io/Motionary/components.schema.json).
4
4
 
@@ -247,6 +247,121 @@ const anim = await loadWebp('/hero.webp');
247
247
  const p = animatedImagePlayer(document.querySelector('canvas'), anim, { speed: 0.5 });
248
248
  ```
249
249
 
250
+ ### motionary/runtime/gl — WebGL2 scene renderer
251
+
252
+ A small WebGL2 renderer with its own API: scene graph, camera, lights, box / plane / sphere / torus, PBR-style materials, shader materials, image and video textures, orbit controls — not a Three.js clone.
253
+
254
+ - Install: `npm i motionary`
255
+ - Import: `motionary/runtime/gl`
256
+ - Register: `use(gl);` — Register the core first, then the module: use(gl) also registers the core. CDN: load runtime.iife.js, then runtime/gl.iife.js (it registers itself).
257
+ - CDN:
258
+
259
+ ```html
260
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
261
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js"></script>
262
+ ```
263
+
264
+ ```js
265
+ import { use } from 'motionary/runtime';
266
+ import { gl, createRenderer, Scene, Camera, GlNode, torus, standardMaterial } from 'motionary/runtime/gl';
267
+ use(gl);
268
+ const r = createRenderer(canvas);
269
+ const scene = new Scene();
270
+ scene.add(new GlNode('donut', { geometry: torus(), material: standardMaterial({ color: [0.5, 0.55, 1, 1] }) }));
271
+ r.resize(); r.render(scene, new Camera({ position: [0, 0.5, 3] }));
272
+ ```
273
+
274
+ ### motionary/runtime/format-gltf — glTF 2.0 / GLB loader
275
+
276
+ Load glTF 2.0 (.gltf with external or data: buffers, .glb) into motionary/runtime/gl nodes: node hierarchy, meshes, PBR metallic-roughness materials, embedded / external images.
277
+
278
+ - Install: `npm i motionary`
279
+ - Import: `motionary/runtime/format-gltf`
280
+ - Register: `use(formatGltf);` — Register the core first, then the module: use(formatGltf) also registers the core. CDN: load runtime.iife.js, then runtime/format-gltf.iife.js (it registers itself).
281
+ - CDN:
282
+
283
+ ```html
284
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
285
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js"></script>
286
+ ```
287
+
288
+ ```js
289
+ import { use } from 'motionary/runtime';
290
+ import { gl, createRenderer, Scene, Camera, frameNode } from 'motionary/runtime/gl';
291
+ import { formatGltf, loadGltf } from 'motionary/runtime/format-gltf';
292
+ use(gl, formatGltf);
293
+ const model = await loadGltf('/models/chair.glb');
294
+ const scene = new Scene().add(model), cam = new Camera();
295
+ frameNode(cam, model);
296
+ const r = createRenderer(canvas); r.resize(); r.render(scene, cam);
297
+ ```
298
+
299
+ ### motionary/runtime/format-obj — OBJ / MTL loader
300
+
301
+ Load Wavefront OBJ (+ MTL materials and diffuse textures) into motionary/runtime/gl nodes: polygons triangulated, groups, per-material meshes.
302
+
303
+ - Install: `npm i motionary`
304
+ - Import: `motionary/runtime/format-obj`
305
+ - Register: `use(formatObj);` — Register the core first, then the module: use(formatObj) also registers the core. CDN: load runtime.iife.js, then runtime/format-obj.iife.js (it registers itself).
306
+ - CDN:
307
+
308
+ ```html
309
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
310
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js"></script>
311
+ ```
312
+
313
+ ```js
314
+ import { use } from 'motionary/runtime';
315
+ import { gl, Scene } from 'motionary/runtime/gl';
316
+ import { formatObj, loadObj } from 'motionary/runtime/format-obj';
317
+ use(gl, formatObj);
318
+ const cube = await loadObj('/models/cube.obj'); // + cube.mtl + textures next to it
319
+ new Scene().add(cube);
320
+ ```
321
+
322
+ ### motionary/runtime/vector — Lottie + dotLottie player
323
+
324
+ Plays Lottie (bodymovin JSON) and dotLottie (.lottie) files on Canvas 2D with Motionary’s own renderer (no lottie-web code): shapes, gradients, trim paths, masks, track mattes, precomps, images; a runtime timeline you can seek, reverse and scrub.
325
+
326
+ - Install: `npm i motionary`
327
+ - Import: `motionary/runtime/vector`
328
+ - Register: `use(vector);` — Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).
329
+ - CDN:
330
+
331
+ ```html
332
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
333
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
334
+ ```
335
+
336
+ ```js
337
+ import { use } from 'motionary/runtime';
338
+ import { vector, loadLottie, lottiePlayer } from 'motionary/runtime/vector';
339
+ use(vector);
340
+ const { animation } = await loadLottie('/anim/hero.lottie');
341
+ const player = lottiePlayer(canvas, animation, { loop: true });
342
+ player.play();
343
+ ```
344
+
345
+ ### @rive-app/canvas — Official Rive runtime
346
+
347
+ The official MIT-licensed Rive runtime, used by <usa-rive> to play .riv files (artboards, animations, state machines with inputs). Optional peer dependency: lazy-loaded on first use, never bundled into Motionary.
348
+
349
+ - Install: `npm i @rive-app/canvas`
350
+ - Import: `@rive-app/canvas`
351
+ - Register: `provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts` — Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.
352
+ - CDN:
353
+
354
+ ```html
355
+ <script src="https://unpkg.com/@rive-app/canvas@2.44.1/rive.js"></script>
356
+ ```
357
+
358
+ ```js
359
+ // npm i @rive-app/canvas
360
+ import { defineRive } from 'motionary/components/widgets';
361
+ defineRive();
362
+ // <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay></usa-rive>
363
+ ```
364
+
250
365
  ## Components
251
366
 
252
367
  ### <usa-accordion> — Accordion
@@ -1175,6 +1290,44 @@ Full-screen sections that snap one at a time, with keyboard paging, dot navigati
1175
1290
  </usa-gesture-sticker>
1176
1291
  ```
1177
1292
 
1293
+ ### <usa-gl-scene> — 3D scene (glTF / OBJ)
1294
+
1295
+ 10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel, pinch, arrow keys), auto-rotate and video textures. Requires motionary/runtime/gl (+ format-gltf for .gltf / .glb, format-obj for .obj) — npm i motionary, then use(gl, formatGltf, formatObj) before it mounts. Alias: <usa-three-scene>.
1296
+
1297
+ - Import: `import { defineGlScene } from 'motionary/components/widgets'; defineGlScene();`
1298
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1299
+ - Attributes: `src`, `shape`, `color`, `metallic`, `roughness`, `background`, `exposure`, `controls`, `auto-rotate`, `video`, `video-scrub`, `label`
1300
+ - Events: `usa:error`, `usa:load`, `usa:runtime-missing`
1301
+ - Methods: `reload()`
1302
+ - Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj
1303
+ - Install: `npm i motionary`
1304
+ - Order: Register the core first, then the module: use(gl) also registers the core. CDN: load runtime.iife.js, then runtime/gl.iife.js (it registers itself). Register the core first, then the module: use(formatGltf) also registers the core. CDN: load runtime.iife.js, then runtime/format-gltf.iife.js (it registers itself). Register the core first, then the module: use(formatObj) also registers the core. CDN: load runtime.iife.js, then runtime/format-obj.iife.js (it registers itself).
1305
+
1306
+ ```js
1307
+ import { use } from 'motionary/runtime';
1308
+ import { gl } from 'motionary/runtime/gl';
1309
+ import { formatGltf } from 'motionary/runtime/format-gltf';
1310
+ import { formatObj } from 'motionary/runtime/format-obj';
1311
+ import { defineGlScene } from 'motionary/components/widgets';
1312
+
1313
+ use(gl, formatGltf, formatObj);
1314
+ defineGlScene(); // registers <usa-gl-scene> — after the prerequisites
1315
+ ```
1316
+
1317
+ ```html
1318
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
1319
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js"></script>
1320
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js"></script>
1321
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js"></script>
1322
+ <!-- then the component bundles -->
1323
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
1324
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
1325
+ ```
1326
+
1327
+ ```html
1328
+ <usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
1329
+ ```
1330
+
1178
1331
  ### <usa-glitch> — Glitch text
1179
1332
 
1180
1333
  An RGB-split, sliced glitch — always on or on hover.
@@ -1203,6 +1356,19 @@ An RGB-split, sliced glitch — always on or on hover.
1203
1356
  <script>globe.flyTo('London');</script>
1204
1357
  ```
1205
1358
 
1359
+ ### <usa-gpu-particles> — GPU particle canvas
1360
+
1361
+ 10.5 (WebGPU effects 2.0): tens of thousands of particles simulated by a WebGPU compute shader and drawn as instanced quads — swirl, galaxy or fountain, pointer repulsion, trails; Canvas 2D fallback where WebGPU is missing.
1362
+
1363
+ - Import: `import { defineGpuParticles } from 'motionary/components/widgets'; defineGpuParticles();`
1364
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1365
+ - Attributes: `count`, `mode`, `colors`, `size`, `speed`, `trail`, `pointer`, `label`
1366
+ - Events: `usa:backend`
1367
+
1368
+ ```html
1369
+ <usa-gpu-particles count="30000" mode="galaxy" colors="#818cf8,#f472b6" pointer></usa-gpu-particles>
1370
+ ```
1371
+
1206
1372
  ### <usa-gradient-text> — Gradient flow
1207
1373
 
1208
1374
  Text filled with a multi-colour gradient that keeps flowing.
@@ -1537,6 +1703,40 @@ A slim NProgress-style bar for route changes and fetches: loadingBar.start() tri
1537
1703
  <usa-lottie-icon name="bell" trigger="hover"></usa-lottie-icon>
1538
1704
  ```
1539
1705
 
1706
+ ### <usa-lottie-player> — Lottie player (JSON + dotLottie)
1707
+
1708
+ 10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and images; autoplay, loop, bounce, segments / markers, play on hover or scrub with scroll. Requires motionary/runtime/vector — npm i motionary, then use(vector) before it mounts.
1709
+
1710
+ - Import: `import { defineLottiePlayer } from 'motionary/components/widgets'; defineLottiePlayer();`
1711
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1712
+ - Attributes: `src`, `animation`, `autoplay`, `loop`, `speed`, `mode`, `segment`, `hover`, `scrub`, `fit`, `background`, `label`
1713
+ - Events: `usa:complete`, `usa:load`, `usa:error`, `usa:runtime-missing`
1714
+ - Methods: `play()`, `pause()`, `stop()`, `seek()`
1715
+ - Requires: motionary/runtime/vector
1716
+ - Install: `npm i motionary`
1717
+ - Order: Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).
1718
+
1719
+ ```js
1720
+ import { use } from 'motionary/runtime';
1721
+ import { vector } from 'motionary/runtime/vector';
1722
+ import { defineLottiePlayer } from 'motionary/components/widgets';
1723
+
1724
+ use(vector);
1725
+ defineLottiePlayer(); // registers <usa-lottie-player> — after the prerequisites
1726
+ ```
1727
+
1728
+ ```html
1729
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
1730
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
1731
+ <!-- then the component bundles -->
1732
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
1733
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
1734
+ ```
1735
+
1736
+ ```html
1737
+ <usa-lottie-player src="/anim/hero.lottie" autoplay loop label="Hero animation"></usa-lottie-player>
1738
+ ```
1739
+
1540
1740
  ### <usa-lyrics> — Synced karaoke lyrics
1541
1741
 
1542
1742
  7.1: LRC or [data-t] lines; the active line glows, scrolls to the centre and a highlight sweeps across it while past lines dim. Follows an <audio>, <video> or <usa-music-player> via for.
@@ -2384,6 +2584,38 @@ Ink ripple from the pointer — or from the centre for Space/Enter — on any bu
2384
2584
  <usa-ripple><button>Click me</button></usa-ripple>
2385
2585
  ```
2386
2586
 
2587
+ ### <usa-rive> — Rive player (official runtime)
2588
+
2589
+ 10.6: plays Rive (.riv) files — artboards, animations and state machines with inputs — through the official Rive runtime @rive-app/canvas, an optional peer dependency that is lazy-loaded on first use (Motionary does not reimplement the proprietary .riv format). Requires @rive-app/canvas — npm i @rive-app/canvas, or load its CDN script first; missing → a clear message in place.
2590
+
2591
+ - Import: `import { defineRive } from 'motionary/components/widgets'; defineRive();`
2592
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2593
+ - Attributes: `src`, `artboard`, `animation`, `state-machine`, `autoplay`, `fit`, `label`, `runtime-src`
2594
+ - Events: `usa:load`, `usa:error`, `usa:runtime-missing`
2595
+ - Methods: `play()`, `pause()`, `input()`
2596
+ - Requires: @rive-app/canvas
2597
+ - Install: `npm i @rive-app/canvas`
2598
+ - Order: Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.
2599
+
2600
+ ```js
2601
+ import { provideRiveRuntime } from 'motionary/components/widgets';
2602
+ import { defineRive } from 'motionary/components/widgets';
2603
+
2604
+ provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts
2605
+ defineRive(); // registers <usa-rive> — after the prerequisites
2606
+ ```
2607
+
2608
+ ```html
2609
+ <script src="https://unpkg.com/@rive-app/canvas@2.44.1/rive.js"></script>
2610
+ <!-- then the component bundles -->
2611
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
2612
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
2613
+ ```
2614
+
2615
+ ```html
2616
+ <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay label="Icon"></usa-rive>
2617
+ ```
2618
+
2387
2619
  ### <usa-route-transition> — Route transition container
2388
2620
 
2389
2621
  10.3: View Transitions 2.0 — link clicks swap the container’s content with the target page (fetched) or an inline <template data-route>, animated with the View Transitions API (Web Animations fallback); data-shared elements morph between routes; cross-document enables native MPA transitions.
@@ -2565,6 +2797,21 @@ A GPU shader behind your content: gradient, plasma, waves or aurora presets —
2565
2797
  </usa-shader>
2566
2798
  ```
2567
2799
 
2800
+ ### <usa-shader-backdrop> — Shader backdrop + post chain
2801
+
2802
+ 10.5 (WebGPU effects 2.0): an animated shader background (aurora, plasma, waves, nebula or your own GLSL) run through a post-processing chain — bloom, vignette, grain, chromatic aberration, pixelate, scanlines — in any order; CSS gradient fallback.
2803
+
2804
+ - Import: `import { defineShaderBackdrop } from 'motionary/components/widgets'; defineShaderBackdrop();`
2805
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2806
+ - Attributes: `preset`, `post`, `colors`, `speed`, `intensity`, `label`
2807
+ - Events: `usa:backend`
2808
+
2809
+ ```html
2810
+ <usa-shader-backdrop preset="aurora" post="bloom,vignette,grain">
2811
+ <h1>Hello</h1>
2812
+ </usa-shader-backdrop>
2813
+ ```
2814
+
2568
2815
  ### <usa-sheet> — Drawer / bottom sheet
2569
2816
 
2570
2817
  6.3: a side sheet from the right, left, top or bottom with a blurred backdrop; the bottom sheet can be dragged down to dismiss and springs back otherwise. Native <dialog> underneath.
@@ -3121,6 +3368,17 @@ defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisit
3121
3368
  <usa-theme-switcher themes="light,dark,neon,glass,neu" persist></usa-theme-switcher>
3122
3369
  ```
3123
3370
 
3371
+ ### <usa-three-scene> — <usa-three-scene>
3372
+
3373
+ `<usa-three-scene>` — alias of `<usa-gl-scene>` (same attributes, events and methods; no Three.js involved).
3374
+
3375
+ - Import: `import { defineThreeScene } from 'motionary/components/widgets'; defineThreeScene();`
3376
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3377
+
3378
+ ```html
3379
+ <usa-three-scene></usa-three-scene>
3380
+ ```
3381
+
3124
3382
  ### <usa-tilt> — 3D tilt card
3125
3383
 
3126
3384
  Tilts toward the pointer in 3D with an optional glare; exposes --usa-tilt-x/y for parallax layers inside.
@@ -3207,6 +3465,20 @@ toast("Saved") slides a notification in; it pauses on hover, stacks with FLIP an
3207
3465
  </script>
3208
3466
  ```
3209
3467
 
3468
+ ### <usa-token-editor> — Motion token editor (W3C DTCG)
3469
+
3470
+ 10.6 (motion design tokens 2.0): edit duration and cubic-bézier easing tokens with a live preview per token, then export W3C Design Tokens (DTCG 2025.10 or the earlier draft) or import a DTCG file — aliases resolved, problems listed; apply writes the tokens to :root custom properties as you edit.
3471
+
3472
+ - Import: `import { defineTokenEditor } from 'motionary/components/widgets'; defineTokenEditor();`
3473
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3474
+ - Attributes: `apply`, `format`, `groups`
3475
+ - Events: `usa:export`, `usa:import`, `usa:change`
3476
+ - Methods: `exportJSON()`, `importJSON()`
3477
+
3478
+ ```html
3479
+ <usa-token-editor apply format="2025.10"></usa-token-editor>
3480
+ ```
3481
+
3210
3482
  ### <usa-typewriter> — Typewriter
3211
3483
 
3212
3484
  Types text, or cycles through phrases with delete and pause. Full text stays available to screen readers.
package/dist/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
- # Motionary 10.4.0
1
+ # Motionary 10.6.0
2
2
 
3
- > Motionary is a zero-dependency motion library: scroll animations, 200+ presets and 198 animated Web Components (<usa-*>) that work in plain HTML and every framework, plus motionary/runtime — its own tween/timeline engine and format loaders.
3
+ > Motionary is a zero-dependency motion library: scroll animations, 200+ presets and 205 animated Web Components (<usa-*>) that work in plain HTML and every framework, plus motionary/runtime — its own tween/timeline engine and format loaders.
4
4
 
5
5
  Install: `npm i motionary` · CDN: https://unpkg.com/motionary@10/dist/components.umd.js (+ https://unpkg.com/motionary@10/dist/widgets.umd.js for 6.x+ widgets) · Manifest: https://harrisoncn.github.io/Motionary/components.json · Full text: https://harrisoncn.github.io/Motionary/llms-full.txt
6
6
 
@@ -19,6 +19,11 @@ Rules for using a component: (1) import its define function from `import.path` a
19
19
  - [motionary/runtime/format-gif](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-gif.md): Decode animated GIFs (own LZW decoder, no DOM) into composited RGBA frames and play / scrub / reverse them on a canvas as a runtime timeline.
20
20
  - [motionary/runtime/format-apng](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-apng.md): Split animated PNGs into standalone frame PNGs (decoded by the browser), composite them (dispose / blend) and play them on a canvas as a runtime timeline.
21
21
  - [motionary/runtime/format-webp](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-webp.md): Split animated WebP files (ANIM / ANMF) into standalone frames (decoded by the browser), composite them (blend / dispose) and play them on a canvas as a runtime timeline.
22
+ - [motionary/runtime/gl](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gl.md): A small WebGL2 renderer with its own API: scene graph, camera, lights, box / plane / sphere / torus, PBR-style materials, shader materials, image and video textures, orbit controls — not a Three.js clone.
23
+ - [motionary/runtime/format-gltf](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-gltf.md): Load glTF 2.0 (.gltf with external or data: buffers, .glb) into motionary/runtime/gl nodes: node hierarchy, meshes, PBR metallic-roughness materials, embedded / external images.
24
+ - [motionary/runtime/format-obj](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-obj.md): Load Wavefront OBJ (+ MTL materials and diffuse textures) into motionary/runtime/gl nodes: polygons triangulated, groups, per-material meshes.
25
+ - [motionary/runtime/vector](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/vector.md): Plays Lottie (bodymovin JSON) and dotLottie (.lottie) files on Canvas 2D with Motionary’s own renderer (no lottie-web code): shapes, gradients, trim paths, masks, track mattes, precomps, images; a runtime timeline you can seek, reverse and scrub.
26
+ - [@rive-app/canvas](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/rive.md): The official MIT-licensed Rive runtime, used by <usa-rive> to play .riv files (artboards, animations, state machines with inputs). Optional peer dependency: lazy-loaded on first use, never bundled into Motionary.
22
27
 
23
28
  ## Components
24
29
 
@@ -82,8 +87,10 @@ Rules for using a component: (1) import its define function from `import.path` a
82
87
  - `<usa-gen-art>` (motionary/components/widgets): 9.3: seeded generative art on a canvas — flow fields, circle packing, Truchet tiles or layered waves in curated palettes; it draws itself in on screen and a tap
83
88
  - `<usa-gesture-fx>` (motionary/components/effects): 5.7: <usa-gesture-fx> plays any registered effect on a fling (fast release), a two-finger twist or a long press that charges --usa-charge 0 → 1. JS: bindGesture
84
89
  - `<usa-gesture-sticker>` (motionary/components/widgets): 8.7: a multi-touch sticker — drag with one finger, pinch with two to scale and twist to rotate, all at once, with a lifted shadow while held (wheel / Shift + wh
90
+ - `<usa-gl-scene>` (motionary/components/widgets; requires motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj): 10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel,
85
91
  - `<usa-glitch>` (motionary/components/text): An RGB-split, sliced glitch — always on or on hover.
86
92
  - `<usa-globe>` (motionary/components/widgets): 7.6: an SVG globe in orthographic projection — graticule, pulsing markers, spins while on screen, drag to turn it, flyTo(name) brings a city round to the front.
93
+ - `<usa-gpu-particles>` (motionary/components/widgets): 10.5 (WebGPU effects 2.0): tens of thousands of particles simulated by a WebGPU compute shader and drawn as instanced quads — swirl, galaxy or fountain, pointer
87
94
  - `<usa-gradient-text>` (motionary/components/text): Text filled with a multi-colour gradient that keeps flowing.
88
95
  - `<usa-grain>` (motionary/components/background): An SVG-noise grain overlay — no image to ship. animated makes it jitter like film.
89
96
  - `<usa-grid-glow>` (motionary/components/background): A line grid behind the content that lights up around the pointer.
@@ -106,6 +113,7 @@ Rules for using a component: (1) import its define function from `import.path` a
106
113
  - `<usa-location-card>` (motionary/components/widgets): 7.6: a place card with a stylised mini map — the route from the origin draws itself, the pin drops in with a bounce and a ring pulses; distance computed with ha
107
114
  - `<usa-lottie>` (motionary/components/widgets): 9.2: plays Lottie (After Effects / bodymovin) files without lottie-web — vector layers render as SVG and their keyframes run as native animations on Motionary’s
108
115
  - `<usa-lottie-icon>` (motionary/components/widgets): 9.2: an animated icon set shipped as tiny Lottie files — heart beat, bell swing, check draw-in, spinner, star twinkle, bolt zap — on click, hover, enter or loop
116
+ - `<usa-lottie-player>` (motionary/components/widgets; requires motionary/runtime/vector): 10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and
109
117
  - `<usa-lyrics>` (motionary/components/widgets): 7.1: LRC or [data-t] lines; the active line glows, scrolls to the centre and a highlight sweeps across it while past lines dim. Follows an <audio>, <video> or <
110
118
  - `<usa-magnetic>` (motionary/components/interaction): Content leans toward the pointer when it comes near and springs back. Fine pointers only; off under reduced motion.
111
119
  - `<usa-marquee>` (motionary/components/background): A seamless infinite ticker with constant speed, pause on hover, soft edges and vertical mode. Clones are hidden from AT.
@@ -161,6 +169,7 @@ Rules for using a component: (1) import its define function from `import.path` a
161
169
  - `<usa-retro-button>` (motionary/components/widgets): 8.2: buttons in four eras with matching press motion — 8-bit pixel (stepped press), CRT phosphor (flicker), Y2K chrome pill (bounce) and Windows 95 bevel (sink)
162
170
  - `<usa-reveal>` (motionary/components/reveal): Fade, slide, zoom, blur or flip content in as it enters the viewport. 12 effects, replay on re-entry with repeat.
163
171
  - `<usa-ripple>` (motionary/components/interaction): Ink ripple from the pointer — or from the centre for Space/Enter — on any button, list item or card.
172
+ - `<usa-rive>` (motionary/components/widgets; requires @rive-app/canvas): 10.6: plays Rive (.riv) files — artboards, animations and state machines with inputs — through the official Rive runtime @rive-app/canvas, an optional peer depe
164
173
  - `<usa-route-transition>` (motionary/components/widgets): 10.3: View Transitions 2.0 — link clicks swap the container’s content with the target page (fetched) or an inline <template data-route>, animated with the View
165
174
  - `<usa-scene>` (motionary/components/widgets): 9.1: a scroll-scrubbed cinematic shot — while the scene crosses the screen its image follows a camera move (dolly, pan, tilt, zoom, orbit) and captions fade in
166
175
  - `<usa-scramble>` (motionary/components/text): Decodes text out of random glyphs, left to right. Trigger on view, hover/focus or manually.
@@ -171,6 +180,7 @@ Rules for using a component: (1) import its define function from `import.path` a
171
180
  - `<usa-scrolly>` (motionary/components/reveal): A pinned graphic while [data-step] blocks scroll past; the active step drives the graphic via attributes, a CSS variable and events.
172
181
  - `<usa-segmented>` (motionary/components/widgets): 6.7: an iOS-style thumb slides under the chosen segment with a spring and stretches while it travels. A real radio group: arrow keys, Home / End. iOS, pill or o
173
182
  - `<usa-shader>` (motionary/components/webgl): A GPU shader behind your content: gradient, plasma, waves or aurora presets — or your own fragment shader in a <script type="x-shader/x-fragment">. Falls back t
183
+ - `<usa-shader-backdrop>` (motionary/components/widgets): 10.5 (WebGPU effects 2.0): an animated shader background (aurora, plasma, waves, nebula or your own GLSL) run through a post-processing chain — bloom, vignette,
174
184
  - `<usa-sheet>` (motionary/components/widgets): 6.3: a side sheet from the right, left, top or bottom with a blurred backdrop; the bottom sheet can be dragged down to dismiss and springs back otherwise. Nativ
175
185
  - `<usa-shimmer-text>` (motionary/components/text): A light sweep across gradient-filled text. CSS only; colours and speed via attributes or custom properties.
176
186
  - `<usa-shortcut>` (motionary/components/widgets): 7.9: keyboard-shortcut hints as keycaps (⌘ on Apple, Ctrl elsewhere); press the combination anywhere and the caps press down one after another and usa:trigger f
@@ -204,11 +214,13 @@ Rules for using a component: (1) import its define function from `import.path` a
204
214
  - `<usa-text-splitter>` (motionary/components/widgets; requires motionary/runtime/text): 10.3: splits its text into characters, words or lines and animates them in with a stagger (rise, fade, blur, flip, wave) when it scrolls into view — accessible,
205
215
  - `<usa-theme-surface>` (motionary/components/widgets): 8.6: a themeable card that follows the nearest theme — light, dark, neon (pulsing glow edge), glass (frosted backdrop with a sheen) or soft neumorphic relief —
206
216
  - `<usa-theme-switcher>` (motionary/components/widgets): 8.6: a segmented switcher for the 8.6 theme system — light, dark, neon, glass and soft (neumorphism); a pill slides under the active option and the page change
217
+ - `<usa-three-scene>` (motionary/components/widgets): `<usa-three-scene>` — alias of `<usa-gl-scene>` (same attributes, events and methods; no Three.js involved).
207
218
  - `<usa-tilt>` (motionary/components/interaction): Tilts toward the pointer in 3D with an optional glare; exposes --usa-tilt-x/y for parallax layers inside.
208
219
  - `<usa-timeline>` (motionary/components/timeline): Every data-tl child becomes a step in document order. data-at ('-=200', '<', 'label+=100') overlaps or aligns steps; scrub ties progress to scroll; trigger view
209
220
  - `<usa-tip>` (motionary/components/widgets): 6.6: springs out of its trigger with an arrow, flips to stay inside the viewport and shifts along the edge; hover + keyboard focus (Esc closes) or click popover
210
221
  - `<usa-toast-stack>` (motionary/components/widgets): 6.3: toasts pile up into a collapsed stack (newest in front, older ones peeking behind), fan out on hover or focus, auto-dismiss (paused while hovered) and swip
211
222
  - `<usa-toaster>` (motionary/components/feedback): toast("Saved") slides a notification in; it pauses on hover, stacks with FLIP and announces politely (errors assertively).
223
+ - `<usa-token-editor>` (motionary/components/widgets): 10.6 (motion design tokens 2.0): edit duration and cubic-bézier easing tokens with a live preview per token, then export W3C Design Tokens (DTCG 2025.10 or the
212
224
  - `<usa-typewriter>` (motionary/components/text): Types text, or cycles through phrases with delete and pause. Full text stays available to screen readers.
213
225
  - `<usa-upload-progress>` (motionary/components/widgets): 7.7: a file row whose bar eases to value with a running shine; at 100 it turns into a check that draws itself, on error it shakes and offers Retry.
214
226
  - `<usa-video-card>` (motionary/components/widgets): 9.4: a video thumbnail card — hover or focus plays a muted preview with a progress line, a play badge and a duration chip; without a video the poster drifts (Ke