motionary 11.3.0 → 11.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +2 -0
- package/dist/chunks/{anim-image-Cz9T5ZiX.cjs → anim-image-Bjmc17ZU.cjs} +2 -2
- package/dist/chunks/{anim-image-D5Yboz1O.js → anim-image-CSrYZ3ZY.js} +2 -2
- package/dist/chunks/audio-Dc4JT_0D.cjs +1 -1
- package/dist/chunks/audio-Ds5ppQVV.js +1 -1
- package/dist/chunks/badge-wall-CHvTcDpR.cjs +1 -1
- package/dist/chunks/badge-wall-fWlK0AtX.js +1 -1
- package/dist/chunks/base-B3me2y0o.cjs +1 -1
- package/dist/chunks/base-zSGb8ujt.js +1 -1
- package/dist/chunks/bg-generator-C-T8N2CW.cjs +1 -1
- package/dist/chunks/bg-generator-CVHPNzl6.js +1 -1
- package/dist/chunks/bind-B_CTL6Qn.js +1 -1
- package/dist/chunks/bind-Ui43-n2d.cjs +1 -1
- package/dist/chunks/builtins-Cz3iufK6.cjs +1 -1
- package/dist/chunks/builtins-Simwbnqg.js +1 -1
- package/dist/chunks/carousel-CUEAF4k3.cjs +1 -1
- package/dist/chunks/carousel-Ca5FiNvL.js +1 -1
- package/dist/chunks/cart-drawer-BMth2aMo.cjs +1 -1
- package/dist/chunks/cart-drawer-CDBjWN5-.js +1 -1
- package/dist/chunks/code-export-B6NVzEhx.js +1 -1
- package/dist/chunks/code-export-BUcIsaA0.cjs +1 -1
- package/dist/chunks/color-picker-DFvcXhEq.js +1 -1
- package/dist/chunks/color-picker-Dmr2b2J4.cjs +1 -1
- package/dist/chunks/command-palette-BSTQQK3b.js +1 -1
- package/dist/chunks/command-palette-CNnX1Qlx.cjs +1 -1
- package/dist/chunks/core-BOCM9zD5.js +1 -1
- package/dist/chunks/core-BcQb_f91.js +1 -1
- package/dist/chunks/core-BdLFN0RS.cjs +1 -1
- package/dist/chunks/core-BjcOCpJt.cjs +1 -1
- package/dist/chunks/core-Dj6iomdc.js +1 -1
- package/dist/chunks/core-KIvPGg0c.cjs +1 -1
- package/dist/chunks/countdown-COaDvsTK.cjs +1 -1
- package/dist/chunks/countdown-CeOzDrkE.js +1 -1
- package/dist/chunks/date-picker-DJ5URMsx.cjs +1 -1
- package/dist/chunks/date-picker-DKv1uKYq.js +1 -1
- package/dist/chunks/ease-HwYZnZat.cjs +1 -1
- package/dist/chunks/ease-XN8_0sXu.js +1 -1
- package/dist/chunks/equalizer-C6cz1y_2.js +1 -1
- package/dist/chunks/equalizer-GY-Qul0f.cjs +1 -1
- package/dist/chunks/festival-banner-BYn-HCza.js +1 -1
- package/dist/chunks/festival-banner-Dx7QAmxt.cjs +1 -1
- package/dist/chunks/field-BlWcKLcW.js +1 -1
- package/dist/chunks/field-CLbSJL_S.cjs +1 -1
- package/dist/chunks/fx-BaPAanPW.cjs +1 -1
- package/dist/chunks/fx-DUteojZx.js +1 -1
- package/dist/chunks/generative-2LhxG5BJ.js +1 -1
- package/dist/chunks/generative-BHIj-NU0.cjs +1 -1
- package/dist/chunks/{gl-scene-9yXGRDgJ.js → gl-scene-DsfDIyzr.js} +2 -2
- package/dist/chunks/{gl-scene-Cbw8wTyh.cjs → gl-scene-y_vtXfho.cjs} +2 -2
- package/dist/chunks/globe-C5waX_Bv.cjs +1 -1
- package/dist/chunks/globe-DAdScNVh.js +1 -1
- package/dist/chunks/gpu-Dw1udOJW.cjs +1 -1
- package/dist/chunks/gpu-ML0i9eNv.js +1 -1
- package/dist/chunks/gpu-particles-BVMXKtdI.cjs +1 -1
- package/dist/chunks/gpu-particles-BafFhVwB.js +1 -1
- package/dist/chunks/index-tags-B-JBecYg.js +1 -1
- package/dist/chunks/index-tags-hLIF2Clq.cjs +1 -1
- package/dist/chunks/{keyframes-Cl8Qc-Tq.cjs → keyframes-CA4ON22i.cjs} +2 -2
- package/dist/chunks/{keyframes-DqWXtvxl.js → keyframes-_50j1RoO.js} +2 -2
- package/dist/chunks/leaderboard-BReEpUTf.js +1 -1
- package/dist/chunks/leaderboard-DYRLL45b.cjs +1 -1
- package/dist/chunks/location-card-CLR05EP-.cjs +1 -1
- package/dist/chunks/location-card-D-jdyQge.js +1 -1
- package/dist/chunks/lottie-icon-BfG8_n32.cjs +1 -1
- package/dist/chunks/lottie-icon-kOzTlEj1.js +1 -1
- package/dist/chunks/{lottie-player-CmsgZ-bf.js → lottie-player-CMDfMeKd.js} +2 -2
- package/dist/chunks/{lottie-player-B6xOJ3ry.cjs → lottie-player-Duv92v1E.cjs} +2 -2
- package/dist/chunks/lyrics-CtKFEFtI.cjs +1 -1
- package/dist/chunks/lyrics-DHri0dBh.js +1 -1
- package/dist/chunks/manifest-Bcz6rQ20.cjs +1 -1
- package/dist/chunks/manifest-pFJWahGJ.js +1 -1
- package/dist/chunks/menu-BTGBkd2U.js +1 -1
- package/dist/chunks/menu-BgO53POm.cjs +1 -1
- package/dist/chunks/menu-toggle-CLteQORa.js +1 -1
- package/dist/chunks/menu-toggle-lGl4Jvae.cjs +1 -1
- package/dist/chunks/nav-morph-BDnCH13j.cjs +1 -1
- package/dist/chunks/nav-morph-Cn8rkJgZ.js +1 -1
- package/dist/chunks/otp-CD87vVt6.js +1 -1
- package/dist/chunks/otp-tQy0gMPq.cjs +1 -1
- package/dist/chunks/pagination-6QHulvKI.js +1 -1
- package/dist/chunks/pagination-DD2oqXhh.cjs +1 -1
- package/dist/chunks/{physics-playground-C2Icbixn.cjs → physics-playground-8x5S9Wos.cjs} +2 -2
- package/dist/chunks/{physics-playground-Ca8v8I8C.js → physics-playground-U3RY-aG3.js} +2 -2
- package/dist/chunks/player-BYwLXSuJ.js +1 -1
- package/dist/chunks/player-DZe-cHvD.cjs +1 -1
- package/dist/chunks/presence-230b12uw.cjs +1 -1
- package/dist/chunks/presence-CPc3nH2E.js +1 -1
- package/dist/chunks/presets-BYBVJVeP.js +1 -1
- package/dist/chunks/presets-CUHys3sK.cjs +1 -1
- package/dist/chunks/prize-wheel-BzYWrEvu.js +1 -1
- package/dist/chunks/prize-wheel-DuS1Ud_o.cjs +1 -1
- package/dist/chunks/product-gallery-CTswLWBk.cjs +1 -1
- package/dist/chunks/product-gallery-DuUVpQGx.js +1 -1
- package/dist/chunks/progress-ring-CDJnN8et.js +1 -1
- package/dist/chunks/progress-ring-TnacbuYB.cjs +1 -1
- package/dist/chunks/prop-panel-B4SaLelu.cjs +1 -1
- package/dist/chunks/prop-panel-CYTkWP9Y.js +1 -1
- package/dist/chunks/radar-B7ZGs9Ca.js +1 -1
- package/dist/chunks/radar-BWjX0-2G.cjs +1 -1
- package/dist/chunks/reactions-BCX05Z6_.js +1 -1
- package/dist/chunks/reactions-BNpZ7cPy.cjs +1 -1
- package/dist/chunks/registry-BB1oO-lR.cjs +1 -1
- package/dist/chunks/registry-CYojuxi5.js +1 -1
- package/dist/chunks/{registry-xlsVOzSM.js → registry-CorBCE7b.js} +40 -3
- package/dist/chunks/{registry-D_iQfO4b.cjs → registry-VITvgTNc.cjs} +43 -2
- package/dist/chunks/retro-button-CNbQ4ph9.cjs +1 -1
- package/dist/chunks/retro-button-dVmLtNmb.js +1 -1
- package/dist/chunks/rive-CfWKBIa5.cjs +1 -1
- package/dist/chunks/rive-CtYlVrH0.js +1 -1
- package/dist/chunks/{runtime-link-DEKlZ_vv.cjs → runtime-link-BGsMpzx4.cjs} +2 -2
- package/dist/chunks/{runtime-link-d33GAHqB.js → runtime-link-LolrEAJv.js} +2 -2
- package/dist/chunks/scroll-driven-CQbwzCdn.cjs +1 -1
- package/dist/chunks/scroll-driven-LghshrWq.js +1 -1
- package/dist/chunks/{scroll-scene-CHqUJZRm.js → scroll-scene-C6cUC6eR.js} +3 -3
- package/dist/chunks/{scroll-scene-Cb9ODLiQ.cjs → scroll-scene-CAlNu16C.cjs} +3 -3
- package/dist/chunks/segmented-CRHXT6gm.js +1 -1
- package/dist/chunks/segmented-Can8wI4p.cjs +1 -1
- package/dist/chunks/shader-backdrop-Tnlj5ag3.cjs +1 -1
- package/dist/chunks/shader-backdrop-jJaiqu2T.js +1 -1
- package/dist/chunks/shared-BxK1D7EZ.cjs +1 -1
- package/dist/chunks/shared-C8Pi6tuh.js +1 -1
- package/dist/chunks/shared-CkKHWrtJ.js +1 -1
- package/dist/chunks/shared-jkgRH-Hx.cjs +1 -1
- package/dist/chunks/sheet-BHvZA7rD.js +1 -1
- package/dist/chunks/sheet-BfH5vWIW.cjs +1 -1
- package/dist/chunks/sign-DvZ1jHxE.js +1 -1
- package/dist/chunks/sign-RAkQIWrM.cjs +1 -1
- package/dist/chunks/skeleton-reveal-Dwm8Z6Iv.js +1 -1
- package/dist/chunks/skeleton-reveal-n4L3iur-.cjs +1 -1
- package/dist/chunks/sparkline-BhB1Mi-1.js +1 -1
- package/dist/chunks/sparkline-CEF92PsW.cjs +1 -1
- package/dist/chunks/spring-CznnvQCN.js +1 -1
- package/dist/chunks/spring-DcM7pQgx.cjs +1 -1
- package/dist/chunks/stagger-B9sKPwQB.js +1 -1
- package/dist/chunks/stagger-DFKwqOQG.cjs +1 -1
- package/dist/chunks/suggestion-chips-BVt6aSMC.cjs +1 -1
- package/dist/chunks/suggestion-chips-CtgmWPtH.js +1 -1
- package/dist/chunks/switch-0mn-fRmX.cjs +1 -1
- package/dist/chunks/switch-CP2i0RlH.js +1 -1
- package/dist/chunks/tab-bar-CZLz8oVX.cjs +1 -1
- package/dist/chunks/tab-bar-Du_iYdCI.js +1 -1
- package/dist/chunks/{ticker-BJA5lDMi.js → ticker-CZisW9Nb.js} +2 -2
- package/dist/chunks/{ticker-DYsDZNuj.cjs → ticker-DwRa5hIu.cjs} +2 -2
- package/dist/chunks/tip-Txz4rnqn.cjs +1 -1
- package/dist/chunks/tip-c0HIMPnO.js +1 -1
- package/dist/chunks/toast-stack-Cylun3Yf.js +1 -1
- package/dist/chunks/toast-stack-DanHRGwO.cjs +1 -1
- package/dist/chunks/{tween-GiD1mhGX.js → tween-BHDOFhXX.js} +2 -2
- package/dist/chunks/{tween-CtquqexF.cjs → tween-ookpV7jR.cjs} +2 -2
- package/dist/chunks/upload-progress-CkfDSMr-.js +1 -1
- package/dist/chunks/upload-progress-DmywVhec.cjs +1 -1
- package/dist/chunks/variants-DRi3tBJf.js +1 -1
- package/dist/chunks/variants-cVfgIaXa.cjs +1 -1
- package/dist/chunks/voice-button-CZ5cpeWN.cjs +1 -1
- package/dist/chunks/voice-button-DVovZYBR.js +1 -1
- package/dist/chunks/weather-card-DCzxr5T4.cjs +1 -1
- package/dist/chunks/weather-card-pF9sSKuI.js +1 -1
- package/dist/chunks/worker-canvas-CDc2aIKC.cjs +1 -1
- package/dist/chunks/worker-canvas-Hl3quLAh.js +1 -1
- package/dist/chunks/xp-bar-D4Yq5Dpv.cjs +1 -1
- package/dist/chunks/xp-bar-j1FsL32r.js +1 -1
- package/dist/components/a11y.cjs +1 -1
- package/dist/components/a11y.js +1 -1
- package/dist/components/ai.cjs +1 -1
- package/dist/components/ai.js +1 -1
- package/dist/components/angular.cjs +1 -1
- package/dist/components/angular.js +1 -1
- package/dist/components/background.cjs +1 -1
- package/dist/components/background.js +1 -1
- package/dist/components/bridge.cjs +1 -1
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.cjs +1 -1
- package/dist/components/cards.js +1 -1
- package/dist/components/click.cjs +1 -1
- package/dist/components/click.js +1 -1
- package/dist/components/core.cjs +1 -1
- package/dist/components/core.js +1 -1
- package/dist/components/depth.cjs +1 -1
- package/dist/components/depth.js +1 -1
- package/dist/components/design.cjs +1 -1
- package/dist/components/design.js +1 -1
- package/dist/components/dotlottie.cjs +4 -4
- package/dist/components/dotlottie.js +4 -4
- package/dist/components/dsl.cjs +1 -1
- package/dist/components/dsl.js +1 -1
- package/dist/components/effects.cjs +1 -1
- package/dist/components/effects.js +1 -1
- package/dist/components/engine.cjs +1 -1
- package/dist/components/engine.js +1 -1
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.js +1 -1
- package/dist/components/fx-3d.cjs +1 -1
- package/dist/components/fx-3d.js +1 -1
- package/dist/components/fx-ai.cjs +1 -1
- package/dist/components/fx-ai.js +1 -1
- package/dist/components/fx-chart.cjs +1 -1
- package/dist/components/fx-chart.js +1 -1
- package/dist/components/fx-cinema.cjs +1 -1
- package/dist/components/fx-cinema.js +1 -1
- package/dist/components/fx-cyber.cjs +1 -1
- package/dist/components/fx-cyber.js +1 -1
- package/dist/components/fx-festival.cjs +1 -1
- package/dist/components/fx-festival.js +1 -1
- package/dist/components/fx-focus.cjs +1 -1
- package/dist/components/fx-focus.js +1 -1
- package/dist/components/fx-form.cjs +1 -1
- package/dist/components/fx-form.js +1 -1
- package/dist/components/fx-game.cjs +1 -1
- package/dist/components/fx-game.js +1 -1
- package/dist/components/fx-genart.cjs +1 -1
- package/dist/components/fx-genart.js +1 -1
- package/dist/components/fx-geo.cjs +1 -1
- package/dist/components/fx-geo.js +1 -1
- package/dist/components/fx-gesture.cjs +1 -1
- package/dist/components/fx-gesture.js +1 -1
- package/dist/components/fx-gpu.cjs +1 -1
- package/dist/components/fx-gpu.js +1 -1
- package/dist/components/fx-light.cjs +1 -1
- package/dist/components/fx-light.js +1 -1
- package/dist/components/fx-lottie.cjs +1 -1
- package/dist/components/fx-lottie.js +1 -1
- package/dist/components/fx-morph.cjs +1 -1
- package/dist/components/fx-morph.js +1 -1
- package/dist/components/fx-music.cjs +1 -1
- package/dist/components/fx-music.js +1 -1
- package/dist/components/fx-organic.cjs +1 -1
- package/dist/components/fx-organic.js +1 -1
- package/dist/components/fx-paper.cjs +1 -1
- package/dist/components/fx-paper.js +1 -1
- package/dist/components/fx-perf.cjs +1 -1
- package/dist/components/fx-perf.js +1 -1
- package/dist/components/fx-physics.cjs +1 -1
- package/dist/components/fx-physics.js +1 -1
- package/dist/components/fx-retro.cjs +1 -1
- package/dist/components/fx-retro.js +1 -1
- package/dist/components/fx-safe.cjs +1 -1
- package/dist/components/fx-safe.js +1 -1
- package/dist/components/fx-shop.cjs +1 -1
- package/dist/components/fx-shop.js +1 -1
- package/dist/components/fx-social.cjs +1 -1
- package/dist/components/fx-social.js +1 -1
- package/dist/components/fx-spatial.cjs +1 -1
- package/dist/components/fx-spatial.js +1 -1
- package/dist/components/fx-surface.cjs +1 -1
- package/dist/components/fx-surface.js +1 -1
- package/dist/components/fx-text.cjs +1 -1
- package/dist/components/fx-text.js +1 -1
- package/dist/components/fx-transitions.cjs +1 -1
- package/dist/components/fx-transitions.js +1 -1
- package/dist/components/fx-video.cjs +1 -1
- package/dist/components/fx-video.js +1 -1
- package/dist/components/fx-weather.cjs +1 -1
- package/dist/components/fx-weather.js +1 -1
- package/dist/components/fx.cjs +1 -1
- package/dist/components/fx.js +1 -1
- package/dist/components/fx2.cjs +1 -1
- package/dist/components/fx2.js +1 -1
- package/dist/components/gesture.cjs +1 -1
- package/dist/components/gesture.js +1 -1
- package/dist/components/gl-model.cjs +4 -4
- package/dist/components/gl-model.js +4 -4
- package/dist/components/interaction.cjs +1 -1
- package/dist/components/interaction.js +1 -1
- package/dist/components/jsx.cjs +1 -1
- package/dist/components/jsx.js +1 -1
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/lazy.cjs +1 -1
- package/dist/components/lazy.js +1 -1
- package/dist/components/lite.cjs +1 -1
- package/dist/components/lite.js +1 -1
- package/dist/components/marketplace.cjs +1 -1
- package/dist/components/marketplace.js +1 -1
- package/dist/components/native.cjs +1 -1
- package/dist/components/native.js +1 -1
- package/dist/components/packs.cjs +1 -1
- package/dist/components/packs.js +1 -1
- package/dist/components/page.cjs +1 -1
- package/dist/components/page.js +1 -1
- package/dist/components/perf.cjs +1 -1
- package/dist/components/perf.js +1 -1
- package/dist/components/physics.cjs +1 -1
- package/dist/components/physics.js +1 -1
- package/dist/components/plugins.cjs +1 -1
- package/dist/components/plugins.js +1 -1
- package/dist/components/react.cjs +1 -1
- package/dist/components/react.js +1 -1
- package/dist/components/reveal.cjs +1 -1
- package/dist/components/reveal.js +1 -1
- package/dist/components/snap-carousel.cjs +3 -3
- package/dist/components/snap-carousel.js +3 -3
- package/dist/components/solid.cjs +1 -1
- package/dist/components/solid.js +1 -1
- package/dist/components/svelte.cjs +1 -1
- package/dist/components/svelte.js +1 -1
- package/dist/components/svg.cjs +1 -1
- package/dist/components/svg.js +1 -1
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/timeline.cjs +1 -1
- package/dist/components/timeline.js +1 -1
- package/dist/components/tokens.cjs +1 -1
- package/dist/components/tokens.js +1 -1
- package/dist/components/transitions.cjs +1 -1
- package/dist/components/transitions.js +1 -1
- package/dist/components/ui.cjs +1 -1
- package/dist/components/ui.js +1 -1
- package/dist/components/vue.cjs +1 -1
- package/dist/components/vue.js +1 -1
- package/dist/components/webgl.cjs +1 -1
- package/dist/components/webgl.js +1 -1
- package/dist/components/widgets.cjs +7 -7
- package/dist/components/widgets.js +9 -9
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/components.umd.js +1 -1
- package/dist/effects/achievement-unlock.cjs +1 -1
- package/dist/effects/achievement-unlock.js +1 -1
- package/dist/effects/aurora-veil.cjs +1 -1
- package/dist/effects/aurora-veil.js +1 -1
- package/dist/effects/badge-pop.cjs +1 -1
- package/dist/effects/badge-pop.js +1 -1
- package/dist/effects/bars-grow.cjs +1 -1
- package/dist/effects/bars-grow.js +1 -1
- package/dist/effects/beat-bounce.cjs +1 -1
- package/dist/effects/beat-bounce.js +1 -1
- package/dist/effects/blob-button.cjs +1 -1
- package/dist/effects/blob-button.js +1 -1
- package/dist/effects/bloom.cjs +1 -1
- package/dist/effects/bloom.js +1 -1
- package/dist/effects/breathe.cjs +1 -1
- package/dist/effects/breathe.js +1 -1
- package/dist/effects/brushed-metal.cjs +1 -1
- package/dist/effects/brushed-metal.js +1 -1
- package/dist/effects/camera-dolly.cjs +1 -1
- package/dist/effects/camera-dolly.js +1 -1
- package/dist/effects/card-flip-3d.cjs +1 -1
- package/dist/effects/card-flip-3d.js +1 -1
- package/dist/effects/chest-open.cjs +1 -1
- package/dist/effects/chest-open.js +1 -1
- package/dist/effects/cloth.cjs +1 -1
- package/dist/effects/cloth.js +1 -1
- package/dist/effects/coin-burst.cjs +1 -1
- package/dist/effects/coin-burst.js +1 -1
- package/dist/effects/color-pulse.cjs +1 -1
- package/dist/effects/color-pulse.js +1 -1
- package/dist/effects/crt-power.cjs +1 -1
- package/dist/effects/crt-power.js +1 -1
- package/dist/effects/crumple.cjs +1 -1
- package/dist/effects/crumple.js +1 -1
- package/dist/effects/data-decode.cjs +1 -1
- package/dist/effects/data-decode.js +1 -1
- package/dist/effects/day-cycle.cjs +1 -1
- package/dist/effects/day-cycle.js +1 -1
- package/dist/effects/depth-in.cjs +1 -1
- package/dist/effects/depth-in.js +1 -1
- package/dist/effects/depth-pop.cjs +1 -1
- package/dist/effects/depth-pop.js +1 -1
- package/dist/effects/depth-stack.cjs +1 -1
- package/dist/effects/depth-stack.js +1 -1
- package/dist/effects/dolly-in.cjs +1 -1
- package/dist/effects/dolly-in.js +1 -1
- package/dist/effects/dots-pop.cjs +1 -1
- package/dist/effects/dots-pop.js +1 -1
- package/dist/effects/field-shake.cjs +1 -1
- package/dist/effects/field-shake.js +1 -1
- package/dist/effects/field-success.cjs +1 -1
- package/dist/effects/field-success.js +1 -1
- package/dist/effects/film-burn.cjs +1 -1
- package/dist/effects/film-burn.js +1 -1
- package/dist/effects/fire.cjs +1 -1
- package/dist/effects/fire.js +1 -1
- package/dist/effects/fireflies.cjs +1 -1
- package/dist/effects/fireflies.js +1 -1
- package/dist/effects/firework-burst.cjs +1 -1
- package/dist/effects/firework-burst.js +1 -1
- package/dist/effects/flip-chars.cjs +1 -1
- package/dist/effects/flip-chars.js +1 -1
- package/dist/effects/fluid.cjs +1 -1
- package/dist/effects/fluid.js +1 -1
- package/dist/effects/fly-to-cart.cjs +1 -1
- package/dist/effects/fly-to-cart.js +1 -1
- package/dist/effects/focus-draw.cjs +1 -1
- package/dist/effects/focus-draw.js +1 -1
- package/dist/effects/focus-glow.cjs +1 -1
- package/dist/effects/focus-glow.js +1 -1
- package/dist/effects/fog.cjs +1 -1
- package/dist/effects/fog.js +1 -1
- package/dist/effects/font-breathe.cjs +1 -1
- package/dist/effects/font-breathe.js +1 -1
- package/dist/effects/form-cascade.cjs +1 -1
- package/dist/effects/form-cascade.js +1 -1
- package/dist/effects/gen-skeleton.cjs +1 -1
- package/dist/effects/gen-skeleton.js +1 -1
- package/dist/effects/glass-frost.cjs +1 -1
- package/dist/effects/glass-frost.js +1 -1
- package/dist/effects/glitch-text.cjs +1 -1
- package/dist/effects/glitch-text.js +1 -1
- package/dist/effects/globe-spin.cjs +1 -1
- package/dist/effects/globe-spin.js +1 -1
- package/dist/effects/god-rays.cjs +1 -1
- package/dist/effects/god-rays.js +1 -1
- package/dist/effects/gpu-lift.cjs +1 -1
- package/dist/effects/gpu-lift.js +1 -1
- package/dist/effects/grain-flicker.cjs +1 -1
- package/dist/effects/grain-flicker.js +1 -1
- package/dist/effects/halftone-in.cjs +1 -1
- package/dist/effects/halftone-in.js +1 -1
- package/dist/effects/highlight-sweep.cjs +1 -1
- package/dist/effects/highlight-sweep.js +1 -1
- package/dist/effects/hologram.cjs +1 -1
- package/dist/effects/hologram.js +1 -1
- package/dist/effects/hud-frame.cjs +1 -1
- package/dist/effects/hud-frame.js +1 -1
- package/dist/effects/icon-pop.cjs +1 -1
- package/dist/effects/icon-pop.js +1 -1
- package/dist/effects/icon-swap.cjs +1 -1
- package/dist/effects/icon-swap.js +1 -1
- package/dist/effects/idle-reveal.cjs +1 -1
- package/dist/effects/idle-reveal.js +1 -1
- package/dist/effects/ink.cjs +1 -1
- package/dist/effects/ink.js +1 -1
- package/dist/effects/jump-cut.cjs +1 -1
- package/dist/effects/jump-cut.js +1 -1
- package/dist/effects/kaleido.cjs +1 -1
- package/dist/effects/kaleido.js +1 -1
- package/dist/effects/label-float.cjs +1 -1
- package/dist/effects/label-float.js +1 -1
- package/dist/effects/lantern-rise.cjs +1 -1
- package/dist/effects/lantern-rise.js +1 -1
- package/dist/effects/leaves.cjs +1 -1
- package/dist/effects/leaves.js +1 -1
- package/dist/effects/letterbox.cjs +1 -1
- package/dist/effects/letterbox.js +1 -1
- package/dist/effects/level-up.cjs +1 -1
- package/dist/effects/level-up.js +1 -1
- package/dist/effects/light-follow.cjs +1 -1
- package/dist/effects/light-follow.js +1 -1
- package/dist/effects/lightning.cjs +1 -1
- package/dist/effects/lightning.js +1 -1
- package/dist/effects/line-draw.cjs +1 -1
- package/dist/effects/line-draw.js +1 -1
- package/dist/effects/liquid-text.cjs +1 -1
- package/dist/effects/liquid-text.js +1 -1
- package/dist/effects/liquid-wipe.cjs +1 -1
- package/dist/effects/liquid-wipe.js +1 -1
- package/dist/effects/lottie-play.cjs +1 -1
- package/dist/effects/lottie-play.js +1 -1
- package/dist/effects/magnet.cjs +1 -1
- package/dist/effects/magnet.js +1 -1
- package/dist/effects/marching-ants.cjs +1 -1
- package/dist/effects/marching-ants.js +1 -1
- package/dist/effects/marker-pulse.cjs +1 -1
- package/dist/effects/marker-pulse.js +1 -1
- package/dist/effects/mention-glow.cjs +1 -1
- package/dist/effects/mention-glow.js +1 -1
- package/dist/effects/mesh-drift.cjs +1 -1
- package/dist/effects/mesh-drift.js +1 -1
- package/dist/effects/message-in.cjs +1 -1
- package/dist/effects/message-in.js +1 -1
- package/dist/effects/mosaic-flip.cjs +1 -1
- package/dist/effects/mosaic-flip.js +1 -1
- package/dist/effects/neon-ignite.cjs +1 -1
- package/dist/effects/neon-ignite.js +1 -1
- package/dist/effects/neon-pulse.cjs +1 -1
- package/dist/effects/neon-pulse.js +1 -1
- package/dist/effects/neon-write.cjs +1 -1
- package/dist/effects/neon-write.js +1 -1
- package/dist/effects/neu-press.cjs +1 -1
- package/dist/effects/neu-press.js +1 -1
- package/dist/effects/noise-reveal.cjs +1 -1
- package/dist/effects/noise-reveal.js +1 -1
- package/dist/effects/number-roll.cjs +1 -1
- package/dist/effects/number-roll.js +1 -1
- package/dist/effects/orbit-camera.cjs +1 -1
- package/dist/effects/orbit-camera.js +1 -1
- package/dist/effects/orbit-in.cjs +1 -1
- package/dist/effects/orbit-in.js +1 -1
- package/dist/effects/origami.cjs +1 -1
- package/dist/effects/origami.js +1 -1
- package/dist/effects/page-curl.cjs +1 -1
- package/dist/effects/page-curl.js +1 -1
- package/dist/effects/pan-reveal.cjs +1 -1
- package/dist/effects/pan-reveal.js +1 -1
- package/dist/effects/paper-unfold.cjs +1 -1
- package/dist/effects/paper-unfold.js +1 -1
- package/dist/effects/particle-text.cjs +1 -1
- package/dist/effects/particle-text.js +1 -1
- package/dist/effects/path-morph.cjs +1 -1
- package/dist/effects/path-morph.js +1 -1
- package/dist/effects/pearlescent.cjs +1 -1
- package/dist/effects/pearlescent.js +1 -1
- package/dist/effects/pencil-sketch.cjs +1 -1
- package/dist/effects/pencil-sketch.js +1 -1
- package/dist/effects/pin-drop.cjs +1 -1
- package/dist/effects/pin-drop.js +1 -1
- package/dist/effects/pinball.cjs +1 -1
- package/dist/effects/pinball.js +1 -1
- package/dist/effects/pinch-hint.cjs +1 -1
- package/dist/effects/pinch-hint.js +1 -1
- package/dist/effects/pixelate-in.cjs +1 -1
- package/dist/effects/pixelate-in.js +1 -1
- package/dist/effects/pointer-shadow.cjs +1 -1
- package/dist/effects/pointer-shadow.js +1 -1
- package/dist/effects/portal-open.cjs +1 -1
- package/dist/effects/portal-open.js +1 -1
- package/dist/effects/price-flip.cjs +1 -1
- package/dist/effects/price-flip.js +1 -1
- package/dist/effects/product-spin.cjs +1 -1
- package/dist/effects/product-spin.js +1 -1
- package/dist/effects/rack-focus.cjs +1 -1
- package/dist/effects/rack-focus.js +1 -1
- package/dist/effects/radial-spectrum.cjs +1 -1
- package/dist/effects/radial-spectrum.js +1 -1
- package/dist/effects/rain-glass.cjs +1 -1
- package/dist/effects/rain-glass.js +1 -1
- package/dist/effects/reaction-burst.cjs +1 -1
- package/dist/effects/reaction-burst.js +1 -1
- package/dist/effects/read-receipt.cjs +1 -1
- package/dist/effects/read-receipt.js +1 -1
- package/dist/effects/refraction.cjs +1 -1
- package/dist/effects/refraction.js +1 -1
- package/dist/effects/ring-sweep.cjs +1 -1
- package/dist/effects/ring-sweep.js +1 -1
- package/dist/effects/ripple-dissolve.cjs +1 -1
- package/dist/effects/ripple-dissolve.js +1 -1
- package/dist/effects/rope.cjs +1 -1
- package/dist/effects/rope.js +1 -1
- package/dist/effects/route-draw.cjs +1 -1
- package/dist/effects/route-draw.js +1 -1
- package/dist/effects/safe-fade.cjs +1 -1
- package/dist/effects/safe-fade.js +1 -1
- package/dist/effects/sakura.cjs +1 -1
- package/dist/effects/sakura.js +1 -1
- package/dist/effects/sale-shine.cjs +1 -1
- package/dist/effects/sale-shine.js +1 -1
- package/dist/effects/sankey-flow.cjs +1 -1
- package/dist/effects/sankey-flow.js +1 -1
- package/dist/effects/scanline-sweep.cjs +1 -1
- package/dist/effects/scanline-sweep.js +1 -1
- package/dist/effects/shatter.cjs +1 -1
- package/dist/effects/shatter.js +1 -1
- package/dist/effects/smoke.cjs +1 -1
- package/dist/effects/smoke.js +1 -1
- package/dist/effects/snowfall.cjs +1 -1
- package/dist/effects/snowfall.js +1 -1
- package/dist/effects/soft-body.cjs +1 -1
- package/dist/effects/soft-body.js +1 -1
- package/dist/effects/sound-particles.cjs +1 -1
- package/dist/effects/sound-particles.js +1 -1
- package/dist/effects/spatial-float.cjs +1 -1
- package/dist/effects/spatial-float.js +1 -1
- package/dist/effects/spectrum-mirror.cjs +1 -1
- package/dist/effects/spectrum-mirror.js +1 -1
- package/dist/effects/splash.cjs +1 -1
- package/dist/effects/splash.js +1 -1
- package/dist/effects/spooky-float.cjs +1 -1
- package/dist/effects/spooky-float.js +1 -1
- package/dist/effects/stock-pulse.cjs +1 -1
- package/dist/effects/stock-pulse.js +1 -1
- package/dist/effects/stream-text.cjs +1 -1
- package/dist/effects/stream-text.js +1 -1
- package/dist/effects/stroke-draw.cjs +1 -1
- package/dist/effects/stroke-draw.js +1 -1
- package/dist/effects/success-check.cjs +1 -1
- package/dist/effects/success-check.js +1 -1
- package/dist/effects/swipe-hint.cjs +1 -1
- package/dist/effects/swipe-hint.js +1 -1
- package/dist/effects/text-trail.cjs +1 -1
- package/dist/effects/text-trail.js +1 -1
- package/dist/effects/thinking-glow.cjs +1 -1
- package/dist/effects/thinking-glow.js +1 -1
- package/dist/effects/tilt-wobble.cjs +1 -1
- package/dist/effects/tilt-wobble.js +1 -1
- package/dist/effects/typing-dots.cjs +1 -1
- package/dist/effects/typing-dots.js +1 -1
- package/dist/effects/underline-sweep.cjs +1 -1
- package/dist/effects/underline-sweep.js +1 -1
- package/dist/effects/vhs-glitch.cjs +1 -1
- package/dist/effects/vhs-glitch.js +1 -1
- package/dist/effects/vine-grow.cjs +1 -1
- package/dist/effects/vine-grow.js +1 -1
- package/dist/effects/vinyl-spin.cjs +1 -1
- package/dist/effects/vinyl-spin.js +1 -1
- package/dist/effects/voice-wave.cjs +1 -1
- package/dist/effects/voice-wave.js +1 -1
- package/dist/effects/water-drop.cjs +1 -1
- package/dist/effects/water-drop.js +1 -1
- package/dist/effects/watercolor.cjs +1 -1
- package/dist/effects/watercolor.js +1 -1
- package/dist/effects/waveform-scope.cjs +1 -1
- package/dist/effects/waveform-scope.js +1 -1
- package/dist/effects/xmas-snow.cjs +1 -1
- package/dist/effects/xmas-snow.js +1 -1
- package/dist/effects/xp-gain.cjs +1 -1
- package/dist/effects/xp-gain.js +1 -1
- package/dist/effects/y2k-shine.cjs +1 -1
- package/dist/effects/y2k-shine.js +1 -1
- package/dist/element.cjs +1 -1
- package/dist/element.js +1 -1
- package/dist/element.umd.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/manifest.json +234 -1
- package/dist/manifest.schema.json +16 -0
- package/dist/presets/extended.cjs +1 -1
- package/dist/presets/extended.js +1 -1
- package/dist/presets-extended.umd.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/runtime/drag-snap.cjs +3 -3
- package/dist/runtime/drag-snap.d.cts +8 -0
- package/dist/runtime/drag-snap.d.ts +8 -0
- package/dist/runtime/drag-snap.iife.js +2 -2
- package/dist/runtime/drag-snap.js +3 -3
- package/dist/runtime/format-apng.cjs +6 -6
- package/dist/runtime/format-apng.d.cts +8 -0
- package/dist/runtime/format-apng.d.ts +8 -0
- package/dist/runtime/format-apng.iife.js +2 -2
- package/dist/runtime/format-apng.js +6 -6
- package/dist/runtime/format-css.cjs +6 -6
- package/dist/runtime/format-css.d.cts +8 -0
- package/dist/runtime/format-css.d.ts +8 -0
- package/dist/runtime/format-css.iife.js +2 -2
- package/dist/runtime/format-css.js +6 -6
- package/dist/runtime/format-gif.cjs +6 -6
- package/dist/runtime/format-gif.d.cts +8 -0
- package/dist/runtime/format-gif.d.ts +8 -0
- package/dist/runtime/format-gif.iife.js +2 -2
- package/dist/runtime/format-gif.js +6 -6
- package/dist/runtime/format-gltf.cjs +3 -3
- package/dist/runtime/format-gltf.d.cts +8 -0
- package/dist/runtime/format-gltf.d.ts +8 -0
- package/dist/runtime/format-gltf.iife.js +2 -2
- package/dist/runtime/format-gltf.js +3 -3
- package/dist/runtime/format-motion.cjs +6 -6
- package/dist/runtime/format-motion.d.cts +8 -0
- package/dist/runtime/format-motion.d.ts +8 -0
- package/dist/runtime/format-motion.iife.js +2 -2
- package/dist/runtime/format-motion.js +6 -6
- package/dist/runtime/format-obj.cjs +3 -3
- package/dist/runtime/format-obj.d.cts +8 -0
- package/dist/runtime/format-obj.d.ts +8 -0
- package/dist/runtime/format-obj.iife.js +2 -2
- package/dist/runtime/format-obj.js +3 -3
- package/dist/runtime/format-scene.cjs +3 -3
- package/dist/runtime/format-scene.d.cts +8 -0
- package/dist/runtime/format-scene.d.ts +8 -0
- package/dist/runtime/format-scene.iife.js +2 -2
- package/dist/runtime/format-scene.js +3 -3
- package/dist/runtime/format-sprite.cjs +5 -5
- package/dist/runtime/format-sprite.d.cts +8 -0
- package/dist/runtime/format-sprite.d.ts +8 -0
- package/dist/runtime/format-sprite.iife.js +2 -2
- package/dist/runtime/format-sprite.js +5 -5
- package/dist/runtime/format-svg.cjs +5 -5
- package/dist/runtime/format-svg.d.cts +8 -0
- package/dist/runtime/format-svg.d.ts +8 -0
- package/dist/runtime/format-svg.iife.js +2 -2
- package/dist/runtime/format-svg.js +5 -5
- package/dist/runtime/format-webp.cjs +6 -6
- package/dist/runtime/format-webp.d.cts +8 -0
- package/dist/runtime/format-webp.d.ts +8 -0
- package/dist/runtime/format-webp.iife.js +2 -2
- package/dist/runtime/format-webp.js +6 -6
- package/dist/runtime/gl.cjs +3 -2
- package/dist/runtime/gl.d.cts +8 -0
- package/dist/runtime/gl.d.ts +8 -0
- package/dist/runtime/gl.iife.js +2 -2
- package/dist/runtime/gl.js +3 -2
- package/dist/runtime/gltf-anim.cjs +3 -3
- package/dist/runtime/gltf-anim.d.cts +8 -0
- package/dist/runtime/gltf-anim.d.ts +8 -0
- package/dist/runtime/gltf-anim.iife.js +2 -2
- package/dist/runtime/gltf-anim.js +3 -3
- package/dist/runtime/gltf-decoders.cjs +3 -3
- package/dist/runtime/gltf-decoders.d.cts +8 -0
- package/dist/runtime/gltf-decoders.d.ts +8 -0
- package/dist/runtime/gltf-decoders.iife.js +2 -2
- package/dist/runtime/gltf-decoders.js +3 -3
- package/dist/runtime/lottie-state.cjs +3 -3
- package/dist/runtime/lottie-state.d.cts +8 -0
- package/dist/runtime/lottie-state.d.ts +8 -0
- package/dist/runtime/lottie-state.iife.js +2 -2
- package/dist/runtime/lottie-state.js +3 -3
- package/dist/runtime/physics.cjs +3 -3
- package/dist/runtime/physics.d.cts +8 -0
- package/dist/runtime/physics.d.ts +8 -0
- package/dist/runtime/physics.iife.js +2 -2
- package/dist/runtime/physics.js +3 -3
- package/dist/runtime/scroll.cjs +4 -4
- package/dist/runtime/scroll.d.cts +8 -0
- package/dist/runtime/scroll.d.ts +8 -0
- package/dist/runtime/scroll.iife.js +2 -2
- package/dist/runtime/scroll.js +4 -4
- package/dist/runtime/smooth.cjs +3 -3
- package/dist/runtime/smooth.d.cts +8 -0
- package/dist/runtime/smooth.d.ts +8 -0
- package/dist/runtime/smooth.iife.js +2 -2
- package/dist/runtime/smooth.js +3 -3
- package/dist/runtime/text.cjs +3 -3
- package/dist/runtime/text.d.cts +8 -0
- package/dist/runtime/text.d.ts +8 -0
- package/dist/runtime/text.iife.js +2 -2
- package/dist/runtime/text.js +3 -3
- package/dist/runtime/vector.cjs +5 -5
- package/dist/runtime/vector.d.cts +8 -0
- package/dist/runtime/vector.d.ts +8 -0
- package/dist/runtime/vector.iife.js +2 -2
- package/dist/runtime/vector.js +5 -5
- package/dist/runtime.cjs +9 -4
- package/dist/runtime.d.cts +18 -3
- package/dist/runtime.d.ts +18 -3
- package/dist/runtime.iife.js +2 -2
- package/dist/runtime.js +7 -6
- package/dist/solid.cjs +1 -1
- package/dist/solid.js +1 -1
- package/dist/svelte.cjs +1 -1
- package/dist/svelte.js +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +1 -1
- package/dist/widgets/add-to-cart.cjs +1 -1
- package/dist/widgets/add-to-cart.js +1 -1
- package/dist/widgets/badge-wall.cjs +1 -1
- package/dist/widgets/badge-wall.js +1 -1
- package/dist/widgets/bar-chart.cjs +1 -1
- package/dist/widgets/bar-chart.js +1 -1
- package/dist/widgets/bg-generator.cjs +1 -1
- package/dist/widgets/bg-generator.js +1 -1
- package/dist/widgets/carousel.cjs +1 -1
- package/dist/widgets/carousel.js +1 -1
- package/dist/widgets/cart-drawer.cjs +1 -1
- package/dist/widgets/cart-drawer.js +1 -1
- package/dist/widgets/chapter-nav.cjs +1 -1
- package/dist/widgets/chapter-nav.js +1 -1
- package/dist/widgets/chat-composer.cjs +1 -1
- package/dist/widgets/chat-composer.js +1 -1
- package/dist/widgets/clock-control.cjs +1 -1
- package/dist/widgets/clock-control.js +1 -1
- package/dist/widgets/code-export.cjs +1 -1
- package/dist/widgets/code-export.js +1 -1
- package/dist/widgets/color-picker.cjs +1 -1
- package/dist/widgets/color-picker.js +1 -1
- package/dist/widgets/command-palette.cjs +1 -1
- package/dist/widgets/command-palette.js +1 -1
- package/dist/widgets/compare.cjs +1 -1
- package/dist/widgets/compare.js +1 -1
- package/dist/widgets/countdown.cjs +1 -1
- package/dist/widgets/countdown.js +1 -1
- package/dist/widgets/cube-gallery.cjs +1 -1
- package/dist/widgets/cube-gallery.js +1 -1
- package/dist/widgets/date-picker.cjs +1 -1
- package/dist/widgets/date-picker.js +1 -1
- package/dist/widgets/disclosure.cjs +1 -1
- package/dist/widgets/disclosure.js +1 -1
- package/dist/widgets/dock.cjs +1 -1
- package/dist/widgets/dock.js +1 -1
- package/dist/widgets/dotlottie.cjs +4 -4
- package/dist/widgets/dotlottie.js +4 -4
- package/dist/widgets/equalizer.cjs +1 -1
- package/dist/widgets/equalizer.js +1 -1
- package/dist/widgets/festival-banner.cjs +1 -1
- package/dist/widgets/festival-banner.js +1 -1
- package/dist/widgets/field.cjs +1 -1
- package/dist/widgets/field.js +1 -1
- package/dist/widgets/file-drop.cjs +1 -1
- package/dist/widgets/file-drop.js +1 -1
- package/dist/widgets/gauge.cjs +1 -1
- package/dist/widgets/gauge.js +1 -1
- package/dist/widgets/gen-art.cjs +1 -1
- package/dist/widgets/gen-art.js +1 -1
- package/dist/widgets/gesture-sticker.cjs +1 -1
- package/dist/widgets/gesture-sticker.js +1 -1
- package/dist/widgets/gl-model.cjs +4 -4
- package/dist/widgets/gl-model.js +4 -4
- package/dist/widgets/gl-scene.cjs +4 -4
- package/dist/widgets/gl-scene.js +4 -4
- package/dist/widgets/globe.cjs +1 -1
- package/dist/widgets/globe.js +1 -1
- package/dist/widgets/gpu-particles.cjs +1 -1
- package/dist/widgets/gpu-particles.js +1 -1
- package/dist/widgets/gyro-card.cjs +1 -1
- package/dist/widgets/gyro-card.js +1 -1
- package/dist/widgets/hero-video.cjs +1 -1
- package/dist/widgets/hero-video.js +1 -1
- package/dist/widgets/hud-panel.cjs +1 -1
- package/dist/widgets/hud-panel.js +1 -1
- package/dist/widgets/hydrate.cjs +1 -1
- package/dist/widgets/hydrate.js +1 -1
- package/dist/widgets/install-button.cjs +1 -1
- package/dist/widgets/install-button.js +1 -1
- package/dist/widgets/kanban.cjs +1 -1
- package/dist/widgets/kanban.js +1 -1
- package/dist/widgets/keyframe-editor.cjs +1 -1
- package/dist/widgets/keyframe-editor.js +1 -1
- package/dist/widgets/kpi.cjs +1 -1
- package/dist/widgets/kpi.js +1 -1
- package/dist/widgets/leaderboard.cjs +1 -1
- package/dist/widgets/leaderboard.js +1 -1
- package/dist/widgets/liquid-nav.cjs +1 -1
- package/dist/widgets/liquid-nav.js +1 -1
- package/dist/widgets/location-card.cjs +1 -1
- package/dist/widgets/location-card.js +1 -1
- package/dist/widgets/lottie-icon.cjs +1 -1
- package/dist/widgets/lottie-icon.js +1 -1
- package/dist/widgets/lottie-player.cjs +4 -4
- package/dist/widgets/lottie-player.js +4 -4
- package/dist/widgets/lottie.cjs +1 -1
- package/dist/widgets/lottie.js +1 -1
- package/dist/widgets/lyrics.cjs +1 -1
- package/dist/widgets/lyrics.js +1 -1
- package/dist/widgets/masonry-flow.cjs +1 -1
- package/dist/widgets/masonry-flow.js +1 -1
- package/dist/widgets/menu-toggle.cjs +1 -1
- package/dist/widgets/menu-toggle.js +1 -1
- package/dist/widgets/menu.cjs +1 -1
- package/dist/widgets/menu.js +1 -1
- package/dist/widgets/message-list.cjs +1 -1
- package/dist/widgets/message-list.js +1 -1
- package/dist/widgets/milestones.cjs +1 -1
- package/dist/widgets/milestones.js +1 -1
- package/dist/widgets/modal.cjs +1 -1
- package/dist/widgets/modal.js +1 -1
- package/dist/widgets/motion-inspector.cjs +2 -2
- package/dist/widgets/motion-inspector.js +2 -2
- package/dist/widgets/motion-prefs.cjs +1 -1
- package/dist/widgets/motion-prefs.js +1 -1
- package/dist/widgets/motion-prompt.cjs +1 -1
- package/dist/widgets/motion-prompt.js +1 -1
- package/dist/widgets/motion-spec.cjs +1 -1
- package/dist/widgets/motion-spec.js +1 -1
- package/dist/widgets/motion.cjs +1 -1
- package/dist/widgets/motion.js +1 -1
- package/dist/widgets/music-player.cjs +1 -1
- package/dist/widgets/music-player.js +1 -1
- package/dist/widgets/native-preview.cjs +1 -1
- package/dist/widgets/native-preview.js +1 -1
- package/dist/widgets/nav-morph.cjs +1 -1
- package/dist/widgets/nav-morph.js +1 -1
- package/dist/widgets/notification-bell.cjs +1 -1
- package/dist/widgets/notification-bell.js +1 -1
- package/dist/widgets/odometer.cjs +1 -1
- package/dist/widgets/odometer.js +1 -1
- package/dist/widgets/organic-card.cjs +1 -1
- package/dist/widgets/organic-card.js +1 -1
- package/dist/widgets/otp.cjs +1 -1
- package/dist/widgets/otp.js +1 -1
- package/dist/widgets/pagination.cjs +1 -1
- package/dist/widgets/pagination.js +1 -1
- package/dist/widgets/panorama.cjs +1 -1
- package/dist/widgets/panorama.js +1 -1
- package/dist/widgets/parallax-layers.cjs +1 -1
- package/dist/widgets/parallax-layers.js +1 -1
- package/dist/widgets/pause-all.cjs +1 -1
- package/dist/widgets/pause-all.js +1 -1
- package/dist/widgets/perf-monitor.cjs +1 -1
- package/dist/widgets/perf-monitor.js +1 -1
- package/dist/widgets/physics-playground.cjs +4 -4
- package/dist/widgets/physics-playground.js +4 -4
- package/dist/widgets/plugin-card.cjs +3 -3
- package/dist/widgets/plugin-card.js +3 -3
- package/dist/widgets/plugin-store.cjs +1 -1
- package/dist/widgets/plugin-store.js +1 -1
- package/dist/widgets/presence.cjs +1 -1
- package/dist/widgets/presence.js +1 -1
- package/dist/widgets/prize-wheel.cjs +1 -1
- package/dist/widgets/prize-wheel.js +1 -1
- package/dist/widgets/product-gallery.cjs +1 -1
- package/dist/widgets/product-gallery.js +1 -1
- package/dist/widgets/progress-ring.cjs +1 -1
- package/dist/widgets/progress-ring.js +1 -1
- package/dist/widgets/prop-panel.cjs +1 -1
- package/dist/widgets/prop-panel.js +1 -1
- package/dist/widgets/pull-cord.cjs +1 -1
- package/dist/widgets/pull-cord.js +1 -1
- package/dist/widgets/radar.cjs +1 -1
- package/dist/widgets/radar.js +1 -1
- package/dist/widgets/reactions.cjs +1 -1
- package/dist/widgets/reactions.js +1 -1
- package/dist/widgets/red-envelope.cjs +1 -1
- package/dist/widgets/red-envelope.js +1 -1
- package/dist/widgets/retro-button.cjs +1 -1
- package/dist/widgets/retro-button.js +1 -1
- package/dist/widgets/rive.cjs +1 -1
- package/dist/widgets/rive.js +1 -1
- package/dist/widgets/route-transition.cjs +1 -1
- package/dist/widgets/route-transition.js +1 -1
- package/dist/widgets/scene.cjs +1 -1
- package/dist/widgets/scene.js +1 -1
- package/dist/widgets/scroll-ring.cjs +1 -1
- package/dist/widgets/scroll-ring.js +1 -1
- package/dist/widgets/scroll-scene.cjs +4 -4
- package/dist/widgets/scroll-scene.js +4 -4
- package/dist/widgets/segmented.cjs +1 -1
- package/dist/widgets/segmented.js +1 -1
- package/dist/widgets/shader-backdrop.cjs +1 -1
- package/dist/widgets/shader-backdrop.js +1 -1
- package/dist/widgets/sheet.cjs +1 -1
- package/dist/widgets/sheet.js +1 -1
- package/dist/widgets/shortcut.cjs +1 -1
- package/dist/widgets/shortcut.js +1 -1
- package/dist/widgets/skeleton-reveal.cjs +1 -1
- package/dist/widgets/skeleton-reveal.js +1 -1
- package/dist/widgets/sketch-chart.cjs +1 -1
- package/dist/widgets/sketch-chart.js +1 -1
- package/dist/widgets/smooth-scroll.cjs +3 -3
- package/dist/widgets/smooth-scroll.js +3 -3
- package/dist/widgets/snap-carousel.cjs +3 -3
- package/dist/widgets/snap-carousel.js +3 -3
- package/dist/widgets/sparkline.cjs +1 -1
- package/dist/widgets/sparkline.js +1 -1
- package/dist/widgets/spatial-card.cjs +1 -1
- package/dist/widgets/spatial-card.js +1 -1
- package/dist/widgets/star-rating.cjs +1 -1
- package/dist/widgets/star-rating.js +1 -1
- package/dist/widgets/stepper.cjs +1 -1
- package/dist/widgets/stepper.js +1 -1
- package/dist/widgets/sticky-wall.cjs +1 -1
- package/dist/widgets/sticky-wall.js +1 -1
- package/dist/widgets/stories.cjs +1 -1
- package/dist/widgets/stories.js +1 -1
- package/dist/widgets/suggestion-chips.cjs +1 -1
- package/dist/widgets/suggestion-chips.js +1 -1
- package/dist/widgets/swipe-deck.cjs +1 -1
- package/dist/widgets/swipe-deck.js +1 -1
- package/dist/widgets/switch.cjs +1 -1
- package/dist/widgets/switch.js +1 -1
- package/dist/widgets/tab-bar.cjs +1 -1
- package/dist/widgets/tab-bar.js +1 -1
- package/dist/widgets/terminal.cjs +1 -1
- package/dist/widgets/terminal.js +1 -1
- package/dist/widgets/text-splitter.cjs +3 -3
- package/dist/widgets/text-splitter.js +3 -3
- package/dist/widgets/theme-surface.cjs +1 -1
- package/dist/widgets/theme-surface.js +1 -1
- package/dist/widgets/theme-switcher.cjs +1 -1
- package/dist/widgets/theme-switcher.js +1 -1
- package/dist/widgets/tip.cjs +1 -1
- package/dist/widgets/tip.js +1 -1
- package/dist/widgets/toast-stack.cjs +1 -1
- package/dist/widgets/toast-stack.js +1 -1
- package/dist/widgets/token-editor.cjs +1 -1
- package/dist/widgets/token-editor.js +1 -1
- package/dist/widgets/upload-progress.cjs +1 -1
- package/dist/widgets/upload-progress.js +1 -1
- package/dist/widgets/video-card.cjs +1 -1
- package/dist/widgets/video-card.js +1 -1
- package/dist/widgets/voice-button.cjs +1 -1
- package/dist/widgets/voice-button.js +1 -1
- package/dist/widgets/volume-knob.cjs +1 -1
- package/dist/widgets/volume-knob.js +1 -1
- package/dist/widgets/weather-card.cjs +1 -1
- package/dist/widgets/weather-card.js +1 -1
- package/dist/widgets/worker-canvas.cjs +1 -1
- package/dist/widgets/worker-canvas.js +1 -1
- package/dist/widgets/xp-bar.cjs +1 -1
- package/dist/widgets/xp-bar.js +1 -1
- package/dist/widgets.umd.js +2 -2
- package/docs/ROADMAP.md +1 -1
- package/docs/runtime/basis-transcoder.md +2 -0
- package/docs/runtime/core.md +2 -0
- package/docs/runtime/draco3d.md +2 -0
- package/docs/runtime/drag-snap.md +2 -0
- package/docs/runtime/format-apng.md +2 -0
- package/docs/runtime/format-css.md +2 -0
- package/docs/runtime/format-gif.md +2 -0
- package/docs/runtime/format-gltf.md +2 -0
- package/docs/runtime/format-motion.md +2 -0
- package/docs/runtime/format-obj.md +2 -0
- package/docs/runtime/format-scene.md +2 -0
- package/docs/runtime/format-sprite.md +2 -0
- package/docs/runtime/format-svg.md +2 -0
- package/docs/runtime/format-webp.md +2 -0
- package/docs/runtime/gl.md +2 -0
- package/docs/runtime/gltf-anim.md +2 -0
- package/docs/runtime/gltf-decoders.md +2 -0
- package/docs/runtime/lottie-state.md +2 -0
- package/docs/runtime/physics.md +2 -0
- package/docs/runtime/rive.md +2 -0
- package/docs/runtime/scroll.md +2 -0
- package/docs/runtime/smooth.md +2 -0
- package/docs/runtime/text.md +2 -0
- package/docs/runtime/vector.md +2 -0
- package/docs/runtime-tiers.md +37 -0
- package/package.json +3 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,n){"use strict";const e={identity:()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),multiply(t,n,e=new Float32Array(16)){for(let o=0;o<4;o++)for(let r=0;r<4;r++)e[4*o+r]=t[r]*n[4*o]+t[4+r]*n[4*o+1]+t[8+r]*n[4*o+2]+t[12+r]*n[4*o+3];return e},perspective(t,n,e,o){const r=1/Math.tan(t/2),i=1/(e-o);return new Float32Array([r/n,0,0,0,0,r,0,0,0,0,(o+e)*i,-1,0,0,2*o*e*i,0])},lookAt(t,n,e=[0,1,0]){let a=o(t,n);a=s(a.some(t=>t)?a:[0,0,1]);let l=i(e,a);l.some(t=>Math.abs(t)>1e-9)||(l=i([0,0,1],a)),l=s(l);const m=i(a,l);return new Float32Array([l[0],m[0],a[0],0,l[1],m[1],a[1],0,l[2],m[2],a[2],0,-r(l,t),-r(m,t),-r(a,t),1])},compose(t,n,e){const[o,r,i,s]=n,a=o+o,l=r+r,m=i+i,c=o*a,p=o*l,u=o*m,f=r*l,h=r*m,g=i*m,d=s*a,y=s*l,M=s*m;return new Float32Array([(1-(f+g))*e[0],(p+M)*e[0],(u-y)*e[0],0,(p-M)*e[1],(1-(c+g))*e[1],(h+d)*e[1],0,(u+y)*e[2],(h-d)*e[2],(1-(c+f))*e[2],0,t[0],t[1],t[2],1])},invert(t){const n=new Float32Array(16),[e,o,r,i,s,a,l,m,c,p,u,f,h,g,d,y]=t,M=e*a-o*s,w=e*l-r*s,A=e*m-i*s,v=o*l-r*a,C=o*m-i*a,F=r*m-i*l,b=c*g-p*h,k=c*d-u*h,x=c*y-f*h,E=p*d-u*g,I=p*y-f*g,N=u*y-f*d;let j=M*N-w*I+A*E+v*x-C*k+F*b;return j?(j=1/j,n[0]=(a*N-l*I+m*E)*j,n[1]=(r*I-o*N-i*E)*j,n[2]=(g*F-d*C+y*v)*j,n[3]=(u*C-p*F-f*v)*j,n[4]=(l*x-s*N-m*k)*j,n[5]=(e*N-r*x+i*k)*j,n[6]=(d*A-h*F-y*w)*j,n[7]=(c*F-u*A+f*w)*j,n[8]=(s*I-a*x+m*b)*j,n[9]=(o*x-e*I-i*b)*j,n[10]=(h*C-g*A+y*M)*j,n[11]=(p*A-c*C-f*M)*j,n[12]=(a*k-s*E-l*b)*j,n[13]=(e*E-o*k+r*b)*j,n[14]=(g*w-h*v-d*M)*j,n[15]=(c*v-p*w+u*M)*j,n):null},normal(t){const n=e.invert(t)||e.identity();return new Float32Array([n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]])},transformPoint(t,n){const e=t[3]*n[0]+t[7]*n[1]+t[11]*n[2]+t[15]||1;return[(t[0]*n[0]+t[4]*n[1]+t[8]*n[2]+t[12])/e,(t[1]*n[0]+t[5]*n[1]+t[9]*n[2]+t[13])/e,(t[2]*n[0]+t[6]*n[1]+t[10]*n[2]+t[14])/e]}},o=(t,n)=>[t[0]-n[0],t[1]-n[1],t[2]-n[2]],r=(t,n)=>t[0]*n[0]+t[1]*n[1]+t[2]*n[2],i=(t,n)=>[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]],s=t=>{const n=Math.hypot(t[0],t[1],t[2])||1;return[t[0]/n,t[1]/n,t[2]/n]};const a=t=>{const n=t.extras;if(!n?.gltf||!n.read)throw new Error("[motionary] gltf-anim: pass the node returned by loadGltf() / gltfToNode() (motionary/runtime/format-gltf 10.8+)");return n};function l(t){const{gltf:n,nodes:e,read:o}=a(t);return(n.animations||[]).map((t,n)=>{let r=0;const i=[];for(const n of t.channels||[]){const s=e[n.target?.node],a=t.samplers?.[n.sampler];if(!s||!a||!["translation","rotation","scale","weights"].includes(n.target.path))continue;const l=o(a.input),m=o(a.output),c=a.interpolation||"LINEAR",p=m.length/l.length/("CUBICSPLINE"===c?3:1);r=Math.max(r,l[l.length-1]||0),i.push({node:s,path:n.target.path,interpolation:c,times:l,values:m,size:p})}return{name:t.name||`animation${n}`,duration:r,channels:i}})}function m(t,n){const{times:e,values:o,size:r}=t,i="CUBICSPLINE"===t.interpolation,s=t=>Array.from(o.subarray((i?3*t+1:t)*r,(i?3*t+1:t)*r+r)),a=e.length-1;if(n<=e[0]||0===a)return s(0);if(n>=e[a])return s(a);let l=0;for(;l<a-1&&e[l+1]<=n;)l++;const m=e[l+1]-e[l],c=(n-e[l])/m;let p;if("STEP"===t.interpolation)return s(l);if(i){const n=c*c,e=n*c,i=2*e-3*n+1,s=e-2*n+c,a=-2*e+3*n,u=e-n,f=3*l*r,h=3*(l+1)*r;if(p=Array.from({length:r},(t,n)=>i*o[f+r+n]+s*m*o[f+2*r+n]+a*o[h+r+n]+u*m*o[h+n]),"rotation"===t.path){const t=Math.hypot(...p)||1;p=p.map(n=>n/t)}return p}const u=s(l),f=s(l+1);return"rotation"===t.path?function(t,n,e){let o=t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3];const r=o<0?n.map(t=>-t):n;if(o=Math.abs(o),o>.9995){const n=t.map((t,n)=>t+(r[n]-t)*e),o=Math.hypot(...n)||1;return n.map(t=>t/o)}const i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-e)*i)/s,l=Math.sin(e*i)/s;return t.map((t,n)=>t*a+r[n]*l)}(u,f,c):u.map((t,n)=>t+(f[n]-t)*c)}function c(t,n){for(const e of t.channels){const t=m(e,n),o=e.node;"weights"===e.path?o.extras.weights=t:(o.matrix=null,"translation"===e.path?o.position=t:"rotation"===e.path?o.rotation=t:o.scale=t)}}const p=t=>t.mesh?Array.isArray(t.mesh)?t.mesh:[t.mesh]:[];function u(t){var n;const{gltf:o,nodes:r,read:i}=a(t);t.updateWorld();let s=0;const l=(n=t.extras).skinCache||(n.skinCache={});for(const t of r){const n=p(t);if(!n.length)continue;const a=t.extras.skin;let m=null;if(void 0!==a&&o.skins?.[a]){const n=o.skins[a],s=l[a]||(l[a]={joints:n.joints.map(t=>r[t]),ibm:n.joints.map((t,o)=>void 0!==n.inverseBindMatrices?new Float32Array(i(n.inverseBindMatrices).subarray(16*o,16*o+16)):e.identity())}),c=e.invert(t.world)||e.identity();m=s.joints.map((t,n)=>e.multiply(c,e.multiply(t.world,s.ibm[n])))}const c=t.extras.weights||[];for(const t of n){const n=t.geometry,e=n.deform;e&&(m||e.targets?.length)&&(f(n,e,c,m),s++)}}return s}function f(t,n,e,o){const r=n.positions,i=n.normals,s=r.length/3,a=t.positions!==r&&t.positions.length===r.length?t.positions:t.positions=new Float32Array(r.length),l=i?t.normals&&t.normals!==i&&t.normals.length===i.length?t.normals:t.normals=new Float32Array(i.length):null;if(a.set(r),l&&i&&l.set(i),(n.targets||[]).forEach((t,n)=>{const o=e[n]||0;if(o){if(t.positions)for(let n=0;n<a.length;n++)a[n]+=o*t.positions[n];if(t.normals&&l)for(let n=0;n<l.length;n++)l[n]+=o*t.normals[n]}}),o&&n.joints&&n.weights){const t=n.joints,e=n.weights,r=new Float32Array(16);for(let n=0;n<s;n++){r.fill(0);let i=0;for(let s=0;s<4;s++){const a=e[4*n+s];if(!a)continue;const l=o[t[4*n+s]];if(l){i+=a;for(let t=0;t<16;t++)r[t]+=a*l[t]}}if(!i)continue;const s=a[3*n],m=a[3*n+1],c=a[3*n+2];if(a[3*n]=r[0]*s+r[4]*m+r[8]*c+r[12],a[3*n+1]=r[1]*s+r[5]*m+r[9]*c+r[13],a[3*n+2]=r[2]*s+r[6]*m+r[10]*c+r[14],l){const t=l[3*n],e=l[3*n+1],o=l[3*n+2],i=r[0]*t+r[4]*e+r[8]*o,s=r[1]*t+r[5]*e+r[9]*o,a=r[2]*t+r[6]*e+r[10]*o,m=Math.hypot(i,s,a)||1;l[3*n]=i/m,l[3*n+1]=s/m,l[3*n+2]=a/m}}}t.version=(t.version||0)+1}function h(t,e={}){const o=l(t);let r=null,i=null;const s=t=>("number"==typeof t?o[t]:o.find(n=>n.name===t)||o[Number(t)])||null,a=()=>{r&&c(r,m.time),u(t)},m={clips:o,get clip(){return r},time:0,speed:e.speed??1,loop:e.loop??!0,get playing(){return!!i},use(t){r=s(t),m.time=0,a()},seek(t){const n=r?.duration||0;m.time=n?m.loop?(t%n+n)%n:Math.min(n,Math.max(0,t)):0,a()},update(t){m.seek(m.time+t*m.speed)},play(){i||(i=n.requireModule("core","motionary/runtime/gltf-anim").getTicker().add((t,n)=>m.update(Math.min(n,100)/1e3)))},pause(){i?.(),i=null},dispose(){m.pause()}};return r=s(e.clip??0),a(),m}const g={id:"gltf-anim",version:n.RUNTIME_VERSION,requires:["core","gl","format-gltf"],api:{gltfClips:l,sampleChannel:m,applyClip:c,deformModel:u,deformGeometry:f,gltfAnimator:h}};n.register(g),t.applyClip=c,t.deformGeometry=f,t.deformModel=u,t.gltfAnim=g,t.gltfAnimator=h,t.gltfClips=l,t.sampleChannel=m}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
1
|
+
!function(t,n){"use strict";const e={identity:()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),multiply(t,n,e=new Float32Array(16)){for(let o=0;o<4;o++)for(let r=0;r<4;r++)e[4*o+r]=t[r]*n[4*o]+t[4+r]*n[4*o+1]+t[8+r]*n[4*o+2]+t[12+r]*n[4*o+3];return e},perspective(t,n,e,o){const r=1/Math.tan(t/2),i=1/(e-o);return new Float32Array([r/n,0,0,0,0,r,0,0,0,0,(o+e)*i,-1,0,0,2*o*e*i,0])},lookAt(t,n,e=[0,1,0]){let a=o(t,n);a=s(a.some(t=>t)?a:[0,0,1]);let l=i(e,a);l.some(t=>Math.abs(t)>1e-9)||(l=i([0,0,1],a)),l=s(l);const m=i(a,l);return new Float32Array([l[0],m[0],a[0],0,l[1],m[1],a[1],0,l[2],m[2],a[2],0,-r(l,t),-r(m,t),-r(a,t),1])},compose(t,n,e){const[o,r,i,s]=n,a=o+o,l=r+r,m=i+i,c=o*a,p=o*l,u=o*m,f=r*l,h=r*m,g=i*m,d=s*a,y=s*l,M=s*m;return new Float32Array([(1-(f+g))*e[0],(p+M)*e[0],(u-y)*e[0],0,(p-M)*e[1],(1-(c+g))*e[1],(h+d)*e[1],0,(u+y)*e[2],(h-d)*e[2],(1-(c+f))*e[2],0,t[0],t[1],t[2],1])},invert(t){const n=new Float32Array(16),[e,o,r,i,s,a,l,m,c,p,u,f,h,g,d,y]=t,M=e*a-o*s,w=e*l-r*s,A=e*m-i*s,v=o*l-r*a,C=o*m-i*a,F=r*m-i*l,b=c*g-p*h,k=c*d-u*h,x=c*y-f*h,E=p*d-u*g,I=p*y-f*g,N=u*y-f*d;let j=M*N-w*I+A*E+v*x-C*k+F*b;return j?(j=1/j,n[0]=(a*N-l*I+m*E)*j,n[1]=(r*I-o*N-i*E)*j,n[2]=(g*F-d*C+y*v)*j,n[3]=(u*C-p*F-f*v)*j,n[4]=(l*x-s*N-m*k)*j,n[5]=(e*N-r*x+i*k)*j,n[6]=(d*A-h*F-y*w)*j,n[7]=(c*F-u*A+f*w)*j,n[8]=(s*I-a*x+m*b)*j,n[9]=(o*x-e*I-i*b)*j,n[10]=(h*C-g*A+y*M)*j,n[11]=(p*A-c*C-f*M)*j,n[12]=(a*k-s*E-l*b)*j,n[13]=(e*E-o*k+r*b)*j,n[14]=(g*w-h*v-d*M)*j,n[15]=(c*v-p*w+u*M)*j,n):null},normal(t){const n=e.invert(t)||e.identity();return new Float32Array([n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]])},transformPoint(t,n){const e=t[3]*n[0]+t[7]*n[1]+t[11]*n[2]+t[15]||1;return[(t[0]*n[0]+t[4]*n[1]+t[8]*n[2]+t[12])/e,(t[1]*n[0]+t[5]*n[1]+t[9]*n[2]+t[13])/e,(t[2]*n[0]+t[6]*n[1]+t[10]*n[2]+t[14])/e]}},o=(t,n)=>[t[0]-n[0],t[1]-n[1],t[2]-n[2]],r=(t,n)=>t[0]*n[0]+t[1]*n[1]+t[2]*n[2],i=(t,n)=>[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]],s=t=>{const n=Math.hypot(t[0],t[1],t[2])||1;return[t[0]/n,t[1]/n,t[2]/n]};const a=t=>{const n=t.extras;if(!n?.gltf||!n.read)throw new Error("[motionary] gltf-anim: pass the node returned by loadGltf() / gltfToNode() (motionary/runtime/format-gltf 10.8+)");return n};function l(t){const{gltf:n,nodes:e,read:o}=a(t);return(n.animations||[]).map((t,n)=>{let r=0;const i=[];for(const n of t.channels||[]){const s=e[n.target?.node],a=t.samplers?.[n.sampler];if(!s||!a||!["translation","rotation","scale","weights"].includes(n.target.path))continue;const l=o(a.input),m=o(a.output),c=a.interpolation||"LINEAR",p=m.length/l.length/("CUBICSPLINE"===c?3:1);r=Math.max(r,l[l.length-1]||0),i.push({node:s,path:n.target.path,interpolation:c,times:l,values:m,size:p})}return{name:t.name||`animation${n}`,duration:r,channels:i}})}function m(t,n){const{times:e,values:o,size:r}=t,i="CUBICSPLINE"===t.interpolation,s=t=>Array.from(o.subarray((i?3*t+1:t)*r,(i?3*t+1:t)*r+r)),a=e.length-1;if(n<=e[0]||0===a)return s(0);if(n>=e[a])return s(a);let l=0;for(;l<a-1&&e[l+1]<=n;)l++;const m=e[l+1]-e[l],c=(n-e[l])/m;let p;if("STEP"===t.interpolation)return s(l);if(i){const n=c*c,e=n*c,i=2*e-3*n+1,s=e-2*n+c,a=-2*e+3*n,u=e-n,f=3*l*r,h=3*(l+1)*r;if(p=Array.from({length:r},(t,n)=>i*o[f+r+n]+s*m*o[f+2*r+n]+a*o[h+r+n]+u*m*o[h+n]),"rotation"===t.path){const t=Math.hypot(...p)||1;p=p.map(n=>n/t)}return p}const u=s(l),f=s(l+1);return"rotation"===t.path?function(t,n,e){let o=t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3];const r=o<0?n.map(t=>-t):n;if(o=Math.abs(o),o>.9995){const n=t.map((t,n)=>t+(r[n]-t)*e),o=Math.hypot(...n)||1;return n.map(t=>t/o)}const i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-e)*i)/s,l=Math.sin(e*i)/s;return t.map((t,n)=>t*a+r[n]*l)}(u,f,c):u.map((t,n)=>t+(f[n]-t)*c)}function c(t,n){for(const e of t.channels){const t=m(e,n),o=e.node;"weights"===e.path?o.extras.weights=t:(o.matrix=null,"translation"===e.path?o.position=t:"rotation"===e.path?o.rotation=t:o.scale=t)}}const p=t=>t.mesh?Array.isArray(t.mesh)?t.mesh:[t.mesh]:[];function u(t){var n;const{gltf:o,nodes:r,read:i}=a(t);t.updateWorld();let s=0;const l=(n=t.extras).skinCache||(n.skinCache={});for(const t of r){const n=p(t);if(!n.length)continue;const a=t.extras.skin;let m=null;if(void 0!==a&&o.skins?.[a]){const n=o.skins[a],s=l[a]||(l[a]={joints:n.joints.map(t=>r[t]),ibm:n.joints.map((t,o)=>void 0!==n.inverseBindMatrices?new Float32Array(i(n.inverseBindMatrices).subarray(16*o,16*o+16)):e.identity())}),c=e.invert(t.world)||e.identity();m=s.joints.map((t,n)=>e.multiply(c,e.multiply(t.world,s.ibm[n])))}const c=t.extras.weights||[];for(const t of n){const n=t.geometry,e=n.deform;e&&(m||e.targets?.length)&&(f(n,e,c,m),s++)}}return s}function f(t,n,e,o){const r=n.positions,i=n.normals,s=r.length/3,a=t.positions!==r&&t.positions.length===r.length?t.positions:t.positions=new Float32Array(r.length),l=i?t.normals&&t.normals!==i&&t.normals.length===i.length?t.normals:t.normals=new Float32Array(i.length):null;if(a.set(r),l&&i&&l.set(i),(n.targets||[]).forEach((t,n)=>{const o=e[n]||0;if(o){if(t.positions)for(let n=0;n<a.length;n++)a[n]+=o*t.positions[n];if(t.normals&&l)for(let n=0;n<l.length;n++)l[n]+=o*t.normals[n]}}),o&&n.joints&&n.weights){const t=n.joints,e=n.weights,r=new Float32Array(16);for(let n=0;n<s;n++){r.fill(0);let i=0;for(let s=0;s<4;s++){const a=e[4*n+s];if(!a)continue;const l=o[t[4*n+s]];if(l){i+=a;for(let t=0;t<16;t++)r[t]+=a*l[t]}}if(!i)continue;const s=a[3*n],m=a[3*n+1],c=a[3*n+2];if(a[3*n]=r[0]*s+r[4]*m+r[8]*c+r[12],a[3*n+1]=r[1]*s+r[5]*m+r[9]*c+r[13],a[3*n+2]=r[2]*s+r[6]*m+r[10]*c+r[14],l){const t=l[3*n],e=l[3*n+1],o=l[3*n+2],i=r[0]*t+r[4]*e+r[8]*o,s=r[1]*t+r[5]*e+r[9]*o,a=r[2]*t+r[6]*e+r[10]*o,m=Math.hypot(i,s,a)||1;l[3*n]=i/m,l[3*n+1]=s/m,l[3*n+2]=a/m}}}t.version=(t.version||0)+1}function h(t,e={}){const o=l(t);let r=null,i=null;const s=t=>("number"==typeof t?o[t]:o.find(n=>n.name===t)||o[Number(t)])||null,a=()=>{r&&c(r,m.time),u(t)},m={clips:o,get clip(){return r},time:0,speed:e.speed??1,loop:e.loop??!0,get playing(){return!!i},use(t){r=s(t),m.time=0,a()},seek(t){const n=r?.duration||0;m.time=n?m.loop?(t%n+n)%n:Math.min(n,Math.max(0,t)):0,a()},update(t){m.seek(m.time+t*m.speed)},play(){i||(i=n.requireModule("core","motionary/runtime/gltf-anim").getTicker().add((t,n)=>m.update(Math.min(n,100)/1e3)))},pause(){i?.(),i=null},dispose(){m.pause()}};return r=s(e.clip??0),a(),m}const g={id:"gltf-anim",version:n.RUNTIME_VERSION,tier:"advanced",requires:["core","gl","format-gltf"],api:{gltfClips:l,sampleChannel:m,applyClip:c,deformModel:u,deformGeometry:f,gltfAnimator:h}};n.register(g),t.applyClip=c,t.deformGeometry=f,t.deformModel=u,t.gltfAnim=g,t.gltfAnimator=h,t.gltfClips=l,t.sampleChannel=m}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/gltf-anim.iife.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION, r as requireModule } from '../chunks/registry-
|
|
1
|
+
import { R as RUNTIME_VERSION, r as requireModule } from '../chunks/registry-CorBCE7b.js';
|
|
2
2
|
import { mat4, quatSlerp } from './gl.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -237,7 +237,7 @@ function gltfAnimator(root, o = {}) {
|
|
|
237
237
|
pose();
|
|
238
238
|
return a;
|
|
239
239
|
}
|
|
240
|
-
const gltfAnim = { id: 'gltf-anim', version: RUNTIME_VERSION, requires: ['core', 'gl', 'format-gltf'], api: { gltfClips, sampleChannel, applyClip, deformModel, deformGeometry, gltfAnimator } };
|
|
240
|
+
const gltfAnim = { id: 'gltf-anim', version: RUNTIME_VERSION, tier: 'advanced', requires: ['core', 'gl', 'format-gltf'], api: { gltfClips, sampleChannel, applyClip, deformModel, deformGeometry, gltfAnimator } };
|
|
241
241
|
|
|
242
242
|
export { applyClip, deformGeometry, deformModel, gltfAnim, gltfAnimator, gltfClips, sampleChannel };
|
|
243
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
243
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/gltf-anim.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
3
|
+
var registry = require('../chunks/registry-VITvgTNc.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `motionary/runtime/gltf-decoders` (10.9) — hooks that let
|
|
@@ -146,7 +146,7 @@ async function prepareGltf(json, buffers) {
|
|
|
146
146
|
j.extensionsUsed = strip(j.extensionsUsed);
|
|
147
147
|
return { json: j, buffers: bufs, images };
|
|
148
148
|
}
|
|
149
|
-
const gltfDecoders = { id: 'gltf-decoders', version: registry.RUNTIME_VERSION, requires: ['core', 'gl', 'format-gltf'], api: { provideGltfDecoder, providedDecoders, prepareGltf, decodeDraco, transcodeKtx2, DECODER_EXTENSIONS } };
|
|
149
|
+
const gltfDecoders = { id: 'gltf-decoders', version: registry.RUNTIME_VERSION, tier: 'advanced', requires: ['core', 'gl', 'format-gltf'], api: { provideGltfDecoder, providedDecoders, prepareGltf, decodeDraco, transcodeKtx2, DECODER_EXTENSIONS } };
|
|
150
150
|
|
|
151
151
|
exports.DECODER_EXTENSIONS = DECODER_EXTENSIONS;
|
|
152
152
|
exports.DECODER_HELP = DECODER_HELP;
|
|
@@ -156,4 +156,4 @@ exports.prepareGltf = prepareGltf;
|
|
|
156
156
|
exports.provideGltfDecoder = provideGltfDecoder;
|
|
157
157
|
exports.providedDecoders = providedDecoders;
|
|
158
158
|
exports.transcodeKtx2 = transcodeKtx2;
|
|
159
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
159
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/gltf-decoders.cjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"use strict";const r={},o={},s={KHR_draco_mesh_compression:"draco",KHR_texture_basisu:"ktx2"},n={draco:"npm i draco3d — then provideGltfDecoder('draco', () => import('draco3d')) (CDN: https://www.gstatic.com/draco/versioned/decoders/1.5.7/draco_decoder.js)",ktx2:"copy basis_transcoder.js + basis_transcoder.wasm from https://github.com/BinomialLLC/basis_universal (webgl/transcoder/build) — then provideGltfDecoder('ktx2', () => import('/vendor/basis_transcoder.js'))"};function i(e,t){r[e]=t,delete o[e]}const a=()=>Object.keys(r),c=(e,t)=>{const s=r[e];if(!s)throw new Error(`[motionary] gltf-decoders: this file uses ${t}, which needs the official decoder — ${n[e]}`);return o[e]||(o[e]=Promise.resolve(s()).then(async t=>{const r=t?.default??t;if("draco"===e)return r.createDecoderModule?r.createDecoderModule({}):"function"==typeof r?r({}):r;const o="function"==typeof r?await r():r;return o.initializeBasis?.(),o}))};function d(e,t,r){const o=new e.Decoder,s=new e.DecoderBuffer,n=new e.Mesh;try{s.Init(new Int8Array(t.buffer,t.byteOffset,t.byteLength),t.byteLength);const i=o.DecodeBufferToMesh(s,n);if(!i.ok()||!n.ptr)throw new Error("[motionary] gltf-decoders: Draco decode failed — "+i.error_msg());const a=n.num_points(),c=n.num_faces(),d={};for(const[t,s]of Object.entries(r)){const r=o.GetAttributeByUniqueId(n,s),i=r.num_components(),c=a*i*4,f=e._malloc(c);o.GetAttributeDataArrayForAllPoints(n,r,e.DT_FLOAT32,c,f),d[t]={data:new Float32Array(e.HEAPF32.buffer,f,a*i).slice(),size:i},e._free(f)}const f=12*c,u=e._malloc(f);o.GetTrianglesUInt32Array(n,f,u);const l=new Uint32Array(e.HEAPU32.buffer,u,3*c).slice();return e._free(u),{attributes:d,indices:l,count:a}}finally{e.destroy(n),e.destroy(s),e.destroy(o)}}function f(e,t){const r=new e.KTX2File(new Uint8Array(t));try{if(!r.isValid())throw new Error("[motionary] gltf-decoders: not a valid KTX2 file");const t=r.getWidth(),o=r.getHeight();if(!r.startTranscoding())throw new Error("[motionary] gltf-decoders: KTX2 startTranscoding failed");const s=e.transcoder_texture_format?.cTFRGBA32?.value??e.transcoder_texture_format?.cTFRGBA32??13,n=new Uint8Array(r.getImageTranscodedSizeInBytes(0,0,0,s));if(!r.transcodeImage(n,0,0,0,s,0,-1,-1))throw new Error("[motionary] gltf-decoders: KTX2 transcode failed");return{width:t,height:o,data:n}}finally{r.close?.(),r.delete?.()}}async function u(e,t){if(![...e.extensionsUsed||[],...e.extensionsRequired||[]].some(e=>e in s))return{json:e,buffers:t,images:{}};const r=JSON.parse(JSON.stringify(e)),o=t.slice(),n={},i=(e,t,s)=>(o.push(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),(r.bufferViews||(r.bufferViews=[])).push({buffer:o.length-1,byteLength:e.byteLength}),(r.accessors||(r.accessors=[])).push({bufferView:r.bufferViews.length-1,componentType:e instanceof Uint32Array?5125:5126,count:s,type:t}),r.accessors.length-1),a=e=>{const t=r.bufferViews[e];return o[t.buffer].subarray(t.byteOffset||0,(t.byteOffset||0)+t.byteLength)};for(const e of r.meshes||[])for(const t of e.primitives||[]){const e=t.extensions?.KHR_draco_mesh_compression;if(!e)continue;const r=d(await c("draco","KHR_draco_mesh_compression"),a(e.bufferView),e.attributes);for(const[e,o]of Object.entries(r.attributes))t.attributes[e]=i(o.data,["SCALAR","VEC2","VEC3","VEC4"][o.size-1],r.count);t.indices=i(r.indices,"SCALAR",r.indices.length),delete t.extensions.KHR_draco_mesh_compression}for(const e of r.textures||[]){const t=e.extensions?.KHR_texture_basisu?.source;if(void 0===t)continue;const o=await c("ktx2","KHR_texture_basisu"),s=r.images[t],i=void 0!==s.bufferView?a(s.bufferView):new Uint8Array(await(await fetch(s.uri)).arrayBuffer()),{width:d,height:u,data:l}=f(o,i);n[t]="undefined"!=typeof ImageData?new ImageData(new Uint8ClampedArray(l),d,u):{width:d,height:u,data:l},e.source=t,delete e.extensions.KHR_texture_basisu}const u=e=>e?.filter(e=>!(e in s));return r.extensionsRequired=u(r.extensionsRequired),r.extensionsUsed=u(r.extensionsUsed),{json:r,buffers:o,images:n}}const l={id:"gltf-decoders",version:t.RUNTIME_VERSION,requires:["core","gl","format-gltf"],api:{provideGltfDecoder:i,providedDecoders:a,prepareGltf:u,decodeDraco:d,transcodeKtx2:f,DECODER_EXTENSIONS:s}};t.register(l),e.DECODER_EXTENSIONS=s,e.DECODER_HELP=n,e.decodeDraco=d,e.gltfDecoders=l,e.prepareGltf=u,e.provideGltfDecoder=i,e.providedDecoders=a,e.transcodeKtx2=f}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
1
|
+
!function(e,t){"use strict";const r={},o={},s={KHR_draco_mesh_compression:"draco",KHR_texture_basisu:"ktx2"},n={draco:"npm i draco3d — then provideGltfDecoder('draco', () => import('draco3d')) (CDN: https://www.gstatic.com/draco/versioned/decoders/1.5.7/draco_decoder.js)",ktx2:"copy basis_transcoder.js + basis_transcoder.wasm from https://github.com/BinomialLLC/basis_universal (webgl/transcoder/build) — then provideGltfDecoder('ktx2', () => import('/vendor/basis_transcoder.js'))"};function i(e,t){r[e]=t,delete o[e]}const a=()=>Object.keys(r),c=(e,t)=>{const s=r[e];if(!s)throw new Error(`[motionary] gltf-decoders: this file uses ${t}, which needs the official decoder — ${n[e]}`);return o[e]||(o[e]=Promise.resolve(s()).then(async t=>{const r=t?.default??t;if("draco"===e)return r.createDecoderModule?r.createDecoderModule({}):"function"==typeof r?r({}):r;const o="function"==typeof r?await r():r;return o.initializeBasis?.(),o}))};function d(e,t,r){const o=new e.Decoder,s=new e.DecoderBuffer,n=new e.Mesh;try{s.Init(new Int8Array(t.buffer,t.byteOffset,t.byteLength),t.byteLength);const i=o.DecodeBufferToMesh(s,n);if(!i.ok()||!n.ptr)throw new Error("[motionary] gltf-decoders: Draco decode failed — "+i.error_msg());const a=n.num_points(),c=n.num_faces(),d={};for(const[t,s]of Object.entries(r)){const r=o.GetAttributeByUniqueId(n,s),i=r.num_components(),c=a*i*4,f=e._malloc(c);o.GetAttributeDataArrayForAllPoints(n,r,e.DT_FLOAT32,c,f),d[t]={data:new Float32Array(e.HEAPF32.buffer,f,a*i).slice(),size:i},e._free(f)}const f=12*c,u=e._malloc(f);o.GetTrianglesUInt32Array(n,f,u);const l=new Uint32Array(e.HEAPU32.buffer,u,3*c).slice();return e._free(u),{attributes:d,indices:l,count:a}}finally{e.destroy(n),e.destroy(s),e.destroy(o)}}function f(e,t){const r=new e.KTX2File(new Uint8Array(t));try{if(!r.isValid())throw new Error("[motionary] gltf-decoders: not a valid KTX2 file");const t=r.getWidth(),o=r.getHeight();if(!r.startTranscoding())throw new Error("[motionary] gltf-decoders: KTX2 startTranscoding failed");const s=e.transcoder_texture_format?.cTFRGBA32?.value??e.transcoder_texture_format?.cTFRGBA32??13,n=new Uint8Array(r.getImageTranscodedSizeInBytes(0,0,0,s));if(!r.transcodeImage(n,0,0,0,s,0,-1,-1))throw new Error("[motionary] gltf-decoders: KTX2 transcode failed");return{width:t,height:o,data:n}}finally{r.close?.(),r.delete?.()}}async function u(e,t){if(![...e.extensionsUsed||[],...e.extensionsRequired||[]].some(e=>e in s))return{json:e,buffers:t,images:{}};const r=JSON.parse(JSON.stringify(e)),o=t.slice(),n={},i=(e,t,s)=>(o.push(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),(r.bufferViews||(r.bufferViews=[])).push({buffer:o.length-1,byteLength:e.byteLength}),(r.accessors||(r.accessors=[])).push({bufferView:r.bufferViews.length-1,componentType:e instanceof Uint32Array?5125:5126,count:s,type:t}),r.accessors.length-1),a=e=>{const t=r.bufferViews[e];return o[t.buffer].subarray(t.byteOffset||0,(t.byteOffset||0)+t.byteLength)};for(const e of r.meshes||[])for(const t of e.primitives||[]){const e=t.extensions?.KHR_draco_mesh_compression;if(!e)continue;const r=d(await c("draco","KHR_draco_mesh_compression"),a(e.bufferView),e.attributes);for(const[e,o]of Object.entries(r.attributes))t.attributes[e]=i(o.data,["SCALAR","VEC2","VEC3","VEC4"][o.size-1],r.count);t.indices=i(r.indices,"SCALAR",r.indices.length),delete t.extensions.KHR_draco_mesh_compression}for(const e of r.textures||[]){const t=e.extensions?.KHR_texture_basisu?.source;if(void 0===t)continue;const o=await c("ktx2","KHR_texture_basisu"),s=r.images[t],i=void 0!==s.bufferView?a(s.bufferView):new Uint8Array(await(await fetch(s.uri)).arrayBuffer()),{width:d,height:u,data:l}=f(o,i);n[t]="undefined"!=typeof ImageData?new ImageData(new Uint8ClampedArray(l),d,u):{width:d,height:u,data:l},e.source=t,delete e.extensions.KHR_texture_basisu}const u=e=>e?.filter(e=>!(e in s));return r.extensionsRequired=u(r.extensionsRequired),r.extensionsUsed=u(r.extensionsUsed),{json:r,buffers:o,images:n}}const l={id:"gltf-decoders",version:t.RUNTIME_VERSION,tier:"advanced",requires:["core","gl","format-gltf"],api:{provideGltfDecoder:i,providedDecoders:a,prepareGltf:u,decodeDraco:d,transcodeKtx2:f,DECODER_EXTENSIONS:s}};t.register(l),e.DECODER_EXTENSIONS=s,e.DECODER_HELP=n,e.decodeDraco=d,e.gltfDecoders=l,e.prepareGltf=u,e.provideGltfDecoder=i,e.providedDecoders=a,e.transcodeKtx2=f}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/gltf-decoders.iife.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION } from '../chunks/registry-
|
|
1
|
+
import { R as RUNTIME_VERSION } from '../chunks/registry-CorBCE7b.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `motionary/runtime/gltf-decoders` (10.9) — hooks that let
|
|
@@ -144,7 +144,7 @@ async function prepareGltf(json, buffers) {
|
|
|
144
144
|
j.extensionsUsed = strip(j.extensionsUsed);
|
|
145
145
|
return { json: j, buffers: bufs, images };
|
|
146
146
|
}
|
|
147
|
-
const gltfDecoders = { id: 'gltf-decoders', version: RUNTIME_VERSION, requires: ['core', 'gl', 'format-gltf'], api: { provideGltfDecoder, providedDecoders, prepareGltf, decodeDraco, transcodeKtx2, DECODER_EXTENSIONS } };
|
|
147
|
+
const gltfDecoders = { id: 'gltf-decoders', version: RUNTIME_VERSION, tier: 'advanced', requires: ['core', 'gl', 'format-gltf'], api: { provideGltfDecoder, providedDecoders, prepareGltf, decodeDraco, transcodeKtx2, DECODER_EXTENSIONS } };
|
|
148
148
|
|
|
149
149
|
export { DECODER_EXTENSIONS, DECODER_HELP, decodeDraco, gltfDecoders, prepareGltf, provideGltfDecoder, providedDecoders, transcodeKtx2 };
|
|
150
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
150
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/gltf-decoders.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
3
|
+
var registry = require('../chunks/registry-VITvgTNc.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `motionary/runtime/lottie-state` (10.9) — dotLottie **themes** (slots) and a
|
|
@@ -235,7 +235,7 @@ function createStateMachine(def, hooks = {}) {
|
|
|
235
235
|
run(cur.entryActions);
|
|
236
236
|
return sm;
|
|
237
237
|
}
|
|
238
|
-
const lottieState = { id: 'lottie-state', version: registry.RUNTIME_VERSION, requires: ['core', 'vector'], api: { applyTheme, ruleProp, createStateMachine, inspectStateMachine, compare } };
|
|
238
|
+
const lottieState = { id: 'lottie-state', version: registry.RUNTIME_VERSION, tier: 'standard', requires: ['core', 'vector'], api: { applyTheme, ruleProp, createStateMachine, inspectStateMachine, compare } };
|
|
239
239
|
|
|
240
240
|
exports.applyTheme = applyTheme;
|
|
241
241
|
exports.compare = compare;
|
|
@@ -243,4 +243,4 @@ exports.createStateMachine = createStateMachine;
|
|
|
243
243
|
exports.inspectStateMachine = inspectStateMachine;
|
|
244
244
|
exports.lottieState = lottieState;
|
|
245
245
|
exports.ruleProp = ruleProp;
|
|
246
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
246
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/lottie-state.cjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"use strict";const n=e=>JSON.parse(JSON.stringify(e));function a(e){return"Text"===e.type?null:e.keyframes?.length?{a:1,k:e.keyframes.map((t,n)=>{return{t:t.frame,s:(a=t.value,Array.isArray(a)?a:[a]),...t.hold?{h:1}:{},...n<e.keyframes.length-1?{o:t.outTangent||{x:[0],y:[0]},i:e.keyframes[n+1].inTangent||{x:[1],y:[1]}}:{}};var a}),...e.expression?{x:e.expression}:{}}:{a:0,k:"Scalar"===e.type&&Array.isArray(e.value)?e.value[0]:e.value,...e.expression?{x:e.expression}:{}}}function r(e,t,r){const s=n(e),o={};for(const[e,t]of Object.entries(s.slots||{}))o[e]=t?.p??t;const i={};for(const e of t?.rules||[])e.animations?.length&&r&&!e.animations.includes(r)||("Text"===e.type?i[e.id]=e.value:"Image"!==e.type&&(o[e.id]=a(e)));const c=e=>{if(e&&"object"==typeof e){if(Array.isArray(e))return e.forEach(c);if("string"==typeof e.sid)if(void 0!==i[e.sid]&&e.k?.[0]?.s)for(const t of e.k)t.s={...t.s,..."string"==typeof i[e.sid]?{t:i[e.sid]}:i[e.sid]};else if(o[e.sid]){const t=o[e.sid];delete e.a,delete e.k,delete e.x,Object.assign(e,n(t))}for(const t in e)"slots"!==t&&c(e[t])}};return c(s.layers),(s.assets||[]).forEach(e=>c(e.layers)),s}const s=["Fire","SetNumeric","SetString","SetBoolean","Toggle","Increment","Decrement","Reset","SetTheme","SetFrame","SetProgress","FireCustomEvent"],o=["PointerDown","PointerUp","PointerEnter","PointerExit","PointerMove","Click","OnComplete","OnLoopComplete"];function i(e){const t=new Set;e?.states?.length||t.add("no states");for(const n of e?.states||[]){n.type&&!["PlaybackState","GlobalState"].includes(n.type)&&t.add(`state type ${n.type}`);for(const e of[...n.entryActions||[],...n.exitActions||[]])s.includes(e.type)||t.add(`action ${e.type}`)}for(const n of e?.interactions||[]){o.includes(n.type)||t.add(`interaction ${n.type}`);for(const e of n.actions||[])s.includes(e.type)||t.add(`action ${e.type}`)}return[...t]}function c(e,t="Equal",n){switch(t){case"NotEqual":return e!==n;case"GreaterThan":return e>n;case"GreaterThanOrEqual":return e>=n;case"LessThan":return e<n;case"LessThanOrEqual":return e<=n;default:return e===n}}function l(e,t={}){const n=new Map(e.states.map(e=>[e.name,e])),a=()=>Object.fromEntries((e.inputs||[]).filter(e=>"Event"!==e.type).map(e=>[e.name,e.value??("Numeric"===e.type?0:"Boolean"!==e.type&&"")]));let r=a(),s=n.get(e.initial)||e.states[0],o=null;const i=e.states.filter(e=>"GlobalState"===e.type),l=e=>"Event"===e.type?o===e.inputName:c(r[e.inputName],e.conditionType,e.compareTo),u=n=>{for(const a of n||[]){const n=a.inputName||"";switch(a.type){case"Fire":y(n);break;case"SetNumeric":case"SetString":case"SetBoolean":d(n,a.value);break;case"Toggle":d(n,!r[n]);break;case"Increment":d(n,(r[n]||0)+(a.value??1));break;case"Decrement":d(n,(r[n]||0)-(a.value??1));break;case"Reset":d(n,(e.inputs||[]).find(e=>e.name===n)?.value);break;case"SetTheme":t.onTheme?.(a.themeId||a.value);break;case"SetFrame":t.onFrame?.(Number(a.value)||0);break;case"SetProgress":t.onProgress?.(Math.min(1,Math.max(0,Number(a.value)||0)));break;case"FireCustomEvent":t.onCustomEvent?.(String(a.value??n))}}};let f=0;const m=e=>{const n=s;u(n.exitActions),s=e,t.onState?.(e,n),u(e.entryActions)},p=()=>{if(!(f>16)){f++;for(const t of(t=>[...t.transitions||[],...(e.transitions||[]).filter(e=>e.fromState===t.name||"*"===e.fromState||void 0===e.fromState),...i.flatMap(e=>e===t?[]:e.transitions||[])])(s)){const e=n.get(t.toState);if(e&&e!==s&&((t.guards||[]).every(l)&&(t.guards?.length||null===o))){o=null,m(e),p();break}}f--}};function y(e){o=e,p(),o=null}function d(e,t){r={...r,[e]:t},p()}const S={get state(){return s},get inputs(){return r},fire:y,set:d,interact(t,n){for(const a of e.interactions||[])a.type===t&&(a.layerName&&void 0!==n&&a.layerName!==n||a.stateName&&a.stateName!==s.name||u(a.actions))},reset(){r=a(),m(n.get(e.initial)||e.states[0])}};return t.onState?.(s,null),u(s.entryActions),S}const u={id:"lottie-state",version:t.RUNTIME_VERSION,requires:["core","vector"],api:{applyTheme:r,ruleProp:a,createStateMachine:l,inspectStateMachine:i,compare:c}};t.register(u),e.applyTheme=r,e.compare=c,e.createStateMachine=l,e.inspectStateMachine=i,e.lottieState=u,e.ruleProp=a}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
1
|
+
!function(e,t){"use strict";const n=e=>JSON.parse(JSON.stringify(e));function a(e){return"Text"===e.type?null:e.keyframes?.length?{a:1,k:e.keyframes.map((t,n)=>{return{t:t.frame,s:(a=t.value,Array.isArray(a)?a:[a]),...t.hold?{h:1}:{},...n<e.keyframes.length-1?{o:t.outTangent||{x:[0],y:[0]},i:e.keyframes[n+1].inTangent||{x:[1],y:[1]}}:{}};var a}),...e.expression?{x:e.expression}:{}}:{a:0,k:"Scalar"===e.type&&Array.isArray(e.value)?e.value[0]:e.value,...e.expression?{x:e.expression}:{}}}function r(e,t,r){const s=n(e),o={};for(const[e,t]of Object.entries(s.slots||{}))o[e]=t?.p??t;const i={};for(const e of t?.rules||[])e.animations?.length&&r&&!e.animations.includes(r)||("Text"===e.type?i[e.id]=e.value:"Image"!==e.type&&(o[e.id]=a(e)));const c=e=>{if(e&&"object"==typeof e){if(Array.isArray(e))return e.forEach(c);if("string"==typeof e.sid)if(void 0!==i[e.sid]&&e.k?.[0]?.s)for(const t of e.k)t.s={...t.s,..."string"==typeof i[e.sid]?{t:i[e.sid]}:i[e.sid]};else if(o[e.sid]){const t=o[e.sid];delete e.a,delete e.k,delete e.x,Object.assign(e,n(t))}for(const t in e)"slots"!==t&&c(e[t])}};return c(s.layers),(s.assets||[]).forEach(e=>c(e.layers)),s}const s=["Fire","SetNumeric","SetString","SetBoolean","Toggle","Increment","Decrement","Reset","SetTheme","SetFrame","SetProgress","FireCustomEvent"],o=["PointerDown","PointerUp","PointerEnter","PointerExit","PointerMove","Click","OnComplete","OnLoopComplete"];function i(e){const t=new Set;e?.states?.length||t.add("no states");for(const n of e?.states||[]){n.type&&!["PlaybackState","GlobalState"].includes(n.type)&&t.add(`state type ${n.type}`);for(const e of[...n.entryActions||[],...n.exitActions||[]])s.includes(e.type)||t.add(`action ${e.type}`)}for(const n of e?.interactions||[]){o.includes(n.type)||t.add(`interaction ${n.type}`);for(const e of n.actions||[])s.includes(e.type)||t.add(`action ${e.type}`)}return[...t]}function c(e,t="Equal",n){switch(t){case"NotEqual":return e!==n;case"GreaterThan":return e>n;case"GreaterThanOrEqual":return e>=n;case"LessThan":return e<n;case"LessThanOrEqual":return e<=n;default:return e===n}}function l(e,t={}){const n=new Map(e.states.map(e=>[e.name,e])),a=()=>Object.fromEntries((e.inputs||[]).filter(e=>"Event"!==e.type).map(e=>[e.name,e.value??("Numeric"===e.type?0:"Boolean"!==e.type&&"")]));let r=a(),s=n.get(e.initial)||e.states[0],o=null;const i=e.states.filter(e=>"GlobalState"===e.type),l=e=>"Event"===e.type?o===e.inputName:c(r[e.inputName],e.conditionType,e.compareTo),u=n=>{for(const a of n||[]){const n=a.inputName||"";switch(a.type){case"Fire":y(n);break;case"SetNumeric":case"SetString":case"SetBoolean":d(n,a.value);break;case"Toggle":d(n,!r[n]);break;case"Increment":d(n,(r[n]||0)+(a.value??1));break;case"Decrement":d(n,(r[n]||0)-(a.value??1));break;case"Reset":d(n,(e.inputs||[]).find(e=>e.name===n)?.value);break;case"SetTheme":t.onTheme?.(a.themeId||a.value);break;case"SetFrame":t.onFrame?.(Number(a.value)||0);break;case"SetProgress":t.onProgress?.(Math.min(1,Math.max(0,Number(a.value)||0)));break;case"FireCustomEvent":t.onCustomEvent?.(String(a.value??n))}}};let f=0;const m=e=>{const n=s;u(n.exitActions),s=e,t.onState?.(e,n),u(e.entryActions)},p=()=>{if(!(f>16)){f++;for(const t of(t=>[...t.transitions||[],...(e.transitions||[]).filter(e=>e.fromState===t.name||"*"===e.fromState||void 0===e.fromState),...i.flatMap(e=>e===t?[]:e.transitions||[])])(s)){const e=n.get(t.toState);if(e&&e!==s&&((t.guards||[]).every(l)&&(t.guards?.length||null===o))){o=null,m(e),p();break}}f--}};function y(e){o=e,p(),o=null}function d(e,t){r={...r,[e]:t},p()}const S={get state(){return s},get inputs(){return r},fire:y,set:d,interact(t,n){for(const a of e.interactions||[])a.type===t&&(a.layerName&&void 0!==n&&a.layerName!==n||a.stateName&&a.stateName!==s.name||u(a.actions))},reset(){r=a(),m(n.get(e.initial)||e.states[0])}};return t.onState?.(s,null),u(s.entryActions),S}const u={id:"lottie-state",version:t.RUNTIME_VERSION,tier:"standard",requires:["core","vector"],api:{applyTheme:r,ruleProp:a,createStateMachine:l,inspectStateMachine:i,compare:c}};t.register(u),e.applyTheme=r,e.compare=c,e.createStateMachine=l,e.inspectStateMachine=i,e.lottieState=u,e.ruleProp=a}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/lottie-state.iife.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION } from '../chunks/registry-
|
|
1
|
+
import { R as RUNTIME_VERSION } from '../chunks/registry-CorBCE7b.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `motionary/runtime/lottie-state` (10.9) — dotLottie **themes** (slots) and a
|
|
@@ -233,7 +233,7 @@ function createStateMachine(def, hooks = {}) {
|
|
|
233
233
|
run(cur.entryActions);
|
|
234
234
|
return sm;
|
|
235
235
|
}
|
|
236
|
-
const lottieState = { id: 'lottie-state', version: RUNTIME_VERSION, requires: ['core', 'vector'], api: { applyTheme, ruleProp, createStateMachine, inspectStateMachine, compare } };
|
|
236
|
+
const lottieState = { id: 'lottie-state', version: RUNTIME_VERSION, tier: 'standard', requires: ['core', 'vector'], api: { applyTheme, ruleProp, createStateMachine, inspectStateMachine, compare } };
|
|
237
237
|
|
|
238
238
|
export { applyTheme, compare, createStateMachine, inspectStateMachine, lottieState, ruleProp };
|
|
239
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
239
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/lottie-state.js.map
|
package/dist/runtime/physics.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
3
|
+
var registry = require('../chunks/registry-VITvgTNc.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `motionary/runtime/physics` (10.7) — a small 2D rigid-body engine written
|
|
@@ -727,7 +727,7 @@ function dragConstraint(world, body, x, y, stiffness = 0.6) {
|
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
729
|
/** The module object for `use(physics)`. */
|
|
730
|
-
const physics = { id: 'physics', version: registry.RUNTIME_VERSION, requires: ['core'], api: { createWorld, World, Body, Constraint, collide, dragConstraint } };
|
|
730
|
+
const physics = { id: 'physics', version: registry.RUNTIME_VERSION, tier: 'advanced', requires: ['core'], api: { createWorld, World, Body, Constraint, collide, dragConstraint } };
|
|
731
731
|
|
|
732
732
|
exports.Body = Body;
|
|
733
733
|
exports.Constraint = Constraint;
|
|
@@ -736,4 +736,4 @@ exports.collide = collide;
|
|
|
736
736
|
exports.createWorld = createWorld;
|
|
737
737
|
exports.dragConstraint = dragConstraint;
|
|
738
738
|
exports.physics = physics;
|
|
739
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
739
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/physics.cjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,i){"use strict";const s=(t=0,i=0)=>({x:t,y:i}),n=(t,i)=>t.x*i.x+t.y*i.y,e=(t,i)=>t.x*i.y-t.y*i.x,o=(t,i)=>s(t.x-i.x,t.y-i.y),a=(t,i)=>s(t.x+i.x,t.y+i.y),r=(t,i)=>s(t.x*i,t.y*i),h=t=>Math.hypot(t.x,t.y),l=(t,i)=>s(-t*i.y,t*i.x),c=(t,i,n)=>s(t.x*i-t.y*n,t.x*n+t.y*i);let p=1;class f{constructor(t={}){this.id=p++,this.force=s(),this.torque=0,this.radius=0,this.verts=[],this.normals=[],this.mass=0,this.invMass=0,this.inertia=0,this.invInertia=0,this.sleeping=!1,this.sleepTime=0,this.aabb={minX:0,minY:0,maxX:0,maxY:0},this.wv=[],this.wvAngle=NaN,this.wvPos=s(NaN,NaN),this.shape=t.shape||(t.vertices?"polygon":null!=t.radius&&null==t.width?"circle":"box"),this.type=t.type||"dynamic",this.label=t.label||this.shape,this.position=s(t.x||0,t.y||0),this.velocity=s(t.vx||0,t.vy||0),this.angle=t.angle||0,this.angularVelocity=t.angularVelocity||0,this.restitution=t.restitution??.2,this.friction=t.friction??.4,this.damping=t.damping??0,this.angularDamping=t.angularDamping??.01,this.sensor=!!t.sensor,this.category=t.category??1,this.mask=t.mask??4294967295,this.data=t.data;const i=t.density??.001;let a=0,l=0;if("circle"===this.shape)this.radius=t.radius??20,a=Math.PI*this.radius**2,l=.5*this.radius**2;else{const i="box"===this.shape?(c=t.width??40,f=t.height??40,[s(-c/2,-f/2),s(c/2,-f/2),s(c/2,f/2),s(-c/2,f/2)]):function(t){const i=t.slice().sort((t,i)=>t.x-i.x||t.y-i.y);if(i.length<3)return i;const s=[],n=[],a=(t,i,s)=>e(o(i,t),o(s,t));for(const t of i){for(;s.length>=2&&a(s[s.length-2],s[s.length-1],t)<=0;)s.pop();s.push(t)}for(let t=i.length-1;t>=0;t--){const s=i[t];for(;n.length>=2&&a(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return s.slice(0,-1).concat(n.slice(0,-1))}((t.vertices||[]).map(([t,i])=>s(t,i)));if(i.length<3)throw new Error("[motionary] physics: a polygon needs at least 3 non-collinear vertices");const{c:p,a:u,i:y}=function(t){let i=0,o=0,a=0,r=0;for(let s=0;s<t.length;s++){const h=t[s],l=t[(s+1)%t.length],c=e(h,l);i+=c,o+=(h.x+l.x)*c,a+=(h.y+l.y)*c,r+=c*(n(h,h)+n(h,l)+n(l,l))}i/=2;const h=s(o/(6*i),a/(6*i)),l=r/12,c=l/i-n(h,h);return{a:Math.abs(i),c:h,i:Math.abs(c)}}(i);this.verts=i.map(t=>o(t,p)),a=u,l=y,this.radius=Math.max(...this.verts.map(h)),this.normals=this.verts.map((t,i)=>{const n=this.verts[(i+1)%this.verts.length],e=o(n,t),a=s(e.y,-e.x);return r(a,1/h(a))})}var c,f;"dynamic"===this.type&&(this.mass=t.mass??i*a,this.invMass=this.mass>0?1/this.mass:0,this.inertia=t.fixedRotation?1/0:this.mass*l,this.invInertia=t.fixedRotation||!this.inertia?0:1/this.inertia)}get isStatic(){return"static"===this.type}worldVerts(){if(this.wvAngle!==this.angle||this.wvPos.x!==this.position.x||this.wvPos.y!==this.position.y){const t=Math.cos(this.angle),i=Math.sin(this.angle);this.wv=this.verts.map(s=>a(c(s,t,i),this.position)),this.wvAngle=this.angle,this.wvPos=s(this.position.x,this.position.y)}return this.wv}worldNormal(t){return c(this.normals[t],Math.cos(this.angle),Math.sin(this.angle))}updateAabb(){if("circle"===this.shape){const t=this.radius,i=this.position;return void(this.aabb={minX:i.x-t,minY:i.y-t,maxX:i.x+t,maxY:i.y+t})}let t=1/0,i=1/0,s=-1/0,n=-1/0;for(const e of this.worldVerts())e.x<t&&(t=e.x),e.y<i&&(i=e.y),e.x>s&&(s=e.x),e.y>n&&(n=e.y);this.aabb={minX:t,minY:i,maxX:s,maxY:n}}applyImpulse(t,i){"dynamic"===this.type&&(this.wake(),this.velocity=a(this.velocity,r(t,this.invMass)),i&&(this.angularVelocity+=e(o(i,this.position),t)*this.invInertia))}applyForce(t,i){"dynamic"===this.type&&(this.wake(),this.force=a(this.force,t),i&&(this.torque+=e(o(i,this.position),t)))}wake(){this.sleeping=!1,this.sleepTime=0}contains(t,i){const e=s(t,i);if("circle"===this.shape)return h(o(e,this.position))<=this.radius;const a=this.worldVerts();for(let t=0;t<a.length;t++)if(n(this.worldNormal(t),o(e,a[t]))>0)return!1;return!0}}const u=t=>"dynamic"!==t.type||t.sleeping?0:t.invMass,y=t=>"dynamic"!==t.type||t.sleeping?0:t.invInertia,d=t=>n(t.velocity,t.velocity)+(t.angularVelocity*t.radius)**2;function m(t,i){const s=t.worldVerts();let e=-1/0,l=0;for(let a=0;a<s.length;a++){const r=n(t.worldNormal(a),o(i.position,s[a]));if(r>i.radius)return null;r>e&&(e=r,l=a)}if(e<1e-9){const s=t.worldNormal(l);return{a:t,b:i,normal:s,contacts:[{point:o(i.position,r(s,i.radius)),depth:i.radius-e}]}}let c=s[0],p=1/0;for(let t=0;t<s.length;t++){const e=s[t],l=s[(t+1)%s.length],f=o(l,e),u=Math.max(0,Math.min(1,n(o(i.position,e),f)/n(f,f))),y=a(e,r(f,u)),d=h(o(i.position,y));d<p&&(p=d,c=y)}if(p>=i.radius)return null;const f=p>1e-9?r(o(i.position,c),1/p):t.worldNormal(l);return{a:t,b:i,normal:f,contacts:[{point:c,depth:i.radius-p}]}}function g(t,i){const s=t.worldVerts(),e=i.worldVerts();let a=-1/0,r=0;for(let i=0;i<s.length;i++){const h=t.worldNormal(i);let l=1/0;for(const t of e)l=Math.min(l,n(h,o(t,s[i])));l>a&&(a=l,r=i)}return{s:a,i:r}}function b(t,i){if("circle"===t.shape&&"circle"===i.shape)return function(t,i){const n=o(i.position,t.position),e=h(n),l=t.radius+i.radius;if(e>=l)return null;const c=e>1e-9?r(n,1/e):s(0,1);return{a:t,b:i,normal:c,contacts:[{point:a(t.position,r(c,t.radius-(l-e)/2)),depth:l-e}]}}(t,i);if("circle"!==t.shape&&"circle"===i.shape)return m(t,i);if("circle"===t.shape&&"circle"!==i.shape){const s=m(i,t);return s&&{a:t,b:i,normal:r(s.normal,-1),contacts:s.contacts}}return function(t,i){const s=g(t,i);if(s.s>0)return null;const e=g(i,t);if(e.s>0)return null;let l=t,c=i,p=s.i,f=!1;e.s>.95*s.s+.01&&(l=i,c=t,p=e.i,f=!0);const u=l.worldVerts(),y=c.worldVerts(),d=l.worldNormal(p);let m=0,b=1/0;for(let t=0;t<y.length;t++){const i=n(c.worldNormal(t),d);i<b&&(b=i,m=t)}let v=[y[m],y[(m+1)%y.length]];const w=u[p],x=u[(p+1)%u.length],M=r(o(x,w),1/h(o(x,w))),V=(t,i,s)=>{const e=[],h=n(i,t[0])-s,l=n(i,t[1])-s;return h<=0&&e.push(t[0]),l<=0&&e.push(t[1]),h*l<0&&e.push(a(t[0],r(o(t[1],t[0]),h/(h-l)))),e};if(v=V(v,r(M,-1),-n(M,w)),v.length<2)return null;if(v=V(v,M,n(M,x)),v.length<2)return null;const k=[];for(const t of v){const i=n(d,o(t,w));i<=1&&k.push({point:t,depth:-i})}return k.some(t=>t.depth>=0)?f?{a:t,b:i,normal:r(d,-1),contacts:k}:{a:t,b:i,normal:d,contacts:k}:null}(t,i)}class v{constructor(t){this.type=t.type,this.a=t.a,this.b=t.b||null,this.anchorA=s(...t.anchorA||[0,0]),this.anchorB=s(...t.anchorB||[0,0]),this.point=s(...t.point||[t.a.position.x,t.a.position.y]),this.stiffness=t.stiffness??1,this.damping=t.damping??.1,this.label=t.label||t.type,this.length=t.length??h(o(this.worldB(),this.worldA()))}worldA(){return a(this.a.position,c(this.anchorA,Math.cos(this.a.angle),Math.sin(this.a.angle)))}worldB(){return this.b?a(this.b.position,c(this.anchorB,Math.cos(this.b.angle),Math.sin(this.b.angle))):this.point}solve(t){const i=this.a,c=this.b,p=this.worldA(),f=this.worldB(),u=o(f,p),y=h(u);if(y<1e-9&&this.length<1e-9&&"distance"===this.type)return;const d=y>1e-9?r(u,1/y):s(1,0),m=o(p,i.position),g=c?o(f,c.position):s(),b=a(i.velocity,l(i.angularVelocity,m)),v=c?a(c.velocity,l(c.angularVelocity,g)):s(),w=n(o(v,b),d),x=y-this.length,M=i.invMass+(c?c.invMass:0)+e(m,d)**2*i.invInertia+(c?e(g,d)**2*c.invInertia:0);if(M<=0)return;const V=this.stiffness>=1?.2:.2*this.stiffness;let k=-(w*(this.stiffness>=1?1:this.damping+this.stiffness)+V/t*x)/M;this.stiffness<1&&(k*=this.stiffness);const N=r(d,k);i.applyImpulse(r(N,-1),p),c?.applyImpulse(N,f)}}class w{constructor(t={}){this.bodies=[],this.constraints=[],this.contacts=[],this.time=0,this.steps=0,this.acc=0,this.warm=new Map,this.listeners=new Set,this.stop=null,this.gravity=s(...t.gravity||[0,980]),this.iterations=t.iterations??10,this.fixedStep=t.step??1/60,this.sleeping=t.sleeping??!0}add(...t){for(const i of t)i instanceof f?this.bodies.push(i):this.constraints.push(i);return t[0]}body(t){return this.add(new f(t))}constraint(t){return this.add(new v(t))}remove(...t){for(const i of t)i instanceof f?(this.bodies=this.bodies.filter(t=>t!==i),this.constraints=this.constraints.filter(t=>t.a!==i&&t.b!==i)):this.constraints=this.constraints.filter(t=>t!==i)}clear(){this.bodies=[],this.constraints=[],this.contacts=[]}bounds(t,i,s=50,n={}){const e=[new f({type:"static",x:t/2,y:i+s/2,width:t+2*s,height:s,label:"floor"}),new f({type:"static",x:-s/2,y:i/2,width:s,height:i+2*s,label:"wall-left"}),new f({type:"static",x:t+s/2,y:i/2,width:s,height:i+2*s,label:"wall-right"})];!1!==n.top&&e.push(new f({type:"static",x:t/2,y:-s/2,width:t+2*s,height:s,label:"ceiling"}));for(const t of e)this.add(t);return e}onCollision(t){return this.listeners.add(t),()=>this.listeners.delete(t)}query(t,i){return this.bodies.filter(s=>s.contains(t,i)).reverse()}update(t){this.acc=Math.min(this.acc+t,8*this.fixedStep);let i=0;for(;this.acc>=this.fixedStep;)this.step(this.fixedStep),this.acc-=this.fixedStep,i++;return i}step(t=this.fixedStep){const i=this.bodies;for(const s of i)"dynamic"!==s.type||s.sleeping||(s.velocity=a(s.velocity,r(a(this.gravity,r(s.force,s.invMass)),t)),s.angularVelocity+=s.torque*s.invInertia*t,s.damping&&(s.velocity=r(s.velocity,Math.max(0,1-s.damping*t))),s.angularDamping&&(s.angularVelocity*=Math.max(0,1-s.angularDamping*t)));for(const t of i)t.updateAabb();const n=i.slice().sort((t,i)=>t.aabb.minX-i.aabb.minX),e=[];for(let t=0;t<n.length;t++){const i=n[t];for(let s=t+1;s<n.length;s++){const t=n[s];if(t.aabb.minX>i.aabb.maxX)break;if(t.aabb.minY>i.aabb.maxY||t.aabb.maxY<i.aabb.minY)continue;if("dynamic"!==i.type&&"dynamic"!==t.type)continue;if(!(i.category&t.mask&&t.category&i.mask))continue;if((i.sleeping||"dynamic"!==i.type)&&(t.sleeping||"dynamic"!==t.type))continue;const o=i.id<t.id?b(i,t):b(t,i);o&&e.push(o)}}this.contacts=e;const o=e.filter(t=>!t.a.sensor&&!t.b.sensor);for(const t of o)t.a.sleeping&&!t.b.sleeping&&"dynamic"===t.b.type&&d(t.b)>144&&t.a.wake(),t.b.sleeping&&!t.a.sleeping&&"dynamic"===t.a.type&&d(t.a)>144&&t.b.wake();const h=t=>t.a.id+":"+t.b.id;for(const i of o)x(i,t,this.warm.get(h(i)));for(let i=0;i<this.iterations;i++){for(const t of o)M(t);for(const i of this.constraints)i.solve(t)}this.warm=new Map(o.map(t=>[h(t),{pts:t.contacts.map(t=>t.point),pn:t.contacts.map(t=>t.pn),pt:t.contacts.map(t=>t.pt)}]));for(const n of i)"static"===n.type||n.sleeping||(n.position=a(n.position,r(n.velocity,t)),n.angle+=n.angularVelocity*t,n.force=s(),n.torque=0);if(this.sleeping){const n=new Map,e=t=>{let i=t;for(;n.get(i)!==i;)i=n.get(i);return n.set(t,i),i},a=t=>!!t&&"dynamic"===t.type;for(const t of i)a(t)&&n.set(t,t);const r=(t,i)=>{a(t)&&a(i)&&n.set(e(t),e(i))};for(const t of o)r(t.a,t.b);for(const t of this.constraints)r(t.a,t.b);const h=new Set(this.constraints.filter(t=>"drag"===t.label).map(t=>t.a));for(const i of n.keys())i.sleeping||(d(i)<36&&!h.has(i)?i.sleepTime+=t:i.sleepTime=0);const l=new Map;for(const t of n.keys()){const i=e(t);l.set(i,[...l.get(i)||[],t])}for(const t of l.values())if(t.some(t=>!t.sleeping&&t.sleepTime<=.6)){if(t.some(t=>t.sleeping)&&t.some(t=>!t.sleeping&&0===t.sleepTime))for(const i of t)i.wake()}else for(const i of t)i.sleeping=!0,i.velocity=s(),i.angularVelocity=0}if(this.time+=t,this.steps++,this.listeners.size)for(const t of e)for(const i of this.listeners)i(t)}run(){if(this.stop)return this.stop;const t=i.requireModule("core","motionary/runtime/physics").getTicker().add((t,i)=>this.update(Math.min(i,100)/1e3));return this.stop=()=>{t(),this.stop=null},this.stop}get running(){return!!this.stop}energy(){return this.bodies.reduce((t,i)=>t+("dynamic"===i.type?.5*i.mass*n(i.velocity,i.velocity)+.5*(isFinite(i.inertia)?i.inertia:0)*i.angularVelocity**2:0),0)}}function x(t,i,c){const{a:p,b:f,normal:d}=t,m=s(d.y,-d.x),g=Math.max(p.restitution,f.restitution);for(const s of t.contacts){s.ra=o(s.point,p.position),s.rb=o(s.point,f.position);const t=u(p)+u(f)+e(s.ra,d)**2*y(p)+e(s.rb,d)**2*y(f),r=u(p)+u(f)+e(s.ra,m)**2*y(p)+e(s.rb,m)**2*y(f);s.mn=t>0?1/t:0,s.mt=r>0?1/r:0;const h=o(a(f.velocity,l(f.angularVelocity,s.rb)),a(p.velocity,l(p.angularVelocity,s.ra))),c=n(h,d);s.bias=s.depth<0?s.depth/i:Math.max(.2/i*Math.max(0,s.depth-.25),c<-150?-g*c:0),s.pn=0,s.pt=0}c&&t.contacts.forEach(t=>{if(t.depth<0)return;let i=-1,s=2;c.pts.forEach((n,e)=>{const a=h(o(t.point,n));a<s&&(s=a,i=e)}),i<0||(t.pn=c.pn[i],t.pt=c.pt[i],V(p,f,a(r(d,t.pn),r(m,t.pt)),t.ra,t.rb))})}function M(t){const{a:i,b:h,normal:c}=t,p=s(c.y,-c.x),f=Math.sqrt(i.friction*h.friction),d=t.contacts,m=t=>o(a(h.velocity,l(h.angularVelocity,t.rb)),a(i.velocity,l(i.angularVelocity,t.ra)));for(const t of d){let s=-t.mt*n(m(t),p);const e=t.pt,o=f*t.pn;t.pt=Math.max(-o,Math.min(o,e+s)),s=t.pt-e,V(i,h,r(p,s),t.ra,t.rb)}if(2===d.length){const[t,s]=d,o=u,a=y,l=e(t.ra,c),p=e(t.rb,c),f=e(s.ra,c),g=e(s.rb,c),b=o(i)+o(h)+a(i)*l*l+a(h)*p*p,v=o(i)+o(h)+a(i)*f*f+a(h)*g*g,w=o(i)+o(h)+a(i)*l*f+a(h)*p*g,x=b*v-w*w;if(b*b<1e3*x){const e=t.pn,o=s.pn,a=n(m(t),c)-t.bias-(b*e+w*o),l=n(m(s),c)-s.bias-(w*e+v*o);let p=0,f=0;if((()=>(p=-(v*a-w*l)/x,f=-(b*l-w*a)/x,p>=0&&f>=0||(p=-a/b,f=0,p>=0&&w*p+l>=0||(p=0,f=-l/v,f>=0&&w*f+a>=0||(p=f=0,a>=0&&l>=0)))))())return V(i,h,r(c,p-e),t.ra,t.rb),V(i,h,r(c,f-o),s.ra,s.rb),t.pn=p,void(s.pn=f)}}for(const t of d){let s=t.mn*(-n(m(t),c)+t.bias);const e=t.pn;t.pn=Math.max(e+s,0),s=t.pn-e,V(i,h,r(c,s),t.ra,t.rb)}}function V(t,i,s,n,h){"dynamic"!==t.type||t.sleeping||(t.velocity=o(t.velocity,r(s,t.invMass)),t.angularVelocity-=e(n,s)*t.invInertia),"dynamic"!==i.type||i.sleeping||(i.velocity=a(i.velocity,r(s,i.invMass)),i.angularVelocity+=e(h,s)*i.invInertia)}function k(t={}){return new w(t)}function N(t,i,n,e,a=.6){const r=i.angle,h=c(o(s(n,e),i.position),Math.cos(-r),Math.sin(-r)),l=t.constraint({type:"pin",a:i,anchorA:[h.x,h.y],point:[n,e],length:0,stiffness:a,damping:.3,label:"drag"});return i.wake(),{constraint:l,move(t,n){l.point=s(t,n),i.wake()},release(){t.remove(l)}}}const I={id:"physics",version:i.RUNTIME_VERSION,requires:["core"],api:{createWorld:k,World:w,Body:f,Constraint:v,collide:b,dragConstraint:N}};i.register(I),t.Body=f,t.Constraint=v,t.World=w,t.collide=b,t.createWorld=k,t.dragConstraint=N,t.physics=I}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
1
|
+
!function(t,i){"use strict";const s=(t=0,i=0)=>({x:t,y:i}),n=(t,i)=>t.x*i.x+t.y*i.y,e=(t,i)=>t.x*i.y-t.y*i.x,o=(t,i)=>s(t.x-i.x,t.y-i.y),a=(t,i)=>s(t.x+i.x,t.y+i.y),r=(t,i)=>s(t.x*i,t.y*i),h=t=>Math.hypot(t.x,t.y),l=(t,i)=>s(-t*i.y,t*i.x),c=(t,i,n)=>s(t.x*i-t.y*n,t.x*n+t.y*i);let p=1;class f{constructor(t={}){this.id=p++,this.force=s(),this.torque=0,this.radius=0,this.verts=[],this.normals=[],this.mass=0,this.invMass=0,this.inertia=0,this.invInertia=0,this.sleeping=!1,this.sleepTime=0,this.aabb={minX:0,minY:0,maxX:0,maxY:0},this.wv=[],this.wvAngle=NaN,this.wvPos=s(NaN,NaN),this.shape=t.shape||(t.vertices?"polygon":null!=t.radius&&null==t.width?"circle":"box"),this.type=t.type||"dynamic",this.label=t.label||this.shape,this.position=s(t.x||0,t.y||0),this.velocity=s(t.vx||0,t.vy||0),this.angle=t.angle||0,this.angularVelocity=t.angularVelocity||0,this.restitution=t.restitution??.2,this.friction=t.friction??.4,this.damping=t.damping??0,this.angularDamping=t.angularDamping??.01,this.sensor=!!t.sensor,this.category=t.category??1,this.mask=t.mask??4294967295,this.data=t.data;const i=t.density??.001;let a=0,l=0;if("circle"===this.shape)this.radius=t.radius??20,a=Math.PI*this.radius**2,l=.5*this.radius**2;else{const i="box"===this.shape?(c=t.width??40,f=t.height??40,[s(-c/2,-f/2),s(c/2,-f/2),s(c/2,f/2),s(-c/2,f/2)]):function(t){const i=t.slice().sort((t,i)=>t.x-i.x||t.y-i.y);if(i.length<3)return i;const s=[],n=[],a=(t,i,s)=>e(o(i,t),o(s,t));for(const t of i){for(;s.length>=2&&a(s[s.length-2],s[s.length-1],t)<=0;)s.pop();s.push(t)}for(let t=i.length-1;t>=0;t--){const s=i[t];for(;n.length>=2&&a(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return s.slice(0,-1).concat(n.slice(0,-1))}((t.vertices||[]).map(([t,i])=>s(t,i)));if(i.length<3)throw new Error("[motionary] physics: a polygon needs at least 3 non-collinear vertices");const{c:p,a:u,i:y}=function(t){let i=0,o=0,a=0,r=0;for(let s=0;s<t.length;s++){const h=t[s],l=t[(s+1)%t.length],c=e(h,l);i+=c,o+=(h.x+l.x)*c,a+=(h.y+l.y)*c,r+=c*(n(h,h)+n(h,l)+n(l,l))}i/=2;const h=s(o/(6*i),a/(6*i)),l=r/12,c=l/i-n(h,h);return{a:Math.abs(i),c:h,i:Math.abs(c)}}(i);this.verts=i.map(t=>o(t,p)),a=u,l=y,this.radius=Math.max(...this.verts.map(h)),this.normals=this.verts.map((t,i)=>{const n=this.verts[(i+1)%this.verts.length],e=o(n,t),a=s(e.y,-e.x);return r(a,1/h(a))})}var c,f;"dynamic"===this.type&&(this.mass=t.mass??i*a,this.invMass=this.mass>0?1/this.mass:0,this.inertia=t.fixedRotation?1/0:this.mass*l,this.invInertia=t.fixedRotation||!this.inertia?0:1/this.inertia)}get isStatic(){return"static"===this.type}worldVerts(){if(this.wvAngle!==this.angle||this.wvPos.x!==this.position.x||this.wvPos.y!==this.position.y){const t=Math.cos(this.angle),i=Math.sin(this.angle);this.wv=this.verts.map(s=>a(c(s,t,i),this.position)),this.wvAngle=this.angle,this.wvPos=s(this.position.x,this.position.y)}return this.wv}worldNormal(t){return c(this.normals[t],Math.cos(this.angle),Math.sin(this.angle))}updateAabb(){if("circle"===this.shape){const t=this.radius,i=this.position;return void(this.aabb={minX:i.x-t,minY:i.y-t,maxX:i.x+t,maxY:i.y+t})}let t=1/0,i=1/0,s=-1/0,n=-1/0;for(const e of this.worldVerts())e.x<t&&(t=e.x),e.y<i&&(i=e.y),e.x>s&&(s=e.x),e.y>n&&(n=e.y);this.aabb={minX:t,minY:i,maxX:s,maxY:n}}applyImpulse(t,i){"dynamic"===this.type&&(this.wake(),this.velocity=a(this.velocity,r(t,this.invMass)),i&&(this.angularVelocity+=e(o(i,this.position),t)*this.invInertia))}applyForce(t,i){"dynamic"===this.type&&(this.wake(),this.force=a(this.force,t),i&&(this.torque+=e(o(i,this.position),t)))}wake(){this.sleeping=!1,this.sleepTime=0}contains(t,i){const e=s(t,i);if("circle"===this.shape)return h(o(e,this.position))<=this.radius;const a=this.worldVerts();for(let t=0;t<a.length;t++)if(n(this.worldNormal(t),o(e,a[t]))>0)return!1;return!0}}const u=t=>"dynamic"!==t.type||t.sleeping?0:t.invMass,y=t=>"dynamic"!==t.type||t.sleeping?0:t.invInertia,d=t=>n(t.velocity,t.velocity)+(t.angularVelocity*t.radius)**2;function m(t,i){const s=t.worldVerts();let e=-1/0,l=0;for(let a=0;a<s.length;a++){const r=n(t.worldNormal(a),o(i.position,s[a]));if(r>i.radius)return null;r>e&&(e=r,l=a)}if(e<1e-9){const s=t.worldNormal(l);return{a:t,b:i,normal:s,contacts:[{point:o(i.position,r(s,i.radius)),depth:i.radius-e}]}}let c=s[0],p=1/0;for(let t=0;t<s.length;t++){const e=s[t],l=s[(t+1)%s.length],f=o(l,e),u=Math.max(0,Math.min(1,n(o(i.position,e),f)/n(f,f))),y=a(e,r(f,u)),d=h(o(i.position,y));d<p&&(p=d,c=y)}if(p>=i.radius)return null;const f=p>1e-9?r(o(i.position,c),1/p):t.worldNormal(l);return{a:t,b:i,normal:f,contacts:[{point:c,depth:i.radius-p}]}}function g(t,i){const s=t.worldVerts(),e=i.worldVerts();let a=-1/0,r=0;for(let i=0;i<s.length;i++){const h=t.worldNormal(i);let l=1/0;for(const t of e)l=Math.min(l,n(h,o(t,s[i])));l>a&&(a=l,r=i)}return{s:a,i:r}}function b(t,i){if("circle"===t.shape&&"circle"===i.shape)return function(t,i){const n=o(i.position,t.position),e=h(n),l=t.radius+i.radius;if(e>=l)return null;const c=e>1e-9?r(n,1/e):s(0,1);return{a:t,b:i,normal:c,contacts:[{point:a(t.position,r(c,t.radius-(l-e)/2)),depth:l-e}]}}(t,i);if("circle"!==t.shape&&"circle"===i.shape)return m(t,i);if("circle"===t.shape&&"circle"!==i.shape){const s=m(i,t);return s&&{a:t,b:i,normal:r(s.normal,-1),contacts:s.contacts}}return function(t,i){const s=g(t,i);if(s.s>0)return null;const e=g(i,t);if(e.s>0)return null;let l=t,c=i,p=s.i,f=!1;e.s>.95*s.s+.01&&(l=i,c=t,p=e.i,f=!0);const u=l.worldVerts(),y=c.worldVerts(),d=l.worldNormal(p);let m=0,b=1/0;for(let t=0;t<y.length;t++){const i=n(c.worldNormal(t),d);i<b&&(b=i,m=t)}let v=[y[m],y[(m+1)%y.length]];const w=u[p],x=u[(p+1)%u.length],M=r(o(x,w),1/h(o(x,w))),V=(t,i,s)=>{const e=[],h=n(i,t[0])-s,l=n(i,t[1])-s;return h<=0&&e.push(t[0]),l<=0&&e.push(t[1]),h*l<0&&e.push(a(t[0],r(o(t[1],t[0]),h/(h-l)))),e};if(v=V(v,r(M,-1),-n(M,w)),v.length<2)return null;if(v=V(v,M,n(M,x)),v.length<2)return null;const k=[];for(const t of v){const i=n(d,o(t,w));i<=1&&k.push({point:t,depth:-i})}return k.some(t=>t.depth>=0)?f?{a:t,b:i,normal:r(d,-1),contacts:k}:{a:t,b:i,normal:d,contacts:k}:null}(t,i)}class v{constructor(t){this.type=t.type,this.a=t.a,this.b=t.b||null,this.anchorA=s(...t.anchorA||[0,0]),this.anchorB=s(...t.anchorB||[0,0]),this.point=s(...t.point||[t.a.position.x,t.a.position.y]),this.stiffness=t.stiffness??1,this.damping=t.damping??.1,this.label=t.label||t.type,this.length=t.length??h(o(this.worldB(),this.worldA()))}worldA(){return a(this.a.position,c(this.anchorA,Math.cos(this.a.angle),Math.sin(this.a.angle)))}worldB(){return this.b?a(this.b.position,c(this.anchorB,Math.cos(this.b.angle),Math.sin(this.b.angle))):this.point}solve(t){const i=this.a,c=this.b,p=this.worldA(),f=this.worldB(),u=o(f,p),y=h(u);if(y<1e-9&&this.length<1e-9&&"distance"===this.type)return;const d=y>1e-9?r(u,1/y):s(1,0),m=o(p,i.position),g=c?o(f,c.position):s(),b=a(i.velocity,l(i.angularVelocity,m)),v=c?a(c.velocity,l(c.angularVelocity,g)):s(),w=n(o(v,b),d),x=y-this.length,M=i.invMass+(c?c.invMass:0)+e(m,d)**2*i.invInertia+(c?e(g,d)**2*c.invInertia:0);if(M<=0)return;const V=this.stiffness>=1?.2:.2*this.stiffness;let k=-(w*(this.stiffness>=1?1:this.damping+this.stiffness)+V/t*x)/M;this.stiffness<1&&(k*=this.stiffness);const N=r(d,k);i.applyImpulse(r(N,-1),p),c?.applyImpulse(N,f)}}class w{constructor(t={}){this.bodies=[],this.constraints=[],this.contacts=[],this.time=0,this.steps=0,this.acc=0,this.warm=new Map,this.listeners=new Set,this.stop=null,this.gravity=s(...t.gravity||[0,980]),this.iterations=t.iterations??10,this.fixedStep=t.step??1/60,this.sleeping=t.sleeping??!0}add(...t){for(const i of t)i instanceof f?this.bodies.push(i):this.constraints.push(i);return t[0]}body(t){return this.add(new f(t))}constraint(t){return this.add(new v(t))}remove(...t){for(const i of t)i instanceof f?(this.bodies=this.bodies.filter(t=>t!==i),this.constraints=this.constraints.filter(t=>t.a!==i&&t.b!==i)):this.constraints=this.constraints.filter(t=>t!==i)}clear(){this.bodies=[],this.constraints=[],this.contacts=[]}bounds(t,i,s=50,n={}){const e=[new f({type:"static",x:t/2,y:i+s/2,width:t+2*s,height:s,label:"floor"}),new f({type:"static",x:-s/2,y:i/2,width:s,height:i+2*s,label:"wall-left"}),new f({type:"static",x:t+s/2,y:i/2,width:s,height:i+2*s,label:"wall-right"})];!1!==n.top&&e.push(new f({type:"static",x:t/2,y:-s/2,width:t+2*s,height:s,label:"ceiling"}));for(const t of e)this.add(t);return e}onCollision(t){return this.listeners.add(t),()=>this.listeners.delete(t)}query(t,i){return this.bodies.filter(s=>s.contains(t,i)).reverse()}update(t){this.acc=Math.min(this.acc+t,8*this.fixedStep);let i=0;for(;this.acc>=this.fixedStep;)this.step(this.fixedStep),this.acc-=this.fixedStep,i++;return i}step(t=this.fixedStep){const i=this.bodies;for(const s of i)"dynamic"!==s.type||s.sleeping||(s.velocity=a(s.velocity,r(a(this.gravity,r(s.force,s.invMass)),t)),s.angularVelocity+=s.torque*s.invInertia*t,s.damping&&(s.velocity=r(s.velocity,Math.max(0,1-s.damping*t))),s.angularDamping&&(s.angularVelocity*=Math.max(0,1-s.angularDamping*t)));for(const t of i)t.updateAabb();const n=i.slice().sort((t,i)=>t.aabb.minX-i.aabb.minX),e=[];for(let t=0;t<n.length;t++){const i=n[t];for(let s=t+1;s<n.length;s++){const t=n[s];if(t.aabb.minX>i.aabb.maxX)break;if(t.aabb.minY>i.aabb.maxY||t.aabb.maxY<i.aabb.minY)continue;if("dynamic"!==i.type&&"dynamic"!==t.type)continue;if(!(i.category&t.mask&&t.category&i.mask))continue;if((i.sleeping||"dynamic"!==i.type)&&(t.sleeping||"dynamic"!==t.type))continue;const o=i.id<t.id?b(i,t):b(t,i);o&&e.push(o)}}this.contacts=e;const o=e.filter(t=>!t.a.sensor&&!t.b.sensor);for(const t of o)t.a.sleeping&&!t.b.sleeping&&"dynamic"===t.b.type&&d(t.b)>144&&t.a.wake(),t.b.sleeping&&!t.a.sleeping&&"dynamic"===t.a.type&&d(t.a)>144&&t.b.wake();const h=t=>t.a.id+":"+t.b.id;for(const i of o)x(i,t,this.warm.get(h(i)));for(let i=0;i<this.iterations;i++){for(const t of o)M(t);for(const i of this.constraints)i.solve(t)}this.warm=new Map(o.map(t=>[h(t),{pts:t.contacts.map(t=>t.point),pn:t.contacts.map(t=>t.pn),pt:t.contacts.map(t=>t.pt)}]));for(const n of i)"static"===n.type||n.sleeping||(n.position=a(n.position,r(n.velocity,t)),n.angle+=n.angularVelocity*t,n.force=s(),n.torque=0);if(this.sleeping){const n=new Map,e=t=>{let i=t;for(;n.get(i)!==i;)i=n.get(i);return n.set(t,i),i},a=t=>!!t&&"dynamic"===t.type;for(const t of i)a(t)&&n.set(t,t);const r=(t,i)=>{a(t)&&a(i)&&n.set(e(t),e(i))};for(const t of o)r(t.a,t.b);for(const t of this.constraints)r(t.a,t.b);const h=new Set(this.constraints.filter(t=>"drag"===t.label).map(t=>t.a));for(const i of n.keys())i.sleeping||(d(i)<36&&!h.has(i)?i.sleepTime+=t:i.sleepTime=0);const l=new Map;for(const t of n.keys()){const i=e(t);l.set(i,[...l.get(i)||[],t])}for(const t of l.values())if(t.some(t=>!t.sleeping&&t.sleepTime<=.6)){if(t.some(t=>t.sleeping)&&t.some(t=>!t.sleeping&&0===t.sleepTime))for(const i of t)i.wake()}else for(const i of t)i.sleeping=!0,i.velocity=s(),i.angularVelocity=0}if(this.time+=t,this.steps++,this.listeners.size)for(const t of e)for(const i of this.listeners)i(t)}run(){if(this.stop)return this.stop;const t=i.requireModule("core","motionary/runtime/physics").getTicker().add((t,i)=>this.update(Math.min(i,100)/1e3));return this.stop=()=>{t(),this.stop=null},this.stop}get running(){return!!this.stop}energy(){return this.bodies.reduce((t,i)=>t+("dynamic"===i.type?.5*i.mass*n(i.velocity,i.velocity)+.5*(isFinite(i.inertia)?i.inertia:0)*i.angularVelocity**2:0),0)}}function x(t,i,c){const{a:p,b:f,normal:d}=t,m=s(d.y,-d.x),g=Math.max(p.restitution,f.restitution);for(const s of t.contacts){s.ra=o(s.point,p.position),s.rb=o(s.point,f.position);const t=u(p)+u(f)+e(s.ra,d)**2*y(p)+e(s.rb,d)**2*y(f),r=u(p)+u(f)+e(s.ra,m)**2*y(p)+e(s.rb,m)**2*y(f);s.mn=t>0?1/t:0,s.mt=r>0?1/r:0;const h=o(a(f.velocity,l(f.angularVelocity,s.rb)),a(p.velocity,l(p.angularVelocity,s.ra))),c=n(h,d);s.bias=s.depth<0?s.depth/i:Math.max(.2/i*Math.max(0,s.depth-.25),c<-150?-g*c:0),s.pn=0,s.pt=0}c&&t.contacts.forEach(t=>{if(t.depth<0)return;let i=-1,s=2;c.pts.forEach((n,e)=>{const a=h(o(t.point,n));a<s&&(s=a,i=e)}),i<0||(t.pn=c.pn[i],t.pt=c.pt[i],V(p,f,a(r(d,t.pn),r(m,t.pt)),t.ra,t.rb))})}function M(t){const{a:i,b:h,normal:c}=t,p=s(c.y,-c.x),f=Math.sqrt(i.friction*h.friction),d=t.contacts,m=t=>o(a(h.velocity,l(h.angularVelocity,t.rb)),a(i.velocity,l(i.angularVelocity,t.ra)));for(const t of d){let s=-t.mt*n(m(t),p);const e=t.pt,o=f*t.pn;t.pt=Math.max(-o,Math.min(o,e+s)),s=t.pt-e,V(i,h,r(p,s),t.ra,t.rb)}if(2===d.length){const[t,s]=d,o=u,a=y,l=e(t.ra,c),p=e(t.rb,c),f=e(s.ra,c),g=e(s.rb,c),b=o(i)+o(h)+a(i)*l*l+a(h)*p*p,v=o(i)+o(h)+a(i)*f*f+a(h)*g*g,w=o(i)+o(h)+a(i)*l*f+a(h)*p*g,x=b*v-w*w;if(b*b<1e3*x){const e=t.pn,o=s.pn,a=n(m(t),c)-t.bias-(b*e+w*o),l=n(m(s),c)-s.bias-(w*e+v*o);let p=0,f=0;if((()=>(p=-(v*a-w*l)/x,f=-(b*l-w*a)/x,p>=0&&f>=0||(p=-a/b,f=0,p>=0&&w*p+l>=0||(p=0,f=-l/v,f>=0&&w*f+a>=0||(p=f=0,a>=0&&l>=0)))))())return V(i,h,r(c,p-e),t.ra,t.rb),V(i,h,r(c,f-o),s.ra,s.rb),t.pn=p,void(s.pn=f)}}for(const t of d){let s=t.mn*(-n(m(t),c)+t.bias);const e=t.pn;t.pn=Math.max(e+s,0),s=t.pn-e,V(i,h,r(c,s),t.ra,t.rb)}}function V(t,i,s,n,h){"dynamic"!==t.type||t.sleeping||(t.velocity=o(t.velocity,r(s,t.invMass)),t.angularVelocity-=e(n,s)*t.invInertia),"dynamic"!==i.type||i.sleeping||(i.velocity=a(i.velocity,r(s,i.invMass)),i.angularVelocity+=e(h,s)*i.invInertia)}function k(t={}){return new w(t)}function N(t,i,n,e,a=.6){const r=i.angle,h=c(o(s(n,e),i.position),Math.cos(-r),Math.sin(-r)),l=t.constraint({type:"pin",a:i,anchorA:[h.x,h.y],point:[n,e],length:0,stiffness:a,damping:.3,label:"drag"});return i.wake(),{constraint:l,move(t,n){l.point=s(t,n),i.wake()},release(){t.remove(l)}}}const I={id:"physics",version:i.RUNTIME_VERSION,tier:"advanced",requires:["core"],api:{createWorld:k,World:w,Body:f,Constraint:v,collide:b,dragConstraint:N}};i.register(I),t.Body=f,t.Constraint=v,t.World=w,t.collide=b,t.createWorld=k,t.dragConstraint=N,t.physics=I}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/physics.iife.js.map
|
package/dist/runtime/physics.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION, r as requireModule } from '../chunks/registry-
|
|
1
|
+
import { R as RUNTIME_VERSION, r as requireModule } from '../chunks/registry-CorBCE7b.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `motionary/runtime/physics` (10.7) — a small 2D rigid-body engine written
|
|
@@ -725,7 +725,7 @@ function dragConstraint(world, body, x, y, stiffness = 0.6) {
|
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
727
|
/** The module object for `use(physics)`. */
|
|
728
|
-
const physics = { id: 'physics', version: RUNTIME_VERSION, requires: ['core'], api: { createWorld, World, Body, Constraint, collide, dragConstraint } };
|
|
728
|
+
const physics = { id: 'physics', version: RUNTIME_VERSION, tier: 'advanced', requires: ['core'], api: { createWorld, World, Body, Constraint, collide, dragConstraint } };
|
|
729
729
|
|
|
730
730
|
export { Body, Constraint, World, collide, createWorld, dragConstraint, physics };
|
|
731
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
731
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/physics.js.map
|
package/dist/runtime/scroll.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
4
|
-
var ticker = require('../chunks/ticker-
|
|
3
|
+
var registry = require('../chunks/registry-VITvgTNc.cjs');
|
|
4
|
+
var ticker = require('../chunks/ticker-DwRa5hIu.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original
|
|
@@ -288,7 +288,7 @@ function killScenes() {
|
|
|
288
288
|
/** The live scenes. */
|
|
289
289
|
const allScenes = () => Array.from(scenes);
|
|
290
290
|
/** The module object for `use(scroll)`. */
|
|
291
|
-
const scroll = { id: 'scroll', version: registry.RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };
|
|
291
|
+
const scroll = { id: 'scroll', version: registry.RUNTIME_VERSION, tier: 'basic', requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };
|
|
292
292
|
|
|
293
293
|
exports.ScrollScene = ScrollScene;
|
|
294
294
|
exports.allScenes = allScenes;
|
|
@@ -298,4 +298,4 @@ exports.refreshScenes = refreshScenes;
|
|
|
298
298
|
exports.resolveRule = resolveRule;
|
|
299
299
|
exports.scroll = scroll;
|
|
300
300
|
exports.scrollScene = scrollScene;
|
|
301
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
301
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/scroll.cjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
package/dist/runtime/scroll.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,s,e){"use strict";const i={top:0,left:0,center:.5,bottom:1,right:1};function o(t,s){const e=/^([a-z]+|-?[\d.]+%|-?[\d.]+(?:px)?)?\s*(?:([+-])=\s*(-?[\d.]+)(px|%)?)?$/.exec(t.trim());if(!e)throw new Error(`[motionary] scroll: bad edge "${t}"`);let o=0;const r=e[1]||"0";if(r in i)o=i[r]*s;else if(r.endsWith("%"))o=parseFloat(r)/100*s;else{if(!/^-?[\d.]/.test(r))throw new Error(`[motionary] scroll: bad edge "${t}"`);o=parseFloat(r)}if(e[2]){const t="%"===e[4]?parseFloat(e[3])/100*s:parseFloat(e[3]);o+="+"===e[2]?t:-t}return o}function r(t,s,e,i){const r=t.trim().split(/\s+(?![+-]=)/),n=r[0]??"top",h=r[1]??"bottom";return s+o(n,e)-o(h,i)}const n=new Set,h=t=>{const s="string"==typeof t?document.querySelector(t):t;if(!s)throw new Error(`[motionary] scroll: element "${t}" not found`);return s};class l{constructor(t){if(this.start=0,this.end=0,this.progress=0,this.direction=1,this.isActive=!1,this.shown=0,this.last=-1,this.offs=[],this.pinEl=null,this.spacer=null,this.marks=[],this.killed=!1,this.refreshBound=()=>this.refresh(),"undefined"==typeof window)throw new Error("[motionary] scroll scenes need a browser window");this.options=t,this.trigger=h(t.trigger),this.scroller=t.scroller?h(t.scroller):window,t.pin&&this.setupPin(!0===t.pin?this.trigger:h(t.pin));const s=this.scroller,i=()=>this.update();s.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",this.refreshBound),this.offs.push(()=>s.removeEventListener("scroll",i),()=>window.removeEventListener("resize",this.refreshBound)),t.scrub&&"number"==typeof t.scrub&&this.offs.push(e.getTicker().add((t,s)=>this.smooth(s))),n.add(this),this.refresh()}pos(){const t=this.scroller;return t===window?this.options.horizontal?window.scrollX:window.scrollY:this.options.horizontal?t.scrollLeft:t.scrollTop}viewport(){const t=this.scroller;return t===window?this.options.horizontal?window.innerWidth:window.innerHeight:this.options.horizontal?t.clientWidth:t.clientHeight}refresh(){if(this.killed)return;const t=!!this.options.horizontal,s=(this.spacer||this.trigger).getBoundingClientRect(),e=this.scroller===window?{top:0,left:0}:this.scroller.getBoundingClientRect(),i=(t?s.left-e.left:s.top-e.top)+this.pos(),o=(this.pinEl?t?this.pinEl.offsetWidth:this.pinEl.offsetHeight:t?s.width:s.height)||0,n=this.viewport();this.start=r(this.options.start||(t?"left right":"top bottom"),i,o,n);const h=this.options.end||(t?"right left":"bottom top");this.end=/^\+=/.test(h.trim())?this.start+parseFloat(h.trim().slice(2)):r(h,i,o,n),this.end<=this.start&&(this.end=this.start+1),this.spacer&&this.pinEl&&(this.spacer.style[t?"paddingRight":"paddingBottom"]=this.end-this.start+"px"),this.drawMarkers(n),this.last=-1,this.update()}update(){if(this.killed)return;const t=this.pos(),s=Math.min(1,Math.max(0,(t-this.start)/(this.end-this.start)));t!==this.last&&this.last>=0&&(this.direction=t>this.last?1:-1);const e=this.progress,i=this.isActive;this.progress=s,this.isActive=t>this.start&&t<this.end,this.last=t;const o=this.options;if(this.isActive!==i||0===e&&1===s||1===e&&0===s){const t=[];s>0&&0===e&&t.push(["onEnter",0]),1===s&&e<1&&t.push(["onLeave",1]),s<1&&1===e&&t.push(["onEnterBack",2]),0===s&&e>0&&t.push(["onLeaveBack",3]);for(const[s,e]of t)o[s]?.(this),o.scrub||this.act(e);if(o.toggleClass&&this.trigger.classList.toggle(o.toggleClass,this.isActive),o.onToggle?.(this),o.once&&1===s)return this.applyPin(1),void this.kill(!0)}this.applyPin(s),!0===o.scrub&&o.animation&&(o.animation.progress=s),o.onUpdate?.(this)}smooth(t){const s=this.options.animation;if(!s)return;const e=1-Math.exp(-t/Math.max(1,this.options.scrub));this.shown+=(this.progress-this.shown)*e,Math.abs(this.progress-this.shown)<5e-4&&(this.shown=this.progress),s.progress=this.shown}act(t){const s=this.options.animation;if(!s)return;const e=(this.options.actions||"play none none reverse").split(/\s+/)[t]||"none";"play"===e?s.play():"pause"===e?s.pause():"resume"===e?s.play():"reverse"===e?s.reverse():"restart"===e?s.restart():"reset"===e?(s.pause(),s.seek(0)):"complete"===e&&(s.pause(),s.progress=1)}setupPin(t){this.pinEl=t;const s=document.createElement("div");s.className="usa-pin-spacer",s.style.boxSizing="content-box",t.parentNode?.insertBefore(s,t),s.appendChild(t),this.spacer=s,this.offs.push(()=>{t.style.position=t.style.top=t.style.left=t.style.width=t.style.transform="",s.parentNode?.insertBefore(t,s),s.remove()})}applyPin(t){const s=this.pinEl,e=this.spacer;if(!s||!e)return;const i=!!this.options.horizontal;if(t>0&&t<1&&this.scroller===window){const t=e.getBoundingClientRect(),o=this.start-(i?t.left+window.scrollX:t.top+window.scrollY);s.style.position="fixed",s.style.width=`${t.width}px`,s.style.left=i?-o+"px":`${t.left}px`,s.style.top=i?`${t.top}px`:-o+"px",s.style.transform=""}else{s.style.position=s.style.top=s.style.left=s.style.width="";const e=t>=1?this.end-this.start:t>0?this.pos()-this.start:0;s.style.transform=e?i?`translateX(${e}px)`:`translateY(${e}px)`:""}}drawMarkers(t){this.marks.forEach(t=>t.remove()),this.marks=[];const s=this.options.markers;if(!s)return;const e="object"==typeof s&&s.color||"#e11d48",i=!!this.options.horizontal,r=this.scroller===window?document.body:this.scroller,n=(t,s,e,o)=>{const n=document.createElement("div");n.className="usa-scroll-marker",n.textContent=t,n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:e?"fixed":"absolute",[i?"left":"top"]:`${s}px`,[i?"top":"right"]:"0",[i?"height":"width"]:"80px",[i?"borderLeft":"borderTop"]:`2px solid ${o}`,color:o,font:"600 11px/1.2 ui-monospace,monospace",padding:"2px 4px",zIndex:"2147483646",pointerEvents:"none",background:"rgba(255,255,255,.7)"}),(e?document.body:r).appendChild(n),this.marks.push(n)},h=(t,s)=>(t||s).trim().split(/\s+(?![+-]=)/)[1]??"bottom";n("start "+(0|this.start),this.start,!1,e),n("end "+(0|this.end),this.end,!1,e),n("scroller-start",o(h(this.options.start,"top bottom"),t),!0,"#16a34a"),/^\+=/.test((this.options.end||"").trim())||n("scroller-end",o(h(this.options.end,"bottom top"),t),!0,"#2563eb")}kill(t=!1){this.killed||(this.killed=!0,t||this.options.animation?.pause(),this.offs.splice(0).forEach(t=>t()),this.marks.forEach(t=>t.remove()),n.delete(this))}}function a(t){return new l(t)}function p(){n.forEach(t=>t.refresh())}function c(){Array.from(n).forEach(t=>t.kill())}const d=()=>Array.from(n),f={id:"scroll",version:s.RUNTIME_VERSION,requires:["core"],api:{scrollScene:a,refreshScenes:p,killScenes:c,allScenes:d,parseEdge:o,resolveRule:r,ScrollScene:l}};s.register(f),t.ScrollScene=l,t.allScenes=d,t.killScenes=c,t.parseEdge=o,t.refreshScenes=p,t.resolveRule=r,t.scroll=f,t.scrollScene=a}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime,MotionaryRuntime);
|
|
2
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
1
|
+
!function(t,s,e){"use strict";const i={top:0,left:0,center:.5,bottom:1,right:1};function o(t,s){const e=/^([a-z]+|-?[\d.]+%|-?[\d.]+(?:px)?)?\s*(?:([+-])=\s*(-?[\d.]+)(px|%)?)?$/.exec(t.trim());if(!e)throw new Error(`[motionary] scroll: bad edge "${t}"`);let o=0;const r=e[1]||"0";if(r in i)o=i[r]*s;else if(r.endsWith("%"))o=parseFloat(r)/100*s;else{if(!/^-?[\d.]/.test(r))throw new Error(`[motionary] scroll: bad edge "${t}"`);o=parseFloat(r)}if(e[2]){const t="%"===e[4]?parseFloat(e[3])/100*s:parseFloat(e[3]);o+="+"===e[2]?t:-t}return o}function r(t,s,e,i){const r=t.trim().split(/\s+(?![+-]=)/),n=r[0]??"top",h=r[1]??"bottom";return s+o(n,e)-o(h,i)}const n=new Set,h=t=>{const s="string"==typeof t?document.querySelector(t):t;if(!s)throw new Error(`[motionary] scroll: element "${t}" not found`);return s};class l{constructor(t){if(this.start=0,this.end=0,this.progress=0,this.direction=1,this.isActive=!1,this.shown=0,this.last=-1,this.offs=[],this.pinEl=null,this.spacer=null,this.marks=[],this.killed=!1,this.refreshBound=()=>this.refresh(),"undefined"==typeof window)throw new Error("[motionary] scroll scenes need a browser window");this.options=t,this.trigger=h(t.trigger),this.scroller=t.scroller?h(t.scroller):window,t.pin&&this.setupPin(!0===t.pin?this.trigger:h(t.pin));const s=this.scroller,i=()=>this.update();s.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",this.refreshBound),this.offs.push(()=>s.removeEventListener("scroll",i),()=>window.removeEventListener("resize",this.refreshBound)),t.scrub&&"number"==typeof t.scrub&&this.offs.push(e.getTicker().add((t,s)=>this.smooth(s))),n.add(this),this.refresh()}pos(){const t=this.scroller;return t===window?this.options.horizontal?window.scrollX:window.scrollY:this.options.horizontal?t.scrollLeft:t.scrollTop}viewport(){const t=this.scroller;return t===window?this.options.horizontal?window.innerWidth:window.innerHeight:this.options.horizontal?t.clientWidth:t.clientHeight}refresh(){if(this.killed)return;const t=!!this.options.horizontal,s=(this.spacer||this.trigger).getBoundingClientRect(),e=this.scroller===window?{top:0,left:0}:this.scroller.getBoundingClientRect(),i=(t?s.left-e.left:s.top-e.top)+this.pos(),o=(this.pinEl?t?this.pinEl.offsetWidth:this.pinEl.offsetHeight:t?s.width:s.height)||0,n=this.viewport();this.start=r(this.options.start||(t?"left right":"top bottom"),i,o,n);const h=this.options.end||(t?"right left":"bottom top");this.end=/^\+=/.test(h.trim())?this.start+parseFloat(h.trim().slice(2)):r(h,i,o,n),this.end<=this.start&&(this.end=this.start+1),this.spacer&&this.pinEl&&(this.spacer.style[t?"paddingRight":"paddingBottom"]=this.end-this.start+"px"),this.drawMarkers(n),this.last=-1,this.update()}update(){if(this.killed)return;const t=this.pos(),s=Math.min(1,Math.max(0,(t-this.start)/(this.end-this.start)));t!==this.last&&this.last>=0&&(this.direction=t>this.last?1:-1);const e=this.progress,i=this.isActive;this.progress=s,this.isActive=t>this.start&&t<this.end,this.last=t;const o=this.options;if(this.isActive!==i||0===e&&1===s||1===e&&0===s){const t=[];s>0&&0===e&&t.push(["onEnter",0]),1===s&&e<1&&t.push(["onLeave",1]),s<1&&1===e&&t.push(["onEnterBack",2]),0===s&&e>0&&t.push(["onLeaveBack",3]);for(const[s,e]of t)o[s]?.(this),o.scrub||this.act(e);if(o.toggleClass&&this.trigger.classList.toggle(o.toggleClass,this.isActive),o.onToggle?.(this),o.once&&1===s)return this.applyPin(1),void this.kill(!0)}this.applyPin(s),!0===o.scrub&&o.animation&&(o.animation.progress=s),o.onUpdate?.(this)}smooth(t){const s=this.options.animation;if(!s)return;const e=1-Math.exp(-t/Math.max(1,this.options.scrub));this.shown+=(this.progress-this.shown)*e,Math.abs(this.progress-this.shown)<5e-4&&(this.shown=this.progress),s.progress=this.shown}act(t){const s=this.options.animation;if(!s)return;const e=(this.options.actions||"play none none reverse").split(/\s+/)[t]||"none";"play"===e?s.play():"pause"===e?s.pause():"resume"===e?s.play():"reverse"===e?s.reverse():"restart"===e?s.restart():"reset"===e?(s.pause(),s.seek(0)):"complete"===e&&(s.pause(),s.progress=1)}setupPin(t){this.pinEl=t;const s=document.createElement("div");s.className="usa-pin-spacer",s.style.boxSizing="content-box",t.parentNode?.insertBefore(s,t),s.appendChild(t),this.spacer=s,this.offs.push(()=>{t.style.position=t.style.top=t.style.left=t.style.width=t.style.transform="",s.parentNode?.insertBefore(t,s),s.remove()})}applyPin(t){const s=this.pinEl,e=this.spacer;if(!s||!e)return;const i=!!this.options.horizontal;if(t>0&&t<1&&this.scroller===window){const t=e.getBoundingClientRect(),o=this.start-(i?t.left+window.scrollX:t.top+window.scrollY);s.style.position="fixed",s.style.width=`${t.width}px`,s.style.left=i?-o+"px":`${t.left}px`,s.style.top=i?`${t.top}px`:-o+"px",s.style.transform=""}else{s.style.position=s.style.top=s.style.left=s.style.width="";const e=t>=1?this.end-this.start:t>0?this.pos()-this.start:0;s.style.transform=e?i?`translateX(${e}px)`:`translateY(${e}px)`:""}}drawMarkers(t){this.marks.forEach(t=>t.remove()),this.marks=[];const s=this.options.markers;if(!s)return;const e="object"==typeof s&&s.color||"#e11d48",i=!!this.options.horizontal,r=this.scroller===window?document.body:this.scroller,n=(t,s,e,o)=>{const n=document.createElement("div");n.className="usa-scroll-marker",n.textContent=t,n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:e?"fixed":"absolute",[i?"left":"top"]:`${s}px`,[i?"top":"right"]:"0",[i?"height":"width"]:"80px",[i?"borderLeft":"borderTop"]:`2px solid ${o}`,color:o,font:"600 11px/1.2 ui-monospace,monospace",padding:"2px 4px",zIndex:"2147483646",pointerEvents:"none",background:"rgba(255,255,255,.7)"}),(e?document.body:r).appendChild(n),this.marks.push(n)},h=(t,s)=>(t||s).trim().split(/\s+(?![+-]=)/)[1]??"bottom";n("start "+(0|this.start),this.start,!1,e),n("end "+(0|this.end),this.end,!1,e),n("scroller-start",o(h(this.options.start,"top bottom"),t),!0,"#16a34a"),/^\+=/.test((this.options.end||"").trim())||n("scroller-end",o(h(this.options.end,"bottom top"),t),!0,"#2563eb")}kill(t=!1){this.killed||(this.killed=!0,t||this.options.animation?.pause(),this.offs.splice(0).forEach(t=>t()),this.marks.forEach(t=>t.remove()),n.delete(this))}}function a(t){return new l(t)}function p(){n.forEach(t=>t.refresh())}function c(){Array.from(n).forEach(t=>t.kill())}const d=()=>Array.from(n),f={id:"scroll",version:s.RUNTIME_VERSION,tier:"basic",requires:["core"],api:{scrollScene:a,refreshScenes:p,killScenes:c,allScenes:d,parseEdge:o,resolveRule:r,ScrollScene:l}};s.register(f),t.ScrollScene=l,t.allScenes=d,t.killScenes=c,t.parseEdge=o,t.refreshScenes=p,t.resolveRule=r,t.scroll=f,t.scrollScene=a}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime,MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/scroll.iife.js.map
|
package/dist/runtime/scroll.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION } from '../chunks/registry-
|
|
2
|
-
import { g as getTicker } from '../chunks/ticker-
|
|
1
|
+
import { R as RUNTIME_VERSION } from '../chunks/registry-CorBCE7b.js';
|
|
2
|
+
import { g as getTicker } from '../chunks/ticker-CZisW9Nb.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original
|
|
@@ -286,7 +286,7 @@ function killScenes() {
|
|
|
286
286
|
/** The live scenes. */
|
|
287
287
|
const allScenes = () => Array.from(scenes);
|
|
288
288
|
/** The module object for `use(scroll)`. */
|
|
289
|
-
const scroll = { id: 'scroll', version: RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };
|
|
289
|
+
const scroll = { id: 'scroll', version: RUNTIME_VERSION, tier: 'basic', requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };
|
|
290
290
|
|
|
291
291
|
export { ScrollScene, allScenes, killScenes, parseEdge, refreshScenes, resolveRule, scroll, scrollScene };
|
|
292
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
292
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/scroll.js.map
|
package/dist/runtime/smooth.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
3
|
+
var registry = require('../chunks/registry-VITvgTNc.cjs');
|
|
4
4
|
var ease = require('../chunks/ease-HwYZnZat.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -275,10 +275,10 @@ function smoothScroll(o = {}) {
|
|
|
275
275
|
/** Every live instance. */
|
|
276
276
|
const allSmooth = () => Array.from(instances);
|
|
277
277
|
/** The module object for `use(smooth)`. */
|
|
278
|
-
const smooth = { id: 'smooth', version: registry.RUNTIME_VERSION, requires: ['core'], api: { smoothScroll, allSmooth, SmoothScroll } };
|
|
278
|
+
const smooth = { id: 'smooth', version: registry.RUNTIME_VERSION, tier: 'standard', requires: ['core'], api: { smoothScroll, allSmooth, SmoothScroll } };
|
|
279
279
|
|
|
280
280
|
exports.SmoothScroll = SmoothScroll;
|
|
281
281
|
exports.allSmooth = allSmooth;
|
|
282
282
|
exports.smooth = smooth;
|
|
283
283
|
exports.smoothScroll = smoothScroll;
|
|
284
|
-
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.
|
|
284
|
+
//# sourceMappingURL=https://raw.githubusercontent.com/HarrisonCN/Motionary/v11.4.0/dist/runtime/smooth.cjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 11.4: runtime tiers. **basic** — ticker, tween, timeline, scroll, text, CSS / WAAPI keyframes; **standard** — smooth
|
|
3
|
+
* scrolling, drag-snap, SVG, sprites, GIF / APNG / WebP, Lottie; **advanced** — WebGL, 3D file parsing and decoders,
|
|
4
|
+
* physics. A page that only uses basic modules never downloads standard or advanced code.
|
|
5
|
+
*/
|
|
6
|
+
type RuntimeTier = 'basic' | 'standard' | 'advanced';
|
|
1
7
|
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
8
|
interface RuntimeModule<A = unknown> {
|
|
3
9
|
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
@@ -5,6 +11,8 @@ interface RuntimeModule<A = unknown> {
|
|
|
5
11
|
version: string;
|
|
6
12
|
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
13
|
requires?: string[];
|
|
14
|
+
/** 11.4: runtime tier — basic · standard · advanced (docs/runtime-tiers.md). */
|
|
15
|
+
tier?: RuntimeTier;
|
|
8
16
|
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
17
|
api: A;
|
|
10
18
|
/** Optional one-time setup, called on first registration. */
|