@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,26 +1,47 @@
|
|
|
1
1
|
import { scalarOptions, withEffectOptions } from "./effect-data.js";
|
|
2
2
|
import { resolveEffect, lerpEffect } from "./registry.js";
|
|
3
|
-
import {
|
|
3
|
+
import { buildEffect } from "./spec.js";
|
|
4
|
+
import { blurSpec } from "./implementations/blur.js";
|
|
5
|
+
import { directionalBlurSpec } from "./implementations/directional-blur.js";
|
|
6
|
+
import { grayscaleSpec } from "./implementations/grayscale.js";
|
|
7
|
+
import { pixelateSpec } from "./implementations/pixelate.js";
|
|
8
|
+
import { bulgeSpec } from "./implementations/bulge.js";
|
|
9
|
+
import { magnifySpec } from "./implementations/magnify.js";
|
|
10
|
+
import { bloomSpec } from "./implementations/bloom.js";
|
|
11
|
+
import { vintageSpec } from "./implementations/vintage.js";
|
|
12
|
+
import { chromaticAberrationSpec } from "./implementations/chromatic-aberration.js";
|
|
13
|
+
import { invertSpec } from "./implementations/invert.js";
|
|
14
|
+
import { scatterSpec } from "./implementations/scatter.js";
|
|
15
|
+
import { posterizeSpec } from "./implementations/posterize.js";
|
|
16
|
+
import { motionBlurSpec } from "./implementations/motion-blur.js";
|
|
17
|
+
import { outlineSpec } from "./implementations/outline.js";
|
|
18
|
+
import { dropShadowSpec } from "./implementations/drop-shadow.js";
|
|
19
|
+
import { vignetteSpec } from "./implementations/vignette.js";
|
|
20
|
+
import { lutSpec } from "./implementations/lut.js";
|
|
21
|
+
import { grainSpec } from "./implementations/grain.js";
|
|
22
|
+
import { sharpenSpec } from "./implementations/sharpen.js";
|
|
23
|
+
import { edgesSpec } from "./implementations/edges.js";
|
|
24
|
+
import { thresholdSpec } from "./implementations/threshold.js";
|
|
25
|
+
import { radialBlurSpec } from "./implementations/radial-blur.js";
|
|
26
|
+
import { halftoneSpec } from "./implementations/halftone.js";
|
|
27
|
+
import { ditherSpec } from "./implementations/dither.js";
|
|
28
|
+
import { duotoneSpec } from "./implementations/duotone.js";
|
|
29
|
+
import { curvesSpec } from "./implementations/curves.js";
|
|
30
|
+
import { rgbShiftSpec } from "./implementations/rgb-shift.js";
|
|
31
|
+
import { scanlinesSpec } from "./implementations/scanlines.js";
|
|
32
|
+
import { blockDisplaceSpec } from "./implementations/block-displace.js";
|
|
33
|
+
import { bitCrushSpec } from "./implementations/bit-crush.js";
|
|
34
|
+
import { asciiSpec } from "./implementations/ascii.js";
|
|
35
|
+
import { oilPaintSpec } from "./implementations/oil-paint.js";
|
|
36
|
+
import { streakSpec } from "./implementations/streak.js";
|
|
37
|
+
import { glowSpec } from "./implementations/glow.js";
|
|
38
|
+
import { waveSpec } from "./implementations/wave.js";
|
|
39
|
+
import { twirlSpec } from "./implementations/twirl.js";
|
|
40
|
+
import { progressiveBlurSpec } from "./implementations/progressive-blur.js";
|
|
41
|
+
import { kaleidoscopeSpec } from "./implementations/kaleidoscope.js";
|
|
42
|
+
import { glassSpec } from "./implementations/glass.js";
|
|
43
|
+
import { normalizeUniforms } from "../shaders/uniforms.js";
|
|
4
44
|
import { resolveShaderProperties } from "../shaders/resolve.js";
|
|
5
|
-
const CENTER = { x: 0.5, y: 0.5 };
|
|
6
|
-
/**
|
|
7
|
-
* The ramp a glow starts with: white at the core falling to a warm amber.
|
|
8
|
-
*
|
|
9
|
-
* Copied rather than handed out, because unlike {@link CENTER} these are arrays
|
|
10
|
-
* — sharing one would let editing a single glow's ramp reach into every other
|
|
11
|
-
* glow ever built from the defaults.
|
|
12
|
-
*/
|
|
13
|
-
const GLOW_RAMP_COLORS = ["white", "#ffa640"];
|
|
14
|
-
const GLOW_RAMP_STOPS = [0, 1];
|
|
15
|
-
const ZERO = { x: 0, y: 0 };
|
|
16
|
-
/** Normalise {@link PixelateOptions.blocks} to a per-axis count. */
|
|
17
|
-
const toBlocks = (blocks) => typeof blocks === "number" ? { x: blocks, y: blocks } : blocks;
|
|
18
|
-
/**
|
|
19
|
-
* Normalise {@link WaveOptions.amplitude}. A bare number means the Y axis only —
|
|
20
|
-
* a wave that displaces along its own direction of travel just smears, so the
|
|
21
|
-
* transverse case is the one worth spelling `20` for.
|
|
22
|
-
*/
|
|
23
|
-
const toAmplitude = (value) => typeof value === "number" ? { x: 0, y: value } : value;
|
|
24
45
|
/**
|
|
25
46
|
* Immutable, chainable list of node effects.
|
|
26
47
|
*
|
|
@@ -46,16 +67,14 @@ export class EffectChain {
|
|
|
46
67
|
* node's own content.
|
|
47
68
|
*/
|
|
48
69
|
blur(options) {
|
|
49
|
-
|
|
50
|
-
return this.append(withEffectOptions({ type: "blur", radius: o.radius ?? 0 }, o));
|
|
70
|
+
return this.append(buildEffect(blurSpec, options));
|
|
51
71
|
}
|
|
52
72
|
/**
|
|
53
73
|
* Append a motion-blur-style directional (linear) blur, smearing the node's
|
|
54
74
|
* own content along a single axis (or the backdrop, with `{ mode: "backdrop" }`).
|
|
55
75
|
*/
|
|
56
76
|
directionalBlur(options) {
|
|
57
|
-
|
|
58
|
-
return this.append(withEffectOptions({ type: "directionalBlur", radius: o.radius ?? 0, angle: o.angle ?? 0 }, o));
|
|
77
|
+
return this.append(buildEffect(directionalBlurSpec, options));
|
|
59
78
|
}
|
|
60
79
|
/**
|
|
61
80
|
* Append an After Effects-style Mosaic / pixelate. `blocks` is the *number of
|
|
@@ -63,17 +82,11 @@ export class EffectChain {
|
|
|
63
82
|
* axis is pristine; lower is coarser), not a pixel block size.
|
|
64
83
|
*/
|
|
65
84
|
pixelate(options) {
|
|
66
|
-
|
|
67
|
-
return this.append(withEffectOptions({
|
|
68
|
-
type: "pixelate",
|
|
69
|
-
blocks: toBlocks(o.blocks ?? 1),
|
|
70
|
-
sharpColors: o.sharpColors ?? true,
|
|
71
|
-
}, o));
|
|
85
|
+
return this.append(buildEffect(pixelateSpec, options));
|
|
72
86
|
}
|
|
73
87
|
/** Append a grayscale effect. `{ mode: "backdrop" }` desaturates the backdrop. */
|
|
74
88
|
grayscale(options) {
|
|
75
|
-
|
|
76
|
-
return this.append(withEffectOptions({ type: "grayscale", amount: o.amount ?? 0 }, o));
|
|
89
|
+
return this.append(buildEffect(grayscaleSpec, options));
|
|
77
90
|
}
|
|
78
91
|
/**
|
|
79
92
|
* Append a bulge/pinch lens. A barrel distortion magnifies the centre and
|
|
@@ -83,8 +96,7 @@ export class EffectChain {
|
|
|
83
96
|
* node's own paint.
|
|
84
97
|
*/
|
|
85
98
|
bulge(options) {
|
|
86
|
-
|
|
87
|
-
return this.append(withEffectOptions({ type: "bulge", strength: o.strength ?? 0, center: o.center ?? CENTER }, o));
|
|
99
|
+
return this.append(buildEffect(bulgeSpec, options));
|
|
88
100
|
}
|
|
89
101
|
/**
|
|
90
102
|
* Append a magnify lens that magnifies the backdrop beneath the node. The lens
|
|
@@ -95,55 +107,43 @@ export class EffectChain {
|
|
|
95
107
|
* Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.
|
|
96
108
|
*/
|
|
97
109
|
magnify(options) {
|
|
98
|
-
|
|
99
|
-
return this.append(withEffectOptions({ type: "magnify", scale: o.scale ?? 2, center: o.center ?? CENTER }, { ...o, mode: o.mode ?? "backdrop" }));
|
|
110
|
+
return this.append(buildEffect(magnifySpec, options));
|
|
100
111
|
}
|
|
101
112
|
/**
|
|
102
113
|
* Append a bloom (glow) effect. Bright areas bleed soft light outward via a
|
|
103
114
|
* screen-blend of the blurred bright-pass onto the layer.
|
|
104
115
|
*/
|
|
105
116
|
bloom(options) {
|
|
106
|
-
|
|
107
|
-
return this.append(withEffectOptions({
|
|
108
|
-
type: "bloom",
|
|
109
|
-
threshold: o.threshold ?? 0.7,
|
|
110
|
-
radius: o.radius ?? 12,
|
|
111
|
-
intensity: o.intensity ?? 1,
|
|
112
|
-
}, o));
|
|
117
|
+
return this.append(buildEffect(bloomSpec, options));
|
|
113
118
|
}
|
|
114
119
|
/** Append a vintage / film-look colour grading effect. */
|
|
115
120
|
vintage(options) {
|
|
116
|
-
|
|
117
|
-
return this.append(withEffectOptions({ type: "vintage", amount: o.amount ?? 1, warmth: o.warmth ?? 0.2 }, o));
|
|
121
|
+
return this.append(buildEffect(vintageSpec, options));
|
|
118
122
|
}
|
|
119
123
|
/**
|
|
120
124
|
* Append a chromatic aberration effect — red/blue colour fringing that mimics
|
|
121
125
|
* lens dispersion.
|
|
122
126
|
*/
|
|
123
127
|
chromaticAberration(options) {
|
|
124
|
-
|
|
125
|
-
return this.append(withEffectOptions({ type: "chromaticAberration", amount: o.amount ?? 4, angle: o.angle ?? 0 }, o));
|
|
128
|
+
return this.append(buildEffect(chromaticAberrationSpec, options));
|
|
126
129
|
}
|
|
127
130
|
/** Append a colour-invert effect. */
|
|
128
131
|
invert(options) {
|
|
129
|
-
|
|
130
|
-
return this.append(withEffectOptions({ type: "invert", channel: o.channel ?? "rgba", strength: o.strength ?? 1 }, o));
|
|
132
|
+
return this.append(buildEffect(invertSpec, options));
|
|
131
133
|
}
|
|
132
134
|
/**
|
|
133
135
|
* Append a scatter effect — randomly jitters the node's own pixels, smearing
|
|
134
136
|
* its content like After Effects' Scatter.
|
|
135
137
|
*/
|
|
136
138
|
scatter(options) {
|
|
137
|
-
|
|
138
|
-
return this.append(withEffectOptions({ type: "scatter", strength: o.strength ?? 10, axis: o.axis ?? "both" }, o));
|
|
139
|
+
return this.append(buildEffect(scatterSpec, options));
|
|
139
140
|
}
|
|
140
141
|
/**
|
|
141
142
|
* Append an After Effects-style posterize effect — quantizes each colour
|
|
142
143
|
* channel into `levels` evenly-spaced bands, flattening gradients into steps.
|
|
143
144
|
*/
|
|
144
145
|
posterize(options) {
|
|
145
|
-
|
|
146
|
-
return this.append(withEffectOptions({ type: "posterize", levels: o.levels ?? 4 }, o));
|
|
146
|
+
return this.append(buildEffect(posterizeSpec, options));
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Append velocity-driven motion blur — smears the node's own content along its
|
|
@@ -151,15 +151,7 @@ export class EffectChain {
|
|
|
151
151
|
* Effects' shutter angle (`length`) and shutter phase (`alignment`).
|
|
152
152
|
*/
|
|
153
153
|
motionBlur(options) {
|
|
154
|
-
|
|
155
|
-
return this.append(withEffectOptions({
|
|
156
|
-
type: "motionBlur",
|
|
157
|
-
length: o.length ?? 50,
|
|
158
|
-
alignment: o.alignment ?? "centered",
|
|
159
|
-
samples: o.samples ?? 16,
|
|
160
|
-
strength: o.strength ?? 1,
|
|
161
|
-
axis: o.axis ?? "both",
|
|
162
|
-
}, o));
|
|
154
|
+
return this.append(buildEffect(motionBlurSpec, options));
|
|
163
155
|
}
|
|
164
156
|
/**
|
|
165
157
|
* Append an outline — a coloured band traced around the node's silhouette,
|
|
@@ -167,13 +159,7 @@ export class EffectChain {
|
|
|
167
159
|
* a geometry `stroke` can't follow.
|
|
168
160
|
*/
|
|
169
161
|
outline(options) {
|
|
170
|
-
|
|
171
|
-
return this.append(withEffectOptions({
|
|
172
|
-
type: "outline",
|
|
173
|
-
width: o.width ?? 4,
|
|
174
|
-
color: o.color ?? "black",
|
|
175
|
-
position: o.position ?? "outside",
|
|
176
|
-
}, o));
|
|
162
|
+
return this.append(buildEffect(outlineSpec, options));
|
|
177
163
|
}
|
|
178
164
|
/**
|
|
179
165
|
* Append a drop shadow cast from the node's **silhouette** — including alpha
|
|
@@ -181,15 +167,7 @@ export class EffectChain {
|
|
|
181
167
|
* `shadow` can't follow, since that one fills the node's path.
|
|
182
168
|
*/
|
|
183
169
|
dropShadow(options) {
|
|
184
|
-
|
|
185
|
-
return this.append(withEffectOptions({
|
|
186
|
-
type: "dropShadow",
|
|
187
|
-
offsetX: o.offsetX ?? 0,
|
|
188
|
-
offsetY: o.offsetY ?? -8,
|
|
189
|
-
blur: o.blur ?? 16,
|
|
190
|
-
spread: o.spread ?? 0,
|
|
191
|
-
color: o.color ?? "black",
|
|
192
|
-
}, o));
|
|
170
|
+
return this.append(buildEffect(dropShadowSpec, options));
|
|
193
171
|
}
|
|
194
172
|
/**
|
|
195
173
|
* Append a vignette — a soft tint ramping in toward the node's corners. The
|
|
@@ -197,14 +175,7 @@ export class EffectChain {
|
|
|
197
175
|
* short edges the way a lens would.
|
|
198
176
|
*/
|
|
199
177
|
vignette(options) {
|
|
200
|
-
|
|
201
|
-
return this.append(withEffectOptions({
|
|
202
|
-
type: "vignette",
|
|
203
|
-
amount: o.amount ?? 0.5,
|
|
204
|
-
radius: o.radius ?? 0.75,
|
|
205
|
-
softness: o.softness ?? 0.5,
|
|
206
|
-
color: o.color ?? "black",
|
|
207
|
-
}, o));
|
|
178
|
+
return this.append(buildEffect(vignetteSpec, options));
|
|
208
179
|
}
|
|
209
180
|
/**
|
|
210
181
|
* Append film grain. Static grain reads as texture rather than film, so pass
|
|
@@ -223,112 +194,63 @@ export class EffectChain {
|
|
|
223
194
|
* Effects.lut({ table, size: 33, amount: 0.6 })
|
|
224
195
|
*/
|
|
225
196
|
lut(options) {
|
|
226
|
-
return this.append(
|
|
227
|
-
type: "lut",
|
|
228
|
-
table: options.table,
|
|
229
|
-
size: options.size,
|
|
230
|
-
amount: options.amount ?? 1,
|
|
231
|
-
}, options));
|
|
197
|
+
return this.append(buildEffect(lutSpec, options));
|
|
232
198
|
}
|
|
233
199
|
grain(options) {
|
|
234
|
-
|
|
235
|
-
return this.append(withEffectOptions({
|
|
236
|
-
type: "grain",
|
|
237
|
-
amount: o.amount ?? 0.25,
|
|
238
|
-
size: o.size ?? 1,
|
|
239
|
-
seed: o.seed ?? 0,
|
|
240
|
-
animated: o.animated ?? false,
|
|
241
|
-
colored: o.colored ?? false,
|
|
242
|
-
}, o));
|
|
200
|
+
return this.append(buildEffect(grainSpec, options));
|
|
243
201
|
}
|
|
244
202
|
/** Append an unsharp-mask sharpen — local contrast boosted at `radius` scale. */
|
|
245
203
|
sharpen(options) {
|
|
246
|
-
|
|
247
|
-
return this.append(withEffectOptions({ type: "sharpen", amount: o.amount ?? 1, radius: o.radius ?? 1 }, o));
|
|
204
|
+
return this.append(buildEffect(sharpenSpec, options));
|
|
248
205
|
}
|
|
249
206
|
/**
|
|
250
207
|
* Append edge detection — flat areas go black and boundaries light up with
|
|
251
208
|
* the magnitude of the local gradient.
|
|
252
209
|
*/
|
|
253
210
|
edges(options) {
|
|
254
|
-
|
|
255
|
-
return this.append(withEffectOptions({
|
|
256
|
-
type: "edges",
|
|
257
|
-
strength: o.strength ?? 1,
|
|
258
|
-
kernel: o.kernel ?? "sobel",
|
|
259
|
-
colored: o.colored ?? false,
|
|
260
|
-
}, o));
|
|
211
|
+
return this.append(buildEffect(edgesSpec, options));
|
|
261
212
|
}
|
|
262
213
|
/**
|
|
263
214
|
* Append a luminance threshold — a two-tone stencil cut at `level`, with
|
|
264
215
|
* `smoothness` widening the cut into a ramp.
|
|
265
216
|
*/
|
|
266
217
|
threshold(options) {
|
|
267
|
-
|
|
268
|
-
return this.append(withEffectOptions({ type: "threshold", level: o.level ?? 0.5, smoothness: o.smoothness ?? 0.05 }, o));
|
|
218
|
+
return this.append(buildEffect(thresholdSpec, options));
|
|
269
219
|
}
|
|
270
220
|
/**
|
|
271
221
|
* Append a radial blur — samples smeared along the radius (`'zoom'`, the
|
|
272
222
|
* default) or the tangent (`'spin'`) about `center`, leaving the centre sharp.
|
|
273
223
|
*/
|
|
274
224
|
radialBlur(options) {
|
|
275
|
-
|
|
276
|
-
return this.append(withEffectOptions({
|
|
277
|
-
type: "radialBlur",
|
|
278
|
-
amount: o.amount ?? 0.5,
|
|
279
|
-
style: o.style ?? "zoom",
|
|
280
|
-
center: o.center ?? CENTER,
|
|
281
|
-
samples: o.samples ?? 16,
|
|
282
|
-
}, o));
|
|
225
|
+
return this.append(buildEffect(radialBlurSpec, options));
|
|
283
226
|
}
|
|
284
227
|
/**
|
|
285
228
|
* Append a halftone screen — the newsprint look, where tone becomes the size
|
|
286
229
|
* of a mark on a rotated grid.
|
|
287
230
|
*/
|
|
288
231
|
halftone(options) {
|
|
289
|
-
|
|
290
|
-
return this.append(withEffectOptions({
|
|
291
|
-
type: "halftone",
|
|
292
|
-
size: o.size ?? 8,
|
|
293
|
-
angle: o.angle ?? 45,
|
|
294
|
-
shape: o.shape ?? "dot",
|
|
295
|
-
separation: o.separation ?? "mono",
|
|
296
|
-
}, o));
|
|
232
|
+
return this.append(buildEffect(halftoneSpec, options));
|
|
297
233
|
}
|
|
298
234
|
/**
|
|
299
235
|
* Append ordered (Bayer) dithering — quantization to `levels` tones per
|
|
300
236
|
* channel with the error traded for a retro crosshatch pattern.
|
|
301
237
|
*/
|
|
302
238
|
dither(options) {
|
|
303
|
-
|
|
304
|
-
return this.append(withEffectOptions({
|
|
305
|
-
type: "dither",
|
|
306
|
-
levels: o.levels ?? 2,
|
|
307
|
-
matrix: o.matrix ?? 4,
|
|
308
|
-
scale: o.scale ?? 1,
|
|
309
|
-
monochrome: o.monochrome ?? false,
|
|
310
|
-
noise: o.noise ?? "bayer",
|
|
311
|
-
}, o));
|
|
239
|
+
return this.append(buildEffect(ditherSpec, options));
|
|
312
240
|
}
|
|
313
241
|
/**
|
|
314
242
|
* Append a duotone / gradient map — the content's luminance remapped onto a
|
|
315
243
|
* `shadows` → `highlights` ramp, discarding its original chroma.
|
|
316
244
|
*/
|
|
317
245
|
duotone(options) {
|
|
318
|
-
|
|
319
|
-
return this.append(withEffectOptions({
|
|
320
|
-
type: "duotone",
|
|
321
|
-
amount: o.amount ?? 1,
|
|
322
|
-
shadows: o.shadows ?? "black",
|
|
323
|
-
highlights: o.highlights ?? "white",
|
|
324
|
-
}, o));
|
|
246
|
+
return this.append(buildEffect(duotoneSpec, options));
|
|
325
247
|
}
|
|
326
248
|
/**
|
|
327
249
|
* Append a tone curve — the same adjustment `Adjustments.curves` applies to a
|
|
328
250
|
* photo, on any node.
|
|
329
251
|
*/
|
|
330
252
|
curves(options) {
|
|
331
|
-
return this.append(
|
|
253
|
+
return this.append(buildEffect(curvesSpec, options));
|
|
332
254
|
}
|
|
333
255
|
/**
|
|
334
256
|
* Append photographic grading (brightness / contrast / saturation / vibrance /
|
|
@@ -350,56 +272,33 @@ export class EffectChain {
|
|
|
350
272
|
*/
|
|
351
273
|
rgbShift(options) {
|
|
352
274
|
const o = scalarOptions(options, "amount");
|
|
353
|
-
const spread = o.amount
|
|
354
|
-
return this.append(
|
|
355
|
-
|
|
275
|
+
const spread = o.amount;
|
|
276
|
+
return this.append(buildEffect(rgbShiftSpec, spread === undefined ? o : {
|
|
277
|
+
...o,
|
|
356
278
|
red: o.red ?? { x: spread, y: 0 },
|
|
357
|
-
green: o.green ?? ZERO,
|
|
358
279
|
blue: o.blue ?? { x: -spread, y: 0 },
|
|
359
|
-
}
|
|
280
|
+
}));
|
|
360
281
|
}
|
|
361
282
|
/**
|
|
362
283
|
* Append CRT scanlines. Animate `offset` past `spacing` to roll the bands;
|
|
363
284
|
* the pattern wraps, so a linear tween loops seamlessly.
|
|
364
285
|
*/
|
|
365
286
|
scanlines(options) {
|
|
366
|
-
|
|
367
|
-
return this.append(withEffectOptions({
|
|
368
|
-
type: "scanlines",
|
|
369
|
-
spacing: o.spacing ?? 4,
|
|
370
|
-
thickness: o.thickness ?? 0.5,
|
|
371
|
-
darkness: o.darkness ?? 0.5,
|
|
372
|
-
offset: o.offset ?? 0,
|
|
373
|
-
angle: o.angle ?? 0,
|
|
374
|
-
}, o));
|
|
287
|
+
return this.append(buildEffect(scanlinesSpec, options));
|
|
375
288
|
}
|
|
376
289
|
/**
|
|
377
290
|
* Append datamosh-style band tearing. Step `seed` in whole numbers to jump
|
|
378
291
|
* between distinct glitch states rather than sliding between them.
|
|
379
292
|
*/
|
|
380
293
|
blockDisplace(options) {
|
|
381
|
-
|
|
382
|
-
return this.append(withEffectOptions({
|
|
383
|
-
type: "blockDisplace",
|
|
384
|
-
amount: o.amount ?? 20,
|
|
385
|
-
size: o.size ?? 16,
|
|
386
|
-
density: o.density ?? 0.3,
|
|
387
|
-
seed: o.seed ?? 0,
|
|
388
|
-
axis: o.axis ?? "x",
|
|
389
|
-
}, o));
|
|
294
|
+
return this.append(buildEffect(blockDisplaceSpec, options));
|
|
390
295
|
}
|
|
391
296
|
/**
|
|
392
297
|
* Append colour-depth reduction — `bits` per channel, or a fixed hardware
|
|
393
298
|
* palette. Pair with {@link EffectChain.dither} so gradients survive the cut.
|
|
394
299
|
*/
|
|
395
300
|
bitCrush(options) {
|
|
396
|
-
|
|
397
|
-
return this.append(withEffectOptions({
|
|
398
|
-
type: "bitCrush",
|
|
399
|
-
bits: o.bits ?? 3,
|
|
400
|
-
palette: o.palette ?? "none",
|
|
401
|
-
amount: o.amount ?? 1,
|
|
402
|
-
}, o));
|
|
301
|
+
return this.append(buildEffect(bitCrushSpec, options));
|
|
403
302
|
}
|
|
404
303
|
/**
|
|
405
304
|
* Append ASCII art — the content divided into a grid of cells, each cell's
|
|
@@ -409,16 +308,7 @@ export class EffectChain {
|
|
|
409
308
|
* the node instead of over a solid field.
|
|
410
309
|
*/
|
|
411
310
|
ascii(options) {
|
|
412
|
-
|
|
413
|
-
return this.append(withEffectOptions({
|
|
414
|
-
type: "ascii",
|
|
415
|
-
size: o.size ?? 12,
|
|
416
|
-
charset: o.charset ?? "standard",
|
|
417
|
-
fontFamily: o.fontFamily ?? "monospace",
|
|
418
|
-
ink: o.ink ?? "white",
|
|
419
|
-
background: o.background ?? "black",
|
|
420
|
-
colored: o.colored ?? false,
|
|
421
|
-
}, o));
|
|
311
|
+
return this.append(buildEffect(asciiSpec, options));
|
|
422
312
|
}
|
|
423
313
|
/**
|
|
424
314
|
* Append Kuwahara brushwork — averages within a region but never across an
|
|
@@ -426,8 +316,7 @@ export class EffectChain {
|
|
|
426
316
|
* By some margin the most expensive effect in the set; keep `radius` small.
|
|
427
317
|
*/
|
|
428
318
|
oilPaint(options) {
|
|
429
|
-
|
|
430
|
-
return this.append(withEffectOptions({ type: "oilPaint", radius: o.radius ?? 3 }, o));
|
|
319
|
+
return this.append(buildEffect(oilPaintSpec, options));
|
|
431
320
|
}
|
|
432
321
|
/**
|
|
433
322
|
* Append an anamorphic streak — a bright pass smeared along one axis and
|
|
@@ -435,14 +324,7 @@ export class EffectChain {
|
|
|
435
324
|
* direction; this spreads it in one.
|
|
436
325
|
*/
|
|
437
326
|
streak(options) {
|
|
438
|
-
|
|
439
|
-
return this.append(withEffectOptions({
|
|
440
|
-
type: "streak",
|
|
441
|
-
intensity: o.intensity ?? 1,
|
|
442
|
-
threshold: o.threshold ?? 0.7,
|
|
443
|
-
length: o.length ?? 120,
|
|
444
|
-
angle: o.angle ?? 0,
|
|
445
|
-
}, o));
|
|
327
|
+
return this.append(buildEffect(streakSpec, options));
|
|
446
328
|
}
|
|
447
329
|
/**
|
|
448
330
|
* Append a glow — the bright (or opaque) parts of the layer spread outward
|
|
@@ -454,30 +336,12 @@ export class EffectChain {
|
|
|
454
336
|
* `colors`/`stops` — which is what a heat, neon or aurora look needs.
|
|
455
337
|
*/
|
|
456
338
|
glow(options) {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
spread: o.spread ?? 0,
|
|
464
|
-
intensity: o.intensity ?? 1,
|
|
465
|
-
axis: o.axis ?? "both",
|
|
466
|
-
original: o.original ?? "behind",
|
|
467
|
-
blend: o.blend ?? "screen",
|
|
468
|
-
tint: o.tint ?? "none",
|
|
469
|
-
color: o.color ?? "white",
|
|
470
|
-
colors: o.colors ?? [...GLOW_RAMP_COLORS],
|
|
471
|
-
stops: o.stops ?? [...GLOW_RAMP_STOPS],
|
|
472
|
-
loopStyle: o.loopStyle ?? "mirror",
|
|
473
|
-
cycles: o.cycles ?? 1,
|
|
474
|
-
phase: o.phase ?? 0,
|
|
475
|
-
}, o));
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Append a custom SkSL shader. `mode` picks the layer it runs on — a
|
|
479
|
-
* foreground overlay blended with `blendMode`, or a backdrop shader that
|
|
480
|
-
* resamples `uniform shader u_backdrop`.
|
|
339
|
+
return this.append(buildEffect(glowSpec, options));
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Append a custom WGSL shader. `mode` picks the layer it runs on, which
|
|
343
|
+
* `sample_src` reads: the node's own layer, or what is painted beneath it
|
|
344
|
+
* (`'backdrop'`).
|
|
481
345
|
*/
|
|
482
346
|
shader(options) {
|
|
483
347
|
const pack = typeof options.source === "string" ? undefined : options.source;
|
|
@@ -486,8 +350,7 @@ export class EffectChain {
|
|
|
486
350
|
`("${pack.name}"). A fill shader has no backdrop to sample and is bound to a ` +
|
|
487
351
|
`shape's box; use Fills.shader.`);
|
|
488
352
|
}
|
|
489
|
-
// A pack
|
|
490
|
-
// it supplies the default — a caller may still say otherwise.
|
|
353
|
+
// A backdrop pack supplies the default; a caller may still say otherwise.
|
|
491
354
|
const mode = options.mode ?? (pack?.backdrop ? "backdrop" : "foreground");
|
|
492
355
|
const source = pack ? pack.source : options.source;
|
|
493
356
|
const uniforms = pack
|
|
@@ -496,53 +359,31 @@ export class EffectChain {
|
|
|
496
359
|
const base = {
|
|
497
360
|
type: "shader",
|
|
498
361
|
source,
|
|
362
|
+
language: "wgsl",
|
|
363
|
+
...(options.reach ? { reach: options.reach } : {}),
|
|
499
364
|
uniforms,
|
|
500
365
|
...(pack?.id !== undefined ? { shaderId: pack.id } : {}),
|
|
501
366
|
};
|
|
502
367
|
// blendMode only applies to the foreground overlay; leaving it undefined
|
|
503
368
|
// for a backdrop shader keeps `equals()` comparing like with like.
|
|
504
|
-
const effect = mode === "foreground"
|
|
505
|
-
? { ...base, blendMode: options.blendMode
|
|
369
|
+
const effect = mode === "foreground" && options.blendMode
|
|
370
|
+
? { ...base, blendMode: options.blendMode }
|
|
506
371
|
: base;
|
|
507
372
|
return this.append(withEffectOptions(effect, { mode }));
|
|
508
373
|
}
|
|
509
|
-
/**
|
|
510
|
-
* @deprecated Use {@link EffectChain.shader}. `sksl` named the dialect; the
|
|
511
|
-
* effect is named for the paint it is the sibling of. Takes the source in
|
|
512
|
-
* `shader` rather than `source`, as it always did.
|
|
513
|
-
*/
|
|
514
|
-
sksl(options) {
|
|
515
|
-
const { shader, ...rest } = options;
|
|
516
|
-
return this.shader({ ...rest, source: shader });
|
|
517
|
-
}
|
|
518
374
|
/**
|
|
519
375
|
* Append a sine warp. Tween `phase` over 360 to make the wave travel — it
|
|
520
376
|
* wraps, so a linear tween loops seamlessly.
|
|
521
377
|
*/
|
|
522
378
|
wave(options) {
|
|
523
|
-
|
|
524
|
-
return this.append(withEffectOptions({
|
|
525
|
-
type: "wave",
|
|
526
|
-
amplitude: toAmplitude(o.amplitude ?? 20),
|
|
527
|
-
wavelength: o.wavelength ?? 120,
|
|
528
|
-
phase: o.phase ?? 0,
|
|
529
|
-
shape: o.shape ?? "linear",
|
|
530
|
-
angle: o.angle ?? 0,
|
|
531
|
-
center: o.center ?? CENTER,
|
|
532
|
-
}, o));
|
|
379
|
+
return this.append(buildEffect(waveSpec, options));
|
|
533
380
|
}
|
|
534
381
|
/**
|
|
535
382
|
* Append a twirl / swirl vortex — a rotation about `center` that falls off
|
|
536
383
|
* with distance, so the middle spins while the rim stays pinned.
|
|
537
384
|
*/
|
|
538
385
|
twirl(options) {
|
|
539
|
-
|
|
540
|
-
return this.append(withEffectOptions({
|
|
541
|
-
type: "twirl",
|
|
542
|
-
angle: o.angle ?? 180,
|
|
543
|
-
radius: o.radius ?? 1,
|
|
544
|
-
center: o.center ?? CENTER,
|
|
545
|
-
}, o));
|
|
386
|
+
return this.append(buildEffect(twirlSpec, options));
|
|
546
387
|
}
|
|
547
388
|
/**
|
|
548
389
|
* Append a blur whose radius ramps across the node rather than being
|
|
@@ -550,20 +391,7 @@ export class EffectChain {
|
|
|
550
391
|
* fades out instead of ending at a hard edge.
|
|
551
392
|
*/
|
|
552
393
|
progressiveBlur(options) {
|
|
553
|
-
|
|
554
|
-
return this.append(withEffectOptions({
|
|
555
|
-
type: "progressiveBlur",
|
|
556
|
-
radius: o.radius ?? 24,
|
|
557
|
-
// Sharp at the near end unless asked otherwise — what this
|
|
558
|
-
// effect did before the field existed.
|
|
559
|
-
startRadius: o.startRadius ?? 0,
|
|
560
|
-
shape: o.shape ?? "linear",
|
|
561
|
-
start: o.start ?? 0,
|
|
562
|
-
end: o.end ?? 1,
|
|
563
|
-
angle: o.angle ?? 90,
|
|
564
|
-
center: o.center ?? CENTER,
|
|
565
|
-
samples: o.samples ?? 20,
|
|
566
|
-
}, o));
|
|
394
|
+
return this.append(buildEffect(progressiveBlurSpec, options));
|
|
567
395
|
}
|
|
568
396
|
/**
|
|
569
397
|
* Append a kaleidoscope fold. Animating `angle` sweeps fresh source material
|
|
@@ -571,15 +399,7 @@ export class EffectChain {
|
|
|
571
399
|
* not what rotating the node does.
|
|
572
400
|
*/
|
|
573
401
|
kaleidoscope(options) {
|
|
574
|
-
|
|
575
|
-
return this.append(withEffectOptions({
|
|
576
|
-
type: "kaleidoscope",
|
|
577
|
-
segments: Math.round(o.segments ?? 6),
|
|
578
|
-
angle: o.angle ?? 0,
|
|
579
|
-
center: o.center ?? CENTER,
|
|
580
|
-
offset: o.offset ?? 0,
|
|
581
|
-
amount: o.amount ?? 1,
|
|
582
|
-
}, o));
|
|
402
|
+
return this.append(buildEffect(kaleidoscopeSpec, options));
|
|
583
403
|
}
|
|
584
404
|
/**
|
|
585
405
|
* Append Figma's Glass — the backdrop refracted, dispersed and frosted
|
|
@@ -593,17 +413,7 @@ export class EffectChain {
|
|
|
593
413
|
* Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.
|
|
594
414
|
*/
|
|
595
415
|
glass(options) {
|
|
596
|
-
|
|
597
|
-
return this.append(withEffectOptions({
|
|
598
|
-
type: "glass",
|
|
599
|
-
lightAngle: o.lightAngle ?? -45,
|
|
600
|
-
lightIntensity: o.lightIntensity ?? 80,
|
|
601
|
-
refraction: o.refraction ?? 80,
|
|
602
|
-
depth: o.depth ?? 20,
|
|
603
|
-
dispersion: o.dispersion ?? 50,
|
|
604
|
-
frost: o.frost ?? 4,
|
|
605
|
-
splay: o.splay ?? 0,
|
|
606
|
-
}, { ...o, mode: o.mode ?? "backdrop" }));
|
|
416
|
+
return this.append(buildEffect(glassSpec, options));
|
|
607
417
|
}
|
|
608
418
|
/** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */
|
|
609
419
|
*[Symbol.iterator]() {
|