@motionscript/core 0.1.0-alpha.7 → 0.1.0-alpha.8
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 +6 -0
- package/NOTICE +15 -14
- package/README.md +4 -4
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +7 -5
- package/dist/assets/manager.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.js +11 -0
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.js +6 -0
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +24 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +4 -3
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +21 -13
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +42 -28
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +15 -12
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -10
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +4 -3
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +4 -7
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +7 -7
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -6
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -2
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +1 -2
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +96 -409
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +93 -283
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +46 -14
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +42 -26
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +4 -2
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +11 -0
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +113 -102
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- package/dist/attributes/shape/fill/chain.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +27 -26
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/index.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +2 -6
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -5
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +1 -1
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +2 -3
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/shaders/index.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +4 -4
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/components/builtins/audio/audio.d.ts +14 -5
- package/dist/components/builtins/audio/audio.d.ts.map +1 -1
- package/dist/components/builtins/audio/audio.js +10 -13
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.d.ts +3 -3
- package/dist/components/builtins/media/media.d.ts +7 -7
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +4 -10
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +12 -12
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js +3 -0
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/factory/api.d.ts +38 -11
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/component3d.d.ts.map +1 -1
- package/dist/components/factory/component3d.js +11 -3
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.d.ts +3 -0
- package/dist/components/factory/factory.d.ts.map +1 -1
- package/dist/components/factory/factory.js +39 -5
- package/dist/components/factory/factory.js.map +1 -1
- package/dist/components/modules/text-style.d.ts +1 -1
- package/dist/components/trees/2d/node-render.d.ts +1 -1
- package/dist/components/trees/2d/node-render.js +1 -1
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +1 -1
- package/dist/components/trees/2d/node2d.js +1 -1
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +16 -9
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +15 -11
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/document/command-traits.d.ts +12 -2
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +34 -6
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/index.d.ts +8 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +4 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-descriptor.d.ts +4 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +2 -1
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +2 -0
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +16 -0
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +30 -4
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +2 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +5 -5
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +45 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +172 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +14 -28
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +17 -5
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +158 -21
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +68 -8
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +22 -8
- package/dist/experimental.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -0
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +1 -1
- package/dist/renamed-scene-names.d.ts.map +1 -1
- package/dist/renamed-scene-names.js +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +9 -0
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +10 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/render-context2d.d.ts +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- package/dist/render/surface.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +54 -5
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/runtime/asset-refine.js +2 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +7 -0
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +3 -1
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +4 -0
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +17 -2
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -3
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +14 -4
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +7 -3
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +11 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +8 -6
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +10 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +7 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -0
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +2 -0
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +4 -0
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/index.d.ts +1 -0
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +1 -0
- package/dist/tween/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/browser/chunks/chunk-D4FSTPML.js +0 -14
- package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
- package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
- package/dist/browser/chunks/chunk-RTNATFWX.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAa7C,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAGtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CASpD"}
|
|
1
|
+
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAa7C,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAGtF;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAExE;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CASpD"}
|
|
@@ -13,6 +13,10 @@ export function describeEase(ease, description) {
|
|
|
13
13
|
descriptions.set(ease, description);
|
|
14
14
|
return ease;
|
|
15
15
|
}
|
|
16
|
+
/** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */
|
|
17
|
+
export function easeDescription(ease) {
|
|
18
|
+
return descriptions.get(ease);
|
|
19
|
+
}
|
|
16
20
|
/**
|
|
17
21
|
* A string that is equal for two easings exactly when they are the same ease.
|
|
18
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,OAAO,EAA0B,CAAC;AAC3D,MAAM,UAAU,GAAG,IAAI,OAAO,EAA0B,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB,yDAAyD;AACzD,MAAM,UAAU,YAAY,CAA2B,IAAO,EAAE,WAAmB;IAC/E,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,IAAoB;IACxC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACnB,EAAE,GAAG,MAAM,eAAe,EAAE,EAAE,CAAC;QAC/B,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\r\n\r\n/**\r\n * Descriptions of engine-built easings, by function.\r\n *\r\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\r\n * tell two of them apart. A constructor that knows what it built records a short,\r\n * deterministic description here, which is what a cache key can be built from.\r\n */\r\nconst descriptions = new WeakMap<EasingFunction, string>();\r\nconst identities = new WeakMap<EasingFunction, string>();\r\nlet identityCounter = 0;\r\n\r\n/** Record what `ease` is, and hand it back. @internal */\r\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\r\n descriptions.set(ease, description);\r\n return ease;\r\n}\r\n\r\n/**\r\n * A string that is equal for two easings exactly when they are the same ease.\r\n *\r\n * An engine easing keys by its description, so building the same one twice (a\r\n * document rebuilt from the same row) gives the same key. A function the engine\r\n * did not build keys by its own identity: a different function is always a\r\n * different key, which may over-report a change but never hides one.\r\n *\r\n * @internal\r\n */\r\nexport function easeKey(ease: EasingFunction): string {\r\n const described = descriptions.get(ease);\r\n if (described !== undefined) return described;\r\n let id = identities.get(ease);\r\n if (id === undefined) {\r\n id = `fn#${identityCounter++}`;\r\n identities.set(ease, id);\r\n }\r\n return id;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,OAAO,EAA0B,CAAC;AAC3D,MAAM,UAAU,GAAG,IAAI,OAAO,EAA0B,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB,yDAAyD;AACzD,MAAM,UAAU,YAAY,CAA2B,IAAO,EAAE,WAAmB;IAC/E,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,IAAoB;IAChD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,IAAoB;IACxC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACnB,EAAE,GAAG,MAAM,eAAe,EAAE,EAAE,CAAC;QAC/B,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\r\n\r\n/**\r\n * Descriptions of engine-built easings, by function.\r\n *\r\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\r\n * tell two of them apart. A constructor that knows what it built records a short,\r\n * deterministic description here, which is what a cache key can be built from.\r\n */\r\nconst descriptions = new WeakMap<EasingFunction, string>();\r\nconst identities = new WeakMap<EasingFunction, string>();\r\nlet identityCounter = 0;\r\n\r\n/** Record what `ease` is, and hand it back. @internal */\r\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\r\n descriptions.set(ease, description);\r\n return ease;\r\n}\r\n\r\n/** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */\r\nexport function easeDescription(ease: EasingFunction): string | undefined {\r\n return descriptions.get(ease);\r\n}\r\n\r\n/**\r\n * A string that is equal for two easings exactly when they are the same ease.\r\n *\r\n * An engine easing keys by its description, so building the same one twice (a\r\n * document rebuilt from the same row) gives the same key. A function the engine\r\n * did not build keys by its own identity: a different function is always a\r\n * different key, which may over-report a change but never hides one.\r\n *\r\n * @internal\r\n */\r\nexport function easeKey(ease: EasingFunction): string {\r\n const described = descriptions.get(ease);\r\n if (described !== undefined) return described;\r\n let id = identities.get(ease);\r\n if (id === undefined) {\r\n id = `fn#${identityCounter++}`;\r\n identities.set(ease, id);\r\n }\r\n return id;\r\n}\r\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type EaseParams } from "./constants.js";
|
|
2
|
+
import { type CurvePoint } from "./curve.js";
|
|
3
|
+
import type { EasingFunction } from "./type.js";
|
|
4
|
+
/**
|
|
5
|
+
* How something eases, as data.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in
|
|
8
|
+
* `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the
|
|
9
|
+
* family and its knobs.
|
|
10
|
+
*
|
|
11
|
+
* `kind: "custom"` takes a drawn curve in `args`, or the key a host passed to
|
|
12
|
+
* `Registry.addEase`/`RegistryOptions.eases` for an ease no standard family
|
|
13
|
+
* expresses.
|
|
14
|
+
*/
|
|
15
|
+
export interface EaseSpec {
|
|
16
|
+
kind: "linear" | "in" | "out" | "inOut" | "custom";
|
|
17
|
+
/**
|
|
18
|
+
* Family and its parameters (`"quad"`, or `{ type: "back", overshoot: 2 }`)
|
|
19
|
+
* for every `kind` but `"custom"`, whose `args` is instead the drawn curve
|
|
20
|
+
* itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing
|
|
21
|
+
* travels with the document — or the `Registry.addEase` key of a function
|
|
22
|
+
* the host registered.
|
|
23
|
+
*/
|
|
24
|
+
args?: EaseParams | CurvePoint[] | string;
|
|
25
|
+
}
|
|
26
|
+
export declare const EASE_KINDS: ReadonlySet<string>;
|
|
27
|
+
/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */
|
|
28
|
+
export declare function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction;
|
|
29
|
+
/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */
|
|
30
|
+
export declare function specOfEase(ease: EasingFunction): EaseSpec | undefined;
|
|
31
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,UAAU,EAAqB,MAAM,aAAa,CAAC;AACrG,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;CAC7C;AAED,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAyE,CAAC;AAErH,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,cAAc,CAsBhJ;AAID,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,SAAS,CAarE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { easeIn, easeInOut, easeOut, linear } from "./constants.js";
|
|
2
|
+
import { curveEase, isEaseCurve } from "./curve.js";
|
|
3
|
+
import { easeDescription } from "./describe.js";
|
|
4
|
+
export const EASE_KINDS = new Set(["linear", "in", "out", "inOut", "custom"]);
|
|
5
|
+
/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */
|
|
6
|
+
export function easeOfSpec(spec, lookup, known) {
|
|
7
|
+
switch (spec.kind) {
|
|
8
|
+
case "linear": return linear();
|
|
9
|
+
case "in": return easeIn(spec.args);
|
|
10
|
+
case "out": return easeOut(spec.args);
|
|
11
|
+
case "inOut": return easeInOut(spec.args);
|
|
12
|
+
case "custom": {
|
|
13
|
+
const key = spec.args;
|
|
14
|
+
if (isEaseCurve(key))
|
|
15
|
+
return curveEase(key);
|
|
16
|
+
if (typeof key !== "string") {
|
|
17
|
+
throw new Error(`A "custom" ease needs a curve or its Registry.addEase key in \`args\` (got ${JSON.stringify(spec.args)}).`);
|
|
18
|
+
}
|
|
19
|
+
const fn = lookup?.(key);
|
|
20
|
+
if (!fn) {
|
|
21
|
+
const registered = known?.().join(", ") || "none";
|
|
22
|
+
throw new Error(lookup
|
|
23
|
+
? `No ease registered under "${key}". Registered: ${registered}.`
|
|
24
|
+
: `The ease "${key}" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);
|
|
25
|
+
}
|
|
26
|
+
return fn;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const STANDARD = new Set(["sine", "quad", "cubic", "quart", "quint", "expo", "circ", "back", "elastic", "bounce"]);
|
|
31
|
+
/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */
|
|
32
|
+
export function specOfEase(ease) {
|
|
33
|
+
const description = easeDescription(ease);
|
|
34
|
+
if (description === undefined)
|
|
35
|
+
return undefined;
|
|
36
|
+
if (description === "lin")
|
|
37
|
+
return { kind: "linear" };
|
|
38
|
+
if (description.startsWith("curve:"))
|
|
39
|
+
return { kind: "custom", args: JSON.parse(description.slice(6)) };
|
|
40
|
+
const [direction, type, overshoot, amplitude, period] = description.split(":");
|
|
41
|
+
if ((direction !== "in" && direction !== "out" && direction !== "inOut") || !STANDARD.has(type))
|
|
42
|
+
return undefined;
|
|
43
|
+
const tuning = { overshoot, amplitude, period };
|
|
44
|
+
const config = { type };
|
|
45
|
+
for (const [name, value] of Object.entries(tuning)) {
|
|
46
|
+
if (value !== undefined && value !== "_")
|
|
47
|
+
config[name] = Number(value);
|
|
48
|
+
}
|
|
49
|
+
return { kind: direction, args: Object.keys(config).length === 1 ? type : config };
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"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","sourcesContent":["import { easeIn, easeInOut, easeOut, linear, type EaseParams, type StandardEase } from \"./constants\";\r\nimport { curveEase, isEaseCurve, type CurvePoint } from \"./curve\";\r\nimport { easeDescription } from \"./describe\";\r\nimport type { EasingFunction } from \"./type\";\r\n\r\n/**\r\n * How something eases, as data.\r\n *\r\n * Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in\r\n * `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the\r\n * family and its knobs.\r\n *\r\n * `kind: \"custom\"` takes a drawn curve in `args`, or the key a host passed to\r\n * `Registry.addEase`/`RegistryOptions.eases` for an ease no standard family\r\n * expresses.\r\n */\r\nexport interface EaseSpec {\r\n kind: \"linear\" | \"in\" | \"out\" | \"inOut\" | \"custom\";\r\n /**\r\n * Family and its parameters (`\"quad\"`, or `{ type: \"back\", overshoot: 2 }`)\r\n * for every `kind` but `\"custom\"`, whose `args` is instead the drawn curve\r\n * itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing\r\n * travels with the document — or the `Registry.addEase` key of a function\r\n * the host registered.\r\n */\r\n args?: EaseParams | CurvePoint[] | string;\r\n}\r\n\r\nexport const EASE_KINDS: ReadonlySet<string> = new Set<EaseSpec[\"kind\"]>([\"linear\", \"in\", \"out\", \"inOut\", \"custom\"]);\r\n\r\n/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */\r\nexport function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction {\r\n switch (spec.kind) {\r\n case \"linear\": return linear();\r\n case \"in\": return easeIn(spec.args as EaseParams | undefined);\r\n case \"out\": return easeOut(spec.args as EaseParams | undefined);\r\n case \"inOut\": return easeInOut(spec.args as EaseParams | undefined);\r\n case \"custom\": {\r\n const key = spec.args;\r\n if (isEaseCurve(key)) return curveEase(key);\r\n if (typeof key !== \"string\") {\r\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(spec.args)}).`);\r\n }\r\n const fn = lookup?.(key);\r\n if (!fn) {\r\n const registered = known?.().join(\", \") || \"none\";\r\n throw new Error(lookup\r\n ? `No ease registered under \"${key}\". Registered: ${registered}.`\r\n : `The ease \"${key}\" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);\r\n }\r\n return fn;\r\n }\r\n }\r\n}\r\n\r\nconst STANDARD: ReadonlySet<string> = new Set<StandardEase>([\"sine\", \"quad\", \"cubic\", \"quart\", \"quint\", \"expo\", \"circ\", \"back\", \"elastic\", \"bounce\"]);\r\n\r\n/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */\r\nexport function specOfEase(ease: EasingFunction): EaseSpec | undefined {\r\n const description = easeDescription(ease);\r\n if (description === undefined) return undefined;\r\n if (description === \"lin\") return { kind: \"linear\" };\r\n if (description.startsWith(\"curve:\")) return { kind: \"custom\", args: JSON.parse(description.slice(6)) as CurvePoint[] };\r\n const [direction, type, overshoot, amplitude, period] = description.split(\":\");\r\n if ((direction !== \"in\" && direction !== \"out\" && direction !== \"inOut\") || !STANDARD.has(type)) return undefined;\r\n const tuning = { overshoot, amplitude, period };\r\n const config: Record<string, unknown> = { type };\r\n for (const [name, value] of Object.entries(tuning)) {\r\n if (value !== undefined && value !== \"_\") config[name] = Number(value);\r\n }\r\n return { kind: direction, args: Object.keys(config).length === 1 ? (type as StandardEase) : (config as EaseParams) };\r\n}\r\n"]}
|
package/dist/tween/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export type { CommandArg, CommandArgDescriptor, CommandMeta, CommandOptions } fr
|
|
|
9
9
|
export * from './prepare.js';
|
|
10
10
|
export * from './stepper.js';
|
|
11
11
|
export * from './lerp.js';
|
|
12
|
+
export { easeOfSpec, specOfEase } from './ease/spec.js';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzG,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzG,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/tween/index.js
CHANGED
package/dist/tween/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGnE,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC","sourcesContent":["export * from './ease/type';\r\nexport * from './ease/constants';\r\nexport * from './ease/curve';\r\n\r\nexport * from './to-command';\r\nexport * from './command';\r\nexport * from './loop';\r\nexport { COMMAND_META, getCommandMeta } from './command-decorator';\r\nexport type { CommandArg, CommandArgDescriptor, CommandMeta, CommandOptions } from './command-decorator';\r\n\r\nexport * from './prepare';\r\nexport * from './stepper';\r\nexport * from './lerp';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGnE,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export * from './ease/type';\r\nexport * from './ease/constants';\r\nexport * from './ease/curve';\r\n\r\nexport * from './to-command';\r\nexport * from './command';\r\nexport * from './loop';\r\nexport { COMMAND_META, getCommandMeta } from './command-decorator';\r\nexport type { CommandArg, CommandArgDescriptor, CommandMeta, CommandOptions } from './command-decorator';\r\n\r\nexport * from './prepare';\r\nexport * from './stepper';\r\nexport * from './lerp';\r\nexport { easeOfSpec, specOfEase } from './ease/spec';\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motionscript/core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens and layout.",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"animation"
|
|
19
19
|
],
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
|
+
"author": "Motionscript",
|
|
21
22
|
"publishConfig": {
|
|
22
23
|
"access": "public"
|
|
23
24
|
},
|
|
@@ -64,7 +65,6 @@
|
|
|
64
65
|
"dev": "concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc-alias -p tsconfig.build.json -w\"",
|
|
65
66
|
"clean": "rimraf --glob dist .turbo *.tsbuildinfo",
|
|
66
67
|
"test": "vitest",
|
|
67
|
-
"bench": "vitest bench --run",
|
|
68
68
|
"lint": "eslint .",
|
|
69
69
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
70
70
|
}
|