motionary 10.3.0 → 10.5.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.
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +31 -0
- package/README.md +72 -0
- package/bin/motionary-mcp.mjs +265 -0
- package/dist/chunks/anim-image-BlNPv4JG.js +166 -0
- package/dist/chunks/anim-image-BlNPv4JG.js.map +1 -0
- package/dist/chunks/anim-image-DuxvYhq6.cjs +174 -0
- package/dist/chunks/anim-image-DuxvYhq6.cjs.map +1 -0
- package/dist/chunks/audio-BpU-A1m1.cjs.map +1 -1
- package/dist/chunks/{audio-D95jwlOh.js → audio-CWt1xdZB.js} +3 -3
- package/dist/chunks/{audio-D95jwlOh.js.map → audio-CWt1xdZB.js.map} +1 -1
- package/dist/chunks/{base-BnRyfuyM.js → base-BTev8qxg.js} +2 -2
- package/dist/chunks/{base-BnRyfuyM.js.map → base-BTev8qxg.js.map} +1 -1
- package/dist/chunks/base-DBheNxJu.cjs.map +1 -1
- package/dist/chunks/bind-B_CTL6Qn.js.map +1 -1
- package/dist/chunks/bind-Ui43-n2d.cjs.map +1 -1
- package/dist/chunks/builtins-CKKZNR95.cjs.map +1 -1
- package/dist/chunks/{builtins-CqIq1zBv.js → builtins-CPmS6aDB.js} +3 -3
- package/dist/chunks/{builtins-CqIq1zBv.js.map → builtins-CPmS6aDB.js.map} +1 -1
- package/dist/chunks/core-B5T0dhFH.cjs.map +1 -1
- package/dist/chunks/{core-DsGoL9EY.js → core-BviA7nFa.js} +2 -2
- package/dist/chunks/{core-DsGoL9EY.js.map → core-BviA7nFa.js.map} +1 -1
- package/dist/chunks/core-D74Fz-dL.cjs.map +1 -1
- package/dist/chunks/core-D7cVumUu.js.map +1 -1
- package/dist/chunks/{core-XA2yhn1b.js → core-KiM7MXjL.js} +2 -2
- package/dist/chunks/{core-XA2yhn1b.js.map → core-KiM7MXjL.js.map} +1 -1
- package/dist/chunks/core-MQlXZKUG.cjs.map +1 -1
- package/dist/chunks/ease-HwYZnZat.cjs +94 -0
- package/dist/chunks/ease-HwYZnZat.cjs.map +1 -0
- package/dist/chunks/ease-XN8_0sXu.js +89 -0
- package/dist/chunks/ease-XN8_0sXu.js.map +1 -0
- package/dist/chunks/fx-B_pbhpDp.cjs.map +1 -1
- package/dist/chunks/{fx-CtnrFEg9.js → fx-CgWKqVsn.js} +2 -2
- package/dist/chunks/{fx-CtnrFEg9.js.map → fx-CgWKqVsn.js.map} +1 -1
- package/dist/chunks/generative-2LhxG5BJ.js.map +1 -1
- package/dist/chunks/generative-BHIj-NU0.cjs.map +1 -1
- package/dist/chunks/{gpu-CDcXiNA8.js → gpu-BWfgYWMY.js} +2 -2
- package/dist/chunks/{gpu-CDcXiNA8.js.map → gpu-BWfgYWMY.js.map} +1 -1
- package/dist/chunks/gpu-cUixt7kT.cjs.map +1 -1
- package/dist/chunks/index-tags-B-JBecYg.js.map +1 -1
- package/dist/chunks/index-tags-hLIF2Clq.cjs.map +1 -1
- package/dist/chunks/{keyframes-DVAC5sQI.js → keyframes-B8ITIAVa.js} +3 -2
- package/dist/chunks/keyframes-B8ITIAVa.js.map +1 -0
- package/dist/chunks/{keyframes-Dw9zwVQa.cjs → keyframes-Ce1s05n3.cjs} +4 -3
- package/dist/chunks/keyframes-Ce1s05n3.cjs.map +1 -0
- package/dist/chunks/{manifest-D58HXVY-.js → manifest-BHx5yPN6.js} +2 -2
- package/dist/chunks/{manifest-D58HXVY-.js.map → manifest-BHx5yPN6.js.map} +1 -1
- package/dist/chunks/manifest-PaF9B8Vt.cjs.map +1 -1
- package/dist/chunks/{player-48Zy_NBG.js → player-BfHMNtiM.js} +4 -4
- package/dist/chunks/{player-48Zy_NBG.js.map → player-BfHMNtiM.js.map} +1 -1
- package/dist/chunks/player-C4y4jXSv.cjs.map +1 -1
- package/dist/chunks/presets-BYBVJVeP.js.map +1 -1
- package/dist/chunks/presets-CUHys3sK.cjs.map +1 -1
- package/dist/chunks/{registry-gFJRpPES.js → registry-BKzyg1JV.js} +2 -2
- package/dist/chunks/{registry-gFJRpPES.js.map → registry-BKzyg1JV.js.map} +1 -1
- package/dist/chunks/{registry-46AAzyeC.js → registry-DXdFb2fJ.js} +3 -3
- package/dist/chunks/{registry-46AAzyeC.js.map → registry-DXdFb2fJ.js.map} +1 -1
- package/dist/chunks/{registry-CSVil2qJ.cjs → registry-VhfPSI0v.cjs} +2 -2
- package/dist/chunks/{registry-CSVil2qJ.cjs.map → registry-VhfPSI0v.cjs.map} +1 -1
- package/dist/chunks/registry-xQZnSqqV.cjs.map +1 -1
- package/dist/chunks/shared-CkKHWrtJ.js.map +1 -1
- package/dist/chunks/shared-jkgRH-Hx.cjs.map +1 -1
- package/dist/chunks/{spring-CZDNyqWp.js → spring-BHuP55DR.js} +2 -2
- package/dist/chunks/{spring-CZDNyqWp.js.map → spring-BHuP55DR.js.map} +1 -1
- package/dist/chunks/spring-BlTQD2AV.cjs.map +1 -1
- package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -1
- package/dist/chunks/stagger-DtMKo2SK.js.map +1 -1
- package/dist/chunks/{ticker-COOYAyQy.js → ticker-C5RMHMW7.js} +2 -2
- package/dist/chunks/{ticker-COOYAyQy.js.map → ticker-C5RMHMW7.js.map} +1 -1
- package/dist/chunks/{ticker-gHv6pNfx.cjs → ticker-DvmC6WLS.cjs} +2 -2
- package/dist/chunks/{ticker-gHv6pNfx.cjs.map → ticker-DvmC6WLS.cjs.map} +1 -1
- package/dist/chunks/{tween-CGyolmzB.js → tween-CPtm-EdT.js} +4 -90
- package/dist/chunks/tween-CPtm-EdT.js.map +1 -0
- package/dist/chunks/{tween-CFN0WcOb.cjs → tween-_BGIl6hK.cjs} +4 -94
- package/dist/chunks/tween-_BGIl6hK.cjs.map +1 -0
- package/dist/chunks/variants-CrDDJoYK.cjs.map +1 -1
- package/dist/chunks/{variants-GU3yIL4F.js → variants-CsRGUIyA.js} +2 -2
- package/dist/chunks/{variants-GU3yIL4F.js.map → variants-CsRGUIyA.js.map} +1 -1
- package/dist/components/a11y.cjs.map +1 -1
- package/dist/components/a11y.js +2 -2
- package/dist/components/a11y.js.map +1 -1
- package/dist/components/angular.cjs.map +1 -1
- package/dist/components/angular.js +8 -8
- package/dist/components/angular.js.map +1 -1
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.js +2 -2
- package/dist/components/background.js.map +1 -1
- package/dist/components/bridge.cjs.map +1 -1
- package/dist/components/bridge.js +1 -1
- package/dist/components/bridge.js.map +1 -1
- package/dist/components/cards.cjs.map +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/cards.js.map +1 -1
- package/dist/components/click.cjs.map +1 -1
- package/dist/components/click.js +3 -3
- package/dist/components/click.js.map +1 -1
- package/dist/components/core.cjs.map +1 -1
- package/dist/components/core.js.map +1 -1
- package/dist/components/depth.cjs.map +1 -1
- package/dist/components/depth.js +3 -3
- package/dist/components/depth.js.map +1 -1
- package/dist/components/design.cjs.map +1 -1
- package/dist/components/design.js +3 -3
- package/dist/components/design.js.map +1 -1
- package/dist/components/dsl.cjs.map +1 -1
- package/dist/components/dsl.js +2 -2
- package/dist/components/dsl.js.map +1 -1
- package/dist/components/effects.cjs.map +1 -1
- package/dist/components/effects.js +9 -9
- package/dist/components/effects.js.map +1 -1
- package/dist/components/engine.cjs.map +1 -1
- package/dist/components/engine.js +2 -2
- package/dist/components/engine.js.map +1 -1
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.js +1 -1
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/fx-3d.cjs.map +1 -1
- package/dist/components/fx-3d.js +2 -2
- package/dist/components/fx-3d.js.map +1 -1
- package/dist/components/fx-ai.cjs.map +1 -1
- package/dist/components/fx-ai.js +2 -2
- package/dist/components/fx-ai.js.map +1 -1
- package/dist/components/fx-chart.cjs.map +1 -1
- package/dist/components/fx-chart.js +2 -2
- package/dist/components/fx-chart.js.map +1 -1
- package/dist/components/fx-cinema.cjs.map +1 -1
- package/dist/components/fx-cinema.js +2 -2
- package/dist/components/fx-cinema.js.map +1 -1
- package/dist/components/fx-cyber.cjs.map +1 -1
- package/dist/components/fx-cyber.js +2 -2
- package/dist/components/fx-cyber.js.map +1 -1
- package/dist/components/fx-festival.cjs.map +1 -1
- package/dist/components/fx-festival.js +2 -2
- package/dist/components/fx-festival.js.map +1 -1
- package/dist/components/fx-focus.cjs.map +1 -1
- package/dist/components/fx-focus.js +2 -2
- package/dist/components/fx-focus.js.map +1 -1
- package/dist/components/fx-form.cjs.map +1 -1
- package/dist/components/fx-form.js +2 -2
- package/dist/components/fx-form.js.map +1 -1
- package/dist/components/fx-game.cjs.map +1 -1
- package/dist/components/fx-game.js +2 -2
- package/dist/components/fx-game.js.map +1 -1
- package/dist/components/fx-genart.cjs.map +1 -1
- package/dist/components/fx-genart.js +2 -2
- package/dist/components/fx-genart.js.map +1 -1
- package/dist/components/fx-geo.cjs.map +1 -1
- package/dist/components/fx-geo.js +2 -2
- package/dist/components/fx-geo.js.map +1 -1
- package/dist/components/fx-gesture.cjs.map +1 -1
- package/dist/components/fx-gesture.js +2 -2
- package/dist/components/fx-gesture.js.map +1 -1
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.cjs.map +1 -1
- package/dist/components/fx-light.js +2 -2
- package/dist/components/fx-light.js.map +1 -1
- package/dist/components/fx-lottie.cjs.map +1 -1
- package/dist/components/fx-lottie.js +2 -2
- package/dist/components/fx-lottie.js.map +1 -1
- package/dist/components/fx-morph.cjs.map +1 -1
- package/dist/components/fx-morph.js +2 -2
- package/dist/components/fx-morph.js.map +1 -1
- package/dist/components/fx-music.cjs.map +1 -1
- package/dist/components/fx-music.js +3 -3
- package/dist/components/fx-music.js.map +1 -1
- package/dist/components/fx-organic.cjs.map +1 -1
- package/dist/components/fx-organic.js +2 -2
- package/dist/components/fx-organic.js.map +1 -1
- package/dist/components/fx-paper.cjs.map +1 -1
- package/dist/components/fx-paper.js +2 -2
- package/dist/components/fx-paper.js.map +1 -1
- package/dist/components/fx-perf.cjs.map +1 -1
- package/dist/components/fx-perf.js +2 -2
- package/dist/components/fx-perf.js.map +1 -1
- package/dist/components/fx-physics.cjs.map +1 -1
- package/dist/components/fx-physics.js +2 -2
- package/dist/components/fx-physics.js.map +1 -1
- package/dist/components/fx-retro.cjs.map +1 -1
- package/dist/components/fx-retro.js +2 -2
- package/dist/components/fx-retro.js.map +1 -1
- package/dist/components/fx-safe.cjs.map +1 -1
- package/dist/components/fx-safe.js +2 -2
- package/dist/components/fx-safe.js.map +1 -1
- package/dist/components/fx-shop.cjs.map +1 -1
- package/dist/components/fx-shop.js +2 -2
- package/dist/components/fx-shop.js.map +1 -1
- package/dist/components/fx-social.cjs.map +1 -1
- package/dist/components/fx-social.js +2 -2
- package/dist/components/fx-social.js.map +1 -1
- package/dist/components/fx-spatial.cjs.map +1 -1
- package/dist/components/fx-spatial.js +2 -2
- package/dist/components/fx-spatial.js.map +1 -1
- package/dist/components/fx-surface.cjs.map +1 -1
- package/dist/components/fx-surface.js +2 -2
- package/dist/components/fx-surface.js.map +1 -1
- package/dist/components/fx-text.cjs.map +1 -1
- package/dist/components/fx-text.js +2 -2
- package/dist/components/fx-text.js.map +1 -1
- package/dist/components/fx-transitions.cjs.map +1 -1
- package/dist/components/fx-transitions.js +3 -3
- package/dist/components/fx-transitions.js.map +1 -1
- package/dist/components/fx-video.cjs.map +1 -1
- package/dist/components/fx-video.js +2 -2
- package/dist/components/fx-video.js.map +1 -1
- package/dist/components/fx-weather.cjs.map +1 -1
- package/dist/components/fx-weather.js +2 -2
- package/dist/components/fx-weather.js.map +1 -1
- package/dist/components/fx.cjs.map +1 -1
- package/dist/components/fx.js +6 -6
- package/dist/components/fx.js.map +1 -1
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.js +6 -6
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.cjs.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/gesture.js.map +1 -1
- package/dist/components/interaction.cjs.map +1 -1
- package/dist/components/interaction.js +1 -1
- package/dist/components/interaction.js.map +1 -1
- package/dist/components/layout.cjs.map +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/layout.js.map +1 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js.map +1 -1
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.js +4 -4
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/native.cjs.map +1 -1
- package/dist/components/native.js +3 -3
- package/dist/components/native.js.map +1 -1
- package/dist/components/packs.cjs.map +1 -1
- package/dist/components/packs.js +1 -1
- package/dist/components/packs.js.map +1 -1
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/page.js.map +1 -1
- package/dist/components/perf.cjs.map +1 -1
- package/dist/components/perf.js +2 -2
- package/dist/components/perf.js.map +1 -1
- package/dist/components/physics.cjs.map +1 -1
- package/dist/components/physics.js +3 -3
- package/dist/components/physics.js.map +1 -1
- package/dist/components/plugins.cjs.map +1 -1
- package/dist/components/plugins.js +4 -4
- package/dist/components/plugins.js.map +1 -1
- package/dist/components/react.cjs.map +1 -1
- package/dist/components/react.js.map +1 -1
- package/dist/components/reveal.cjs.map +1 -1
- package/dist/components/reveal.js +1 -1
- package/dist/components/reveal.js.map +1 -1
- package/dist/components/solid.cjs.map +1 -1
- package/dist/components/solid.js +8 -8
- package/dist/components/solid.js.map +1 -1
- package/dist/components/svelte.cjs.map +1 -1
- package/dist/components/svelte.js +8 -8
- package/dist/components/svelte.js.map +1 -1
- package/dist/components/svg.cjs.map +1 -1
- package/dist/components/svg.js +1 -1
- package/dist/components/svg.js.map +1 -1
- package/dist/components/text.cjs.map +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/text.js.map +1 -1
- package/dist/components/timeline.cjs.map +1 -1
- package/dist/components/timeline.js +3 -3
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/tokens.cjs.map +1 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.js +1 -1
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.js +4 -4
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.js +8 -8
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.cjs.map +1 -1
- package/dist/components/webgl.js +1 -1
- package/dist/components/webgl.js.map +1 -1
- package/dist/components/widgets.cjs +1102 -216
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +367 -2
- package/dist/components/widgets.d.ts +367 -2
- package/dist/components/widgets.js +1100 -225
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +10 -10
- package/dist/components.js.map +1 -1
- package/dist/element.cjs.map +1 -1
- package/dist/element.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +303 -1
- package/dist/llms.txt +16 -2
- package/dist/manifest.json +806 -1
- package/dist/presets/extended.cjs.map +1 -1
- package/dist/presets/extended.js.map +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js.map +1 -1
- package/dist/runtime/format-apng.cjs +131 -0
- package/dist/runtime/format-apng.cjs.map +1 -0
- package/dist/runtime/format-apng.d.cts +250 -0
- package/dist/runtime/format-apng.d.ts +250 -0
- package/dist/runtime/format-apng.iife.js +2 -0
- package/dist/runtime/format-apng.iife.js.map +1 -0
- package/dist/runtime/format-apng.js +123 -0
- package/dist/runtime/format-apng.js.map +1 -0
- package/dist/runtime/format-css.cjs +5 -4
- package/dist/runtime/format-css.cjs.map +1 -1
- package/dist/runtime/format-css.js +5 -4
- package/dist/runtime/format-css.js.map +1 -1
- package/dist/runtime/format-gif.cjs +206 -0
- package/dist/runtime/format-gif.cjs.map +1 -0
- package/dist/runtime/format-gif.d.cts +223 -0
- package/dist/runtime/format-gif.d.ts +223 -0
- package/dist/runtime/format-gif.iife.js +2 -0
- package/dist/runtime/format-gif.iife.js.map +1 -0
- package/dist/runtime/format-gif.js +199 -0
- package/dist/runtime/format-gif.js.map +1 -0
- package/dist/runtime/format-gltf.cjs +207 -0
- package/dist/runtime/format-gltf.cjs.map +1 -0
- package/dist/runtime/format-gltf.d.cts +251 -0
- package/dist/runtime/format-gltf.d.ts +251 -0
- package/dist/runtime/format-gltf.iife.js +2 -0
- package/dist/runtime/format-gltf.iife.js.map +1 -0
- package/dist/runtime/format-gltf.js +200 -0
- package/dist/runtime/format-gltf.js.map +1 -0
- package/dist/runtime/format-motion.cjs +9 -8
- package/dist/runtime/format-motion.cjs.map +1 -1
- package/dist/runtime/format-motion.js +5 -4
- package/dist/runtime/format-motion.js.map +1 -1
- package/dist/runtime/format-obj.cjs +181 -0
- package/dist/runtime/format-obj.cjs.map +1 -0
- package/dist/runtime/format-obj.d.cts +176 -0
- package/dist/runtime/format-obj.d.ts +176 -0
- package/dist/runtime/format-obj.iife.js +2 -0
- package/dist/runtime/format-obj.iife.js.map +1 -0
- package/dist/runtime/format-obj.js +174 -0
- package/dist/runtime/format-obj.js.map +1 -0
- package/dist/runtime/format-sprite.cjs +4 -3
- package/dist/runtime/format-sprite.cjs.map +1 -1
- package/dist/runtime/format-sprite.js +4 -3
- package/dist/runtime/format-sprite.js.map +1 -1
- package/dist/runtime/format-svg.cjs +5 -4
- package/dist/runtime/format-svg.cjs.map +1 -1
- package/dist/runtime/format-svg.js +4 -3
- package/dist/runtime/format-svg.js.map +1 -1
- package/dist/runtime/format-webp.cjs +123 -0
- package/dist/runtime/format-webp.cjs.map +1 -0
- package/dist/runtime/format-webp.d.cts +245 -0
- package/dist/runtime/format-webp.d.ts +245 -0
- package/dist/runtime/format-webp.iife.js +2 -0
- package/dist/runtime/format-webp.iife.js.map +1 -0
- package/dist/runtime/format-webp.js +115 -0
- package/dist/runtime/format-webp.js.map +1 -0
- package/dist/runtime/gl.cjs +763 -0
- package/dist/runtime/gl.cjs.map +1 -0
- package/dist/runtime/gl.d.cts +260 -0
- package/dist/runtime/gl.d.ts +260 -0
- package/dist/runtime/gl.iife.js +2 -0
- package/dist/runtime/gl.iife.js.map +1 -0
- package/dist/runtime/gl.js +739 -0
- package/dist/runtime/gl.js.map +1 -0
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.cjs.map +1 -1
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/scroll.js.map +1 -1
- package/dist/runtime/smooth.cjs +284 -0
- package/dist/runtime/smooth.cjs.map +1 -0
- package/dist/runtime/smooth.d.cts +137 -0
- package/dist/runtime/smooth.d.ts +137 -0
- package/dist/runtime/smooth.iife.js +2 -0
- package/dist/runtime/smooth.iife.js.map +1 -0
- package/dist/runtime/smooth.js +279 -0
- package/dist/runtime/smooth.js.map +1 -0
- package/dist/runtime/text.cjs +1 -1
- package/dist/runtime/text.cjs.map +1 -1
- package/dist/runtime/text.js +1 -1
- package/dist/runtime/text.js.map +1 -1
- package/dist/runtime.cjs +9 -8
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +6 -5
- package/dist/runtime.js.map +1 -1
- package/dist/solid.cjs.map +1 -1
- package/dist/solid.js.map +1 -1
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components/README.md +17 -7
- package/docs/components/usa-gl-scene.md +66 -0
- package/docs/components/usa-gpu-particles.md +32 -0
- package/docs/components/usa-parallax-layers.md +38 -0
- package/docs/components/usa-scroll-ring.md +32 -0
- package/docs/components/usa-shader-backdrop.md +36 -0
- package/docs/components/usa-smooth-scroll.md +60 -0
- package/docs/components/usa-three-scene.md +20 -0
- package/docs/components.md +97 -0
- package/docs/mcp.md +50 -0
- package/docs/runtime/format-apng.md +59 -0
- package/docs/runtime/format-gif.md +60 -0
- package/docs/runtime/format-gltf.md +63 -0
- package/docs/runtime/format-obj.md +59 -0
- package/docs/runtime/format-webp.md +58 -0
- package/docs/runtime/gl.md +62 -0
- package/docs/runtime/smooth.md +60 -0
- package/package.json +75 -3
- package/dist/chunks/keyframes-DVAC5sQI.js.map +0 -1
- package/dist/chunks/keyframes-Dw9zwVQa.cjs.map +0 -1
- package/dist/chunks/tween-CFN0WcOb.cjs.map +0 -1
- package/dist/chunks/tween-CGyolmzB.js.map +0 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -56,12 +56,12 @@ Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官
|
|
|
56
56
|
- 主线 B:**text 模块** —— 逐字 / 逐词 / 逐行拆分(保留可访问文本)。
|
|
57
57
|
- 格式:精灵图(TexturePacker / Aseprite JSON)、图片序列(`motionary/runtime/format-sprite`)。
|
|
58
58
|
- 新组件:路由转场容器、`<usa-text-splitter>`(`<usa-split-text>` 已被 4.x 文本组件占用)。
|
|
59
|
-
- **v10.4** — 滚动驱动 3.0:原生 `animation-timeline` 优先、JS 回退插件化。
|
|
59
|
+
- ✅ **v10.4** — 滚动驱动 3.0:原生 `animation-timeline` 优先、JS 回退插件化。
|
|
60
60
|
- 主线 A:发布 `motionary-mcp` MCP 服务器(`npx motionary-mcp`,stdio):`list_components`、`search_components`、`get_component`、`get_example`、`scaffold_snippet`(自动带上前置条件)。
|
|
61
61
|
- 主线 B:**smooth 模块** —— 平滑滚动(减少动态效果时停用)。
|
|
62
62
|
- 格式:GIF(自研 LZW)、APNG、动画 WebP 拆帧到 canvas。
|
|
63
63
|
- 新组件:滚动进度环、视差分层容器、`<usa-smooth-scroll>`。
|
|
64
|
-
- **v10.5** — WebGPU 特效 2.0:计算着色器粒子、后处理链。
|
|
64
|
+
- ✅ **v10.5** — WebGPU 特效 2.0:计算着色器粒子、后处理链。
|
|
65
65
|
- 主线 B:**gl 模块** —— 迷你 WebGL2 场景(网格 / 基础几何体、相机、灯光、着色器材质;不是 Three.js 克隆)。
|
|
66
66
|
- 格式:OBJ / MTL、glTF 2.0 / GLB 基础、视频纹理。
|
|
67
67
|
- 新组件:粒子画布、着色器背景、`<usa-gl-scene>`(保留别名 `<usa-three-scene>`)。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Motionary components (
|
|
1
|
+
# Motionary components (202)
|
|
2
2
|
|
|
3
3
|
One page per `<usa-*>` element, generated from the source. Machine-readable: `motionary/manifest.json` · Pages `/components.json` · `/llms.txt` · `/llms-full.txt`. How to use these with an AI assistant: [AGENTS.md](../../AGENTS.md) and [the prompt guide](../ai-prompt-guide.md).
|
|
4
4
|
|
|
@@ -51,7 +51,9 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
51
51
|
- [`<usa-gauge>`](usa-gauge.md) — Spring gauge
|
|
52
52
|
- [`<usa-gen-art>`](usa-gen-art.md) — Generative artwork
|
|
53
53
|
- [`<usa-gesture-sticker>`](usa-gesture-sticker.md) — Multi-touch sticker
|
|
54
|
+
- [`<usa-gl-scene>`](usa-gl-scene.md) — 3D scene (glTF / OBJ) · Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj
|
|
54
55
|
- [`<usa-globe>`](usa-globe.md) — Spinning globe
|
|
56
|
+
- [`<usa-gpu-particles>`](usa-gpu-particles.md) — GPU particle canvas
|
|
55
57
|
- [`<usa-gyro-card>`](usa-gyro-card.md) — Gyro 3D card
|
|
56
58
|
- [`<usa-hero-video>`](usa-hero-video.md) — Hero video
|
|
57
59
|
- [`<usa-hud-panel>`](usa-hud-panel.md) — HUD panel
|
|
@@ -94,6 +96,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
94
96
|
- [`<usa-retro-button>`](usa-retro-button.md) — Retro buttons
|
|
95
97
|
- [`<usa-scene>`](usa-scene.md) — Cinematic scene
|
|
96
98
|
- [`<usa-segmented>`](usa-segmented.md) — Segmented control
|
|
99
|
+
- [`<usa-shader-backdrop>`](usa-shader-backdrop.md) — Shader backdrop + post chain
|
|
97
100
|
- [`<usa-shortcut>`](usa-shortcut.md) — Shortcut hint
|
|
98
101
|
- [`<usa-sketch-chart>`](usa-sketch-chart.md) — Sketch chart
|
|
99
102
|
- [`<usa-slider>`](usa-slider.md) — Slider
|
|
@@ -191,6 +194,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
191
194
|
- [`<usa-magnetic>`](usa-magnetic.md) — Magnetic button
|
|
192
195
|
- [`<usa-press>`](usa-press.md) — Press feedback
|
|
193
196
|
- [`<usa-ripple>`](usa-ripple.md) — Ripple
|
|
197
|
+
- [`<usa-smooth-scroll>`](usa-smooth-scroll.md) — Smooth scroll · Requires: motionary/runtime/smooth
|
|
194
198
|
- [`<usa-spotlight>`](usa-spotlight.md) — Reveal highlight
|
|
195
199
|
- [`<usa-tilt>`](usa-tilt.md) — 3D tilt card
|
|
196
200
|
- [`<usa-volume-knob>`](usa-volume-knob.md) — Volume knob
|
|
@@ -240,16 +244,22 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
240
244
|
|
|
241
245
|
- [`<usa-pack>`](usa-pack.md) — E-commerce pack
|
|
242
246
|
|
|
243
|
-
## gesture
|
|
244
|
-
|
|
245
|
-
- [`<usa-pinch-zoom>`](usa-pinch-zoom.md) — Pinch zoom
|
|
246
|
-
- [`<usa-swipe-deck>`](usa-swipe-deck.md) — Swipe cards deck
|
|
247
|
-
- [`<usa-swipeable>`](usa-swipeable.md) — Swipeable
|
|
248
|
-
|
|
249
247
|
## reveal
|
|
250
248
|
|
|
249
|
+
- [`<usa-parallax-layers>`](usa-parallax-layers.md) — Parallax layers
|
|
251
250
|
- [`<usa-reveal>`](usa-reveal.md) — Reveal
|
|
252
251
|
- [`<usa-scroll-progress>`](usa-scroll-progress.md) — Scroll progress bar
|
|
252
|
+
- [`<usa-scroll-ring>`](usa-scroll-ring.md) — Scroll progress ring
|
|
253
253
|
- [`<usa-scroll-scene>`](usa-scroll-scene.md) — Scroll scene · Requires: motionary/runtime/scroll
|
|
254
254
|
- [`<usa-scrolly>`](usa-scrolly.md) — Sticky scrollytelling
|
|
255
255
|
- [`<usa-stagger>`](usa-stagger.md) — Stagger list
|
|
256
|
+
|
|
257
|
+
## gesture
|
|
258
|
+
|
|
259
|
+
- [`<usa-pinch-zoom>`](usa-pinch-zoom.md) — Pinch zoom
|
|
260
|
+
- [`<usa-swipe-deck>`](usa-swipe-deck.md) — Swipe cards deck
|
|
261
|
+
- [`<usa-swipeable>`](usa-swipeable.md) — Swipeable
|
|
262
|
+
|
|
263
|
+
## widgets
|
|
264
|
+
|
|
265
|
+
- [`<usa-three-scene>`](usa-three-scene.md) — <usa-three-scene>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# `<usa-gl-scene>` — 3D scene (glTF / OBJ)
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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>.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 10.5
|
|
8
|
+
- **Import:** `import { defineGlScene } from 'motionary/components/widgets'` then `defineGlScene();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `src`, `shape`, `color`, `metallic`, `roughness`, `background`, `exposure`, `controls`, `auto-rotate`, `video`, `video-scrub`, `label`
|
|
11
|
+
- **Events:** `usa:error`, `usa:load`, `usa:runtime-missing`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `reload()`
|
|
14
|
+
- **Source:** [src/components/widgets/gl-scene.ts](../../src/components/widgets/gl-scene.ts)
|
|
15
|
+
|
|
16
|
+
## Prerequisites — Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj
|
|
17
|
+
|
|
18
|
+
1. **Install:** `npm i motionary`
|
|
19
|
+
2. **Import order & registration:** 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).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { use } from 'motionary/runtime';
|
|
23
|
+
import { gl } from 'motionary/runtime/gl';
|
|
24
|
+
import { formatGltf } from 'motionary/runtime/format-gltf';
|
|
25
|
+
import { formatObj } from 'motionary/runtime/format-obj';
|
|
26
|
+
import { defineGlScene } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
use(gl, formatGltf, formatObj);
|
|
29
|
+
defineGlScene(); // registers <usa-gl-scene> — after the prerequisites
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. **CDN:**
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js"></script>
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js"></script>
|
|
39
|
+
<!-- then the component bundles -->
|
|
40
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
41
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Minimal example
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## ES module
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
import { use } from 'motionary/runtime';
|
|
54
|
+
import { gl } from 'motionary/runtime/gl';
|
|
55
|
+
import { formatGltf } from 'motionary/runtime/format-gltf';
|
|
56
|
+
import { formatObj } from 'motionary/runtime/format-obj';
|
|
57
|
+
|
|
58
|
+
use(gl, formatGltf, formatObj);
|
|
59
|
+
import { defineGlScene } from 'motionary/components/widgets';
|
|
60
|
+
|
|
61
|
+
defineGlScene(); // registers <usa-gl-scene>
|
|
62
|
+
|
|
63
|
+
/* then use it in your HTML:
|
|
64
|
+
<usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
|
|
65
|
+
*/
|
|
66
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-gpu-particles>` — GPU particle canvas
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 10.5
|
|
8
|
+
- **Import:** `import { defineGpuParticles } from 'motionary/components/widgets'` then `defineGpuParticles();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `count`, `mode`, `colors`, `size`, `speed`, `trail`, `pointer`, `label`
|
|
11
|
+
- **Events:** `usa:backend`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/gpu-particles.ts](../../src/components/widgets/gpu-particles.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gpu-particles count="30000" mode="galaxy" colors="#818cf8,#f472b6" pointer></usa-gpu-particles>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineGpuParticles } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineGpuParticles(); // registers <usa-gpu-particles>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-gpu-particles count="30000" mode="galaxy" colors="#818cf8,#f472b6" pointer></usa-gpu-particles>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-parallax-layers>` — Parallax layers
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.4: a parallax container — children with data-depth move at different speeds while it crosses the viewport (native view() scroll timeline first, JS fallback), optional pointer tilt; static under reduced motion.
|
|
6
|
+
|
|
7
|
+
- **Category:** reveal · **since** 10.4
|
|
8
|
+
- **Import:** `import { defineParallaxLayers } from 'motionary/components/widgets'` then `defineParallaxLayers();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `range`, `engine`, `horizontal`, `pointer`, `strength`, `preview`
|
|
11
|
+
- **Events:** `usa:progress`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `layers()`
|
|
14
|
+
- **Source:** [src/components/widgets/parallax-layers.ts](../../src/components/widgets/parallax-layers.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-parallax-layers range="120">
|
|
20
|
+
<img data-depth="0.6" src="mountains.webp" alt="">
|
|
21
|
+
<h2 data-depth="-0.3">Above the clouds</h2>
|
|
22
|
+
</usa-parallax-layers>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineParallaxLayers } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineParallaxLayers(); // registers <usa-parallax-layers>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-parallax-layers range="120">
|
|
34
|
+
<img data-depth="0.6" src="mountains.webp" alt="">
|
|
35
|
+
<h2 data-depth="-0.3">Above the clouds</h2>
|
|
36
|
+
</usa-parallax-layers>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-scroll-ring>` — Scroll progress ring
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.4: a circular scroll-progress indicator for the page or any scroll container (for=".article"), optional percentage label and back-to-top button. Scroll-driven 3.0: native animation-timeline: scroll() first (no script per frame), a small JS loop where scroll timelines are missing.
|
|
6
|
+
|
|
7
|
+
- **Category:** reveal · **since** 10.4
|
|
8
|
+
- **Import:** `import { defineScrollRing } from 'motionary/components/widgets'` then `defineScrollRing();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `for`, `engine`, `label`, `back-to-top`, `size`, `thickness`, `horizontal`, `preview`
|
|
11
|
+
- **Events:** `usa:progress`, `usa:top`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/scroll-ring.ts](../../src/components/widgets/scroll-ring.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-scroll-ring label back-to-top></usa-scroll-ring>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineScrollRing } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineScrollRing(); // registers <usa-scroll-ring>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-scroll-ring label back-to-top></usa-scroll-ring>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-shader-backdrop>` — Shader backdrop + post chain
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 10.5
|
|
8
|
+
- **Import:** `import { defineShaderBackdrop } from 'motionary/components/widgets'` then `defineShaderBackdrop();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `preset`, `post`, `colors`, `speed`, `intensity`, `label`
|
|
11
|
+
- **Events:** `usa:backend`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/shader-backdrop.ts](../../src/components/widgets/shader-backdrop.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-shader-backdrop preset="aurora" post="bloom,vignette,grain">
|
|
20
|
+
<h1>Hello</h1>
|
|
21
|
+
</usa-shader-backdrop>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineShaderBackdrop } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
defineShaderBackdrop(); // registers <usa-shader-backdrop>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-shader-backdrop preset="aurora" post="bloom,vignette,grain">
|
|
33
|
+
<h1>Hello</h1>
|
|
34
|
+
</usa-shader-backdrop>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `<usa-smooth-scroll>` — Smooth scroll
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.4: smooth, inertial wheel scrolling for the page or a container (wrapper), anchor links glide (with offset for sticky headers); keyboard / scrollbar / touch stay native and it switches off under reduced motion. Requires motionary/runtime/smooth — npm i motionary, then use(smooth) before it mounts.
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction · **since** 10.4
|
|
8
|
+
- **Import:** `import { defineSmoothScroll } from 'motionary/components/widgets'` then `defineSmoothScroll();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `lerp`, `duration`, `ease`, `wheel-multiplier`, `horizontal`, `touch`, `anchors`, `offset`, `wrapper`, `preview`
|
|
11
|
+
- **Events:** `usa:scroll`, `usa:ready`, `usa:runtime-missing`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `glideTo()`, `stop()`, `resume()`
|
|
14
|
+
- **Source:** [src/components/widgets/smooth-scroll.ts](../../src/components/widgets/smooth-scroll.ts)
|
|
15
|
+
|
|
16
|
+
## Prerequisites — Requires: motionary/runtime/smooth
|
|
17
|
+
|
|
18
|
+
1. **Install:** `npm i motionary`
|
|
19
|
+
2. **Import order & registration:** Register the core first, then the module: use(smooth) also registers the core. CDN: load runtime.iife.js, then runtime/smooth.iife.js (it registers itself).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { use } from 'motionary/runtime';
|
|
23
|
+
import { smooth } from 'motionary/runtime/smooth';
|
|
24
|
+
import { defineSmoothScroll } from 'motionary/components/widgets';
|
|
25
|
+
|
|
26
|
+
use(smooth);
|
|
27
|
+
defineSmoothScroll(); // registers <usa-smooth-scroll> — after the prerequisites
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. **CDN:**
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/smooth.iife.js"></script>
|
|
35
|
+
<!-- then the component bundles -->
|
|
36
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
37
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Minimal example
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<usa-smooth-scroll lerp="0.1" offset="64"></usa-smooth-scroll>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ES module
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { use } from 'motionary/runtime';
|
|
50
|
+
import { smooth } from 'motionary/runtime/smooth';
|
|
51
|
+
|
|
52
|
+
use(smooth);
|
|
53
|
+
import { defineSmoothScroll } from 'motionary/components/widgets';
|
|
54
|
+
|
|
55
|
+
defineSmoothScroll(); // registers <usa-smooth-scroll>
|
|
56
|
+
|
|
57
|
+
/* then use it in your HTML:
|
|
58
|
+
<usa-smooth-scroll lerp="0.1" offset="64"></usa-smooth-scroll>
|
|
59
|
+
*/
|
|
60
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# `<usa-three-scene>` — <usa-three-scene>
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
`<usa-three-scene>` — alias of `<usa-gl-scene>` (same attributes, events and methods; no Three.js involved).
|
|
6
|
+
|
|
7
|
+
- **Category:** widgets
|
|
8
|
+
- **Import:** `import { defineThreeScene } from 'motionary/components/widgets'` then `defineThreeScene();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/gl-scene.ts](../../src/components/widgets/gl-scene.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-three-scene></usa-three-scene>
|
|
20
|
+
```
|
package/docs/components.md
CHANGED
|
@@ -1437,6 +1437,70 @@ defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisit
|
|
|
1437
1437
|
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
1438
1438
|
```
|
|
1439
1439
|
|
|
1440
|
+
### `<usa-smooth-scroll>` — Requires: motionary/runtime/smooth
|
|
1441
|
+
|
|
1442
|
+
- **Install:** `npm i motionary`
|
|
1443
|
+
- **Import order & registration:** Register the core first, then the module: use(smooth) also registers the core. CDN: load runtime.iife.js, then runtime/smooth.iife.js (it registers itself).
|
|
1444
|
+
|
|
1445
|
+
```js
|
|
1446
|
+
import { use } from 'motionary/runtime';
|
|
1447
|
+
import { smooth } from 'motionary/runtime/smooth';
|
|
1448
|
+
import { defineSmoothScroll } from 'motionary/components/widgets';
|
|
1449
|
+
|
|
1450
|
+
use(smooth);
|
|
1451
|
+
defineSmoothScroll(); // registers <usa-smooth-scroll> — after the prerequisites
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
- **CDN:**
|
|
1455
|
+
|
|
1456
|
+
```html
|
|
1457
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
1458
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/smooth.iife.js"></script>
|
|
1459
|
+
<!-- then the component bundles -->
|
|
1460
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
1461
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
1462
|
+
```
|
|
1463
|
+
|
|
1464
|
+
- **Minimal example:**
|
|
1465
|
+
|
|
1466
|
+
```html
|
|
1467
|
+
<usa-smooth-scroll lerp="0.1" offset="64"></usa-smooth-scroll>
|
|
1468
|
+
```
|
|
1469
|
+
|
|
1470
|
+
### `<usa-gl-scene>` — Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj
|
|
1471
|
+
|
|
1472
|
+
- **Install:** `npm i motionary`
|
|
1473
|
+
- **Import order & registration:** 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).
|
|
1474
|
+
|
|
1475
|
+
```js
|
|
1476
|
+
import { use } from 'motionary/runtime';
|
|
1477
|
+
import { gl } from 'motionary/runtime/gl';
|
|
1478
|
+
import { formatGltf } from 'motionary/runtime/format-gltf';
|
|
1479
|
+
import { formatObj } from 'motionary/runtime/format-obj';
|
|
1480
|
+
import { defineGlScene } from 'motionary/components/widgets';
|
|
1481
|
+
|
|
1482
|
+
use(gl, formatGltf, formatObj);
|
|
1483
|
+
defineGlScene(); // registers <usa-gl-scene> — after the prerequisites
|
|
1484
|
+
```
|
|
1485
|
+
|
|
1486
|
+
- **CDN:**
|
|
1487
|
+
|
|
1488
|
+
```html
|
|
1489
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
1490
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js"></script>
|
|
1491
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js"></script>
|
|
1492
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js"></script>
|
|
1493
|
+
<!-- then the component bundles -->
|
|
1494
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
1495
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
1496
|
+
```
|
|
1497
|
+
|
|
1498
|
+
- **Minimal example:**
|
|
1499
|
+
|
|
1500
|
+
```html
|
|
1501
|
+
<usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1440
1504
|
<!-- prereqs:end -->
|
|
1441
1505
|
|
|
1442
1506
|
### v10.2 Scroll scenes (`motionary/runtime/scroll`) + SVG loader + `data-motion` in core: `<usa-scroll-scene>`, `<usa-motion-inspector>` (`components/widgets`)
|
|
@@ -1471,6 +1535,39 @@ Declarative motion with just the core: `applyMotionAttributes(createMotion())` +
|
|
|
1471
1535
|
| `<usa-route-transition>` | `effect` (fade, slide, zoom), `engine` (auto, view-transition, waapi), `selector`, `history` (push, replace, off), `links` (inside, document), `cross-document`; `[data-to]`, `<template data-route>`, `[data-shared]` | `navigate(url)`, `current`; `usa:navigate`, `usa:navigated` |
|
|
1472
1536
|
| `<usa-text-splitter>` (Requires: motionary/runtime/text) | `split` (chars, words, lines), `effect` (rise, fade, blur, flip, wave), `stagger`, `duration`, `trigger` (view, load, hover), `loop` | `replay()`, `pieces()`; `usa:split`, `usa:done`, `usa:runtime-missing` |
|
|
1473
1537
|
|
|
1538
|
+
### v10.4 Scroll-driven 3.0 + smooth scrolling (`motionary/runtime/smooth`) + animated images: `<usa-scroll-ring>`, `<usa-parallax-layers>`, `<usa-smooth-scroll>` (`components/widgets`) · `motionary-mcp`
|
|
1539
|
+
|
|
1540
|
+
```html
|
|
1541
|
+
<usa-scroll-ring label back-to-top></usa-scroll-ring>
|
|
1542
|
+
<usa-parallax-layers range="120">
|
|
1543
|
+
<img data-depth="0.6" src="mountains.webp" alt="">
|
|
1544
|
+
<h2 data-depth="-0.3">Above the clouds</h2>
|
|
1545
|
+
</usa-parallax-layers>
|
|
1546
|
+
<usa-smooth-scroll lerp="0.1" offset="64"></usa-smooth-scroll>
|
|
1547
|
+
```
|
|
1548
|
+
|
|
1549
|
+
| Element | Attributes | Methods / events |
|
|
1550
|
+
|---|---|---|
|
|
1551
|
+
| `<usa-scroll-ring>` | `for` (page or a selector), `engine` (auto, native, js), `label`, `back-to-top`, `size`, `thickness`, `horizontal`, `preview` | `progress`, `engine`; `usa:progress`, `usa:top` |
|
|
1552
|
+
| `<usa-parallax-layers>` | `range`, `engine` (auto, native, js), `horizontal`, `pointer`, `strength`, `preview`; children `[data-depth]` | `layers()`, `progress`; `usa:progress` |
|
|
1553
|
+
| `<usa-smooth-scroll>` (Requires: motionary/runtime/smooth) | `wrapper`, `lerp`, `duration`, `ease`, `wheel-multiplier`, `horizontal`, `touch`, `anchors`, `offset`, `preview` | `glideTo(target)`, `stop()`, `resume()`, `instance`; `usa:ready`, `usa:scroll`, `usa:runtime-missing` |
|
|
1554
|
+
|
|
1555
|
+
MCP: `npx -y -p motionary motionary-mcp` — see [docs/mcp.md](docs/mcp.md).
|
|
1556
|
+
|
|
1557
|
+
### v10.5 3D (`motionary/runtime/gl` + glTF / OBJ loaders) + WebGPU effects 2.0: `<usa-gl-scene>` / `<usa-three-scene>`, `<usa-gpu-particles>`, `<usa-shader-backdrop>` (`components/widgets`)
|
|
1558
|
+
|
|
1559
|
+
```html
|
|
1560
|
+
<usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
|
|
1561
|
+
<usa-gpu-particles count="30000" mode="galaxy" pointer></usa-gpu-particles>
|
|
1562
|
+
<usa-shader-backdrop preset="aurora" post="bloom,vignette,grain"><h1>Hello</h1></usa-shader-backdrop>
|
|
1563
|
+
```
|
|
1564
|
+
|
|
1565
|
+
| Element | Attributes | Methods / events |
|
|
1566
|
+
|---|---|---|
|
|
1567
|
+
| `<usa-gl-scene>` / `<usa-three-scene>` (Requires: motionary/runtime/gl; + format-gltf / format-obj for models) | `src` (.gltf, .glb, .obj), `shape` (torus, box, sphere, plane), `color`, `metallic`, `roughness`, `background`, `exposure`, `controls`, `auto-rotate`, `video`, `video-scrub`, `label` | `scene`, `camera`, `root`, `reload()`; `usa:load`, `usa:error`, `usa:runtime-missing` |
|
|
1568
|
+
| `<usa-gpu-particles>` | `count`, `mode` (swirl, galaxy, fountain), `colors`, `size`, `speed`, `trail`, `pointer`, `label` | `backend`; `usa:backend` |
|
|
1569
|
+
| `<usa-shader-backdrop>` | `preset` (aurora, plasma, waves, nebula), `post` (bloom, vignette, grain, chromatic, pixelate, scanlines), `colors`, `speed`, `intensity`, `label`; child `<script type="x-shader/x-fragment">` | `passes`; `usa:backend` |
|
|
1570
|
+
|
|
1474
1571
|
## Frameworks
|
|
1475
1572
|
|
|
1476
1573
|
Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
|
package/docs/mcp.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# `motionary-mcp` — the component catalog as an MCP server
|
|
2
|
+
|
|
3
|
+
`motionary-mcp` (10.4+) is a **read-only** [Model Context Protocol](https://modelcontextprotocol.io) server that ships inside the `motionary` package. AI assistants that speak MCP (Claude Desktop / Claude Code, Cursor, VS Code, Windsurf, Zed, …) can ask it which `<usa-*>` component fits a UI need, read the component's API and get a snippet that already installs, imports and registers every prerequisite in the right order.
|
|
4
|
+
|
|
5
|
+
- **Zero dependencies**, stdio transport (newline-delimited JSON-RPC 2.0), protocol versions `2025-06-18`, `2025-03-26`, `2024-11-05`.
|
|
6
|
+
- **Read-only**: it answers from the AI manifest bundled in the package (`motionary/manifest.json`, the same data as the site's `components.json` / `llms.txt`). It never writes files, executes code or touches the network. Every tool is annotated `readOnlyHint: true`.
|
|
7
|
+
- Tested in CI with the official MCP TypeScript SDK client over stdio.
|
|
8
|
+
|
|
9
|
+
## Run it
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx -y -p motionary motionary-mcp # any machine with Node 18+
|
|
13
|
+
npx motionary-mcp # inside a project that has motionary installed
|
|
14
|
+
MOTIONARY_MANIFEST=./manifest.json npx -p motionary motionary-mcp # another manifest
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Client configuration (the usual `mcpServers` shape):
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"motionary": { "command": "npx", "args": ["-y", "-p", "motionary", "motionary-mcp"] }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Claude Code: `claude mcp add motionary -- npx -y -p motionary motionary-mcp`.
|
|
28
|
+
|
|
29
|
+
## Tools
|
|
30
|
+
|
|
31
|
+
| Tool | Arguments | Returns |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `list_components` | `category?`, `requires?` (`scroll`, `motionary/runtime/text`, `none`), `since?` (`10.0`), `limit?` | tag, title, category, import path, prerequisites, version introduced |
|
|
34
|
+
| `search_components` | `query`, `limit?` | best matches for a UI need ("animated counter", "pinned scroll scene") with a score |
|
|
35
|
+
| `get_component` | `tag` (`usa-tilt`, `tilt` or `<usa-tilt>`) | attributes, events, slots, methods, import / define, CDN, prerequisites (install, import + register order, CDN order), example, variants |
|
|
36
|
+
| `get_example` | `tag`, `variant?` (`html` = CDN, `esm`, or a variant id) | a working example |
|
|
37
|
+
| `scaffold_snippet` | `tags[]`, `framework?` (`html`, `esm`, `react`, `vue`, `svelte`) | one snippet for several components, prerequisites first |
|
|
38
|
+
|
|
39
|
+
Unknown tags come back as tool errors (`isError: true`) with a hint to search first.
|
|
40
|
+
|
|
41
|
+
## Resources
|
|
42
|
+
|
|
43
|
+
- `motionary://manifest` — the whole manifest (JSON)
|
|
44
|
+
- `motionary://llms.txt` — the short catalog text
|
|
45
|
+
- `motionary://component/{tag}` — one component (JSON; resource template)
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- The server version follows its own track (`0.x` until Motionary 11.0 makes it `1.0`); the catalog version is the installed `motionary` version (`initialize` → `instructions`).
|
|
50
|
+
- MCP 2.0 tools (`suggest_motion`, `validate_snippet`) arrive in 10.7.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# motionary/runtime/format-apng — APNG loader
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **3.0 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/format-apng`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-apng.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-apng.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(formatApng) also registers the core. CDN: load runtime.iife.js, then runtime/format-apng.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { formatApng } from 'motionary/runtime/format-apng';
|
|
27
|
+
use(formatApng);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { formatApng, loadApng, animatedImagePlayer } from 'motionary/runtime/format-apng';
|
|
35
|
+
use(formatApng);
|
|
36
|
+
const anim = await loadApng('/sticker.png');
|
|
37
|
+
animatedImagePlayer(document.querySelector('canvas'), anim);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Exports
|
|
41
|
+
|
|
42
|
+
`formatApng` · `parseApng` · `apngFramePngs` · `decodeApng` · `loadApng` · `animatedImagePlayer`
|
|
43
|
+
|
|
44
|
+
## Compatibility
|
|
45
|
+
|
|
46
|
+
| Feature | Supported | Notes |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| acTL / fcTL / fdAT, frame offsets and delays | ✅ yes | |
|
|
49
|
+
| dispose_op none / background / previous | ✅ yes | first-frame previous → background (spec) |
|
|
50
|
+
| blend_op source / over | ✅ yes | |
|
|
51
|
+
| hidden default image (IDAT not part of the animation) | ✅ yes | |
|
|
52
|
+
| palette / tRNS / gAMA / iCCP / sRGB / sBIT copied into frames | ✅ yes | |
|
|
53
|
+
| plain (non-animated) PNG | ✅ yes | one frame |
|
|
54
|
+
| decoding | ✅ yes | the browser's PNG decoder (createImageBitmap), or your own { decode } |
|
|
55
|
+
| SSR / workers | ◐ partial | parsing is pure; decoding needs createImageBitmap (workers OK) or { decode } |
|
|
56
|
+
|
|
57
|
+
## Components that need it
|
|
58
|
+
|
|
59
|
+
_None yet._
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# motionary/runtime/format-gif — GIF decoder
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Decode animated GIFs (own LZW decoder, no DOM) into composited RGBA frames and play / scrub / reverse them on a canvas as a runtime timeline.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **3.0 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/format-gif`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gif.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gif.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(formatGif) also registers the core. CDN: load runtime.iife.js, then runtime/format-gif.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { formatGif } from 'motionary/runtime/format-gif';
|
|
27
|
+
use(formatGif);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { formatGif, loadGif, animatedImagePlayer } from 'motionary/runtime/format-gif';
|
|
35
|
+
use(formatGif);
|
|
36
|
+
const gif = await loadGif('/loader.gif');
|
|
37
|
+
const player = animatedImagePlayer(document.querySelector('canvas'), gif);
|
|
38
|
+
player.pause(); player.progress = 0.5; // scrub
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Exports
|
|
42
|
+
|
|
43
|
+
`formatGif` · `decodeGif` · `loadGif` · `lzwDecode` · `animatedImagePlayer`
|
|
44
|
+
|
|
45
|
+
## Compatibility
|
|
46
|
+
|
|
47
|
+
| Feature | Supported | Notes |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| GIF87a / GIF89a | ✅ yes | |
|
|
50
|
+
| global + local palettes, transparency | ✅ yes | |
|
|
51
|
+
| interlaced frames | ✅ yes | 4-pass row order |
|
|
52
|
+
| disposal 0–3 (none / keep / background / previous) | ✅ yes | background clears to transparent, like browsers |
|
|
53
|
+
| frame delays, NETSCAPE2.0 / ANIMEXTS loop count | ✅ yes | delays ≤ 10 ms play at 100 ms, like browsers |
|
|
54
|
+
| truncated files | ◐ partial | decodes what is there |
|
|
55
|
+
| plain-text extension | ✕ no | ignored (browsers ignore it too) |
|
|
56
|
+
| SSR / workers | ✅ yes | decoding is pure; the player needs a (Offscreen)Canvas |
|
|
57
|
+
|
|
58
|
+
## Components that need it
|
|
59
|
+
|
|
60
|
+
_None yet._
|