@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,109 +1,97 @@
|
|
|
1
|
-
import { blurEffect } from "./implementations/blur.js";
|
|
2
|
-
import { directionalBlurEffect } from "./implementations/directional-blur.js";
|
|
3
|
-
import { grayscaleEffect } from "./implementations/grayscale.js";
|
|
4
|
-
import { pixelateEffect } from "./implementations/pixelate.js";
|
|
5
|
-
import { bulgeEffect } from "./implementations/bulge.js";
|
|
6
|
-
import { magnifyEffect } from "./implementations/magnify.js";
|
|
7
|
-
import { bloomEffect } from "./implementations/bloom.js";
|
|
8
|
-
import { vintageEffect } from "./implementations/vintage.js";
|
|
9
|
-
import { chromaticAberrationEffect } from "./implementations/chromatic-aberration.js";
|
|
10
|
-
import { invertEffect } from "./implementations/invert.js";
|
|
11
|
-
import { scatterEffect } from "./implementations/scatter.js";
|
|
12
|
-
import { posterizeEffect } from "./implementations/posterize.js";
|
|
13
|
-
import { motionBlurEffect } from "./implementations/motion-blur.js";
|
|
14
|
-
import { shaderEffect } from "./implementations/shader.js";
|
|
15
|
-
import { outlineEffect } from "./implementations/outline.js";
|
|
16
|
-
import { dropShadowEffect } from "./implementations/drop-shadow.js";
|
|
17
|
-
import { vignetteEffect } from "./implementations/vignette.js";
|
|
18
|
-
import { grainEffect } from "./implementations/grain.js";
|
|
19
|
-
import { sharpenEffect } from "./implementations/sharpen.js";
|
|
20
|
-
import { edgesEffect } from "./implementations/edges.js";
|
|
21
|
-
import { thresholdEffect } from "./implementations/threshold.js";
|
|
22
|
-
import { radialBlurEffect } from "./implementations/radial-blur.js";
|
|
23
|
-
import { halftoneEffect } from "./implementations/halftone.js";
|
|
24
|
-
import { ditherEffect } from "./implementations/dither.js";
|
|
25
|
-
import { duotoneEffect } from "./implementations/duotone.js";
|
|
26
|
-
import { curvesEffect } from "./implementations/curves.js";
|
|
27
|
-
import { colorAdjustmentEffect } from "./implementations/color-adjustment.js";
|
|
28
|
-
import { rgbShiftEffect } from "./implementations/rgb-shift.js";
|
|
29
|
-
import { scanlinesEffect } from "./implementations/scanlines.js";
|
|
30
|
-
import { blockDisplaceEffect } from "./implementations/block-displace.js";
|
|
31
|
-
import { bitCrushEffect } from "./implementations/bit-crush.js";
|
|
32
|
-
import { asciiEffect } from "./implementations/ascii.js";
|
|
33
|
-
import { streakEffect } from "./implementations/streak.js";
|
|
34
|
-
import { glowEffect } from "./implementations/glow.js";
|
|
35
|
-
import { oilPaintEffect } from "./implementations/oil-paint.js";
|
|
36
|
-
import { waveEffect } from "./implementations/wave.js";
|
|
37
|
-
import { twirlEffect } from "./implementations/twirl.js";
|
|
38
|
-
import { progressiveBlurEffect } from "./implementations/progressive-blur.js";
|
|
39
|
-
import { kaleidoscopeEffect } from "./implementations/kaleidoscope.js";
|
|
40
|
-
import { glassEffect } from "./implementations/glass.js";
|
|
41
|
-
import { lutEffect } from "./implementations/lut.js";
|
|
1
|
+
import { blurEffect, blurSpec } from "./implementations/blur.js";
|
|
2
|
+
import { directionalBlurEffect, directionalBlurSpec } from "./implementations/directional-blur.js";
|
|
3
|
+
import { grayscaleEffect, grayscaleSpec } from "./implementations/grayscale.js";
|
|
4
|
+
import { pixelateEffect, pixelateSpec } from "./implementations/pixelate.js";
|
|
5
|
+
import { bulgeEffect, bulgeSpec } from "./implementations/bulge.js";
|
|
6
|
+
import { magnifyEffect, magnifySpec } from "./implementations/magnify.js";
|
|
7
|
+
import { bloomEffect, bloomSpec } from "./implementations/bloom.js";
|
|
8
|
+
import { vintageEffect, vintageSpec } from "./implementations/vintage.js";
|
|
9
|
+
import { chromaticAberrationEffect, chromaticAberrationSpec } from "./implementations/chromatic-aberration.js";
|
|
10
|
+
import { invertEffect, invertSpec } from "./implementations/invert.js";
|
|
11
|
+
import { scatterEffect, scatterSpec } from "./implementations/scatter.js";
|
|
12
|
+
import { posterizeEffect, posterizeSpec } from "./implementations/posterize.js";
|
|
13
|
+
import { motionBlurEffect, motionBlurSpec } from "./implementations/motion-blur.js";
|
|
14
|
+
import { shaderEffect, shaderSpec } from "./implementations/shader.js";
|
|
15
|
+
import { outlineEffect, outlineSpec } from "./implementations/outline.js";
|
|
16
|
+
import { dropShadowEffect, dropShadowSpec } from "./implementations/drop-shadow.js";
|
|
17
|
+
import { vignetteEffect, vignetteSpec } from "./implementations/vignette.js";
|
|
18
|
+
import { grainEffect, grainSpec } from "./implementations/grain.js";
|
|
19
|
+
import { sharpenEffect, sharpenSpec } from "./implementations/sharpen.js";
|
|
20
|
+
import { edgesEffect, edgesSpec } from "./implementations/edges.js";
|
|
21
|
+
import { thresholdEffect, thresholdSpec } from "./implementations/threshold.js";
|
|
22
|
+
import { radialBlurEffect, radialBlurSpec } from "./implementations/radial-blur.js";
|
|
23
|
+
import { halftoneEffect, halftoneSpec } from "./implementations/halftone.js";
|
|
24
|
+
import { ditherEffect, ditherSpec } from "./implementations/dither.js";
|
|
25
|
+
import { duotoneEffect, duotoneSpec } from "./implementations/duotone.js";
|
|
26
|
+
import { curvesEffect, curvesSpec } from "./implementations/curves.js";
|
|
27
|
+
import { colorAdjustmentEffect, colorAdjustmentSpec } from "./implementations/color-adjustment.js";
|
|
28
|
+
import { rgbShiftEffect, rgbShiftSpec } from "./implementations/rgb-shift.js";
|
|
29
|
+
import { scanlinesEffect, scanlinesSpec } from "./implementations/scanlines.js";
|
|
30
|
+
import { blockDisplaceEffect, blockDisplaceSpec } from "./implementations/block-displace.js";
|
|
31
|
+
import { bitCrushEffect, bitCrushSpec } from "./implementations/bit-crush.js";
|
|
32
|
+
import { asciiEffect, asciiSpec } from "./implementations/ascii.js";
|
|
33
|
+
import { streakEffect, streakSpec } from "./implementations/streak.js";
|
|
34
|
+
import { glowEffect, glowSpec } from "./implementations/glow.js";
|
|
35
|
+
import { oilPaintEffect, oilPaintSpec } from "./implementations/oil-paint.js";
|
|
36
|
+
import { waveEffect, waveSpec } from "./implementations/wave.js";
|
|
37
|
+
import { twirlEffect, twirlSpec } from "./implementations/twirl.js";
|
|
38
|
+
import { progressiveBlurEffect, progressiveBlurSpec } from "./implementations/progressive-blur.js";
|
|
39
|
+
import { kaleidoscopeEffect, kaleidoscopeSpec } from "./implementations/kaleidoscope.js";
|
|
40
|
+
import { glassEffect, glassSpec } from "./implementations/glass.js";
|
|
41
|
+
import { lutEffect, lutSpec } from "./implementations/lut.js";
|
|
42
42
|
import { EFFECT_OPTION_KEYS } from "./effect-data.js";
|
|
43
|
-
|
|
44
|
-
["blur", blurEffect],
|
|
45
|
-
["directionalBlur", directionalBlurEffect],
|
|
46
|
-
["grayscale", grayscaleEffect],
|
|
47
|
-
["pixelate", pixelateEffect],
|
|
48
|
-
["bulge", bulgeEffect],
|
|
49
|
-
["magnify", magnifyEffect],
|
|
50
|
-
["bloom", bloomEffect],
|
|
51
|
-
["vintage", vintageEffect],
|
|
52
|
-
["chromaticAberration", chromaticAberrationEffect],
|
|
53
|
-
["invert", invertEffect],
|
|
54
|
-
["scatter", scatterEffect],
|
|
55
|
-
["posterize", posterizeEffect],
|
|
56
|
-
["motionBlur", motionBlurEffect],
|
|
57
|
-
["shader", shaderEffect],
|
|
58
|
-
["outline", outlineEffect],
|
|
59
|
-
["dropShadow", dropShadowEffect],
|
|
60
|
-
["vignette", vignetteEffect],
|
|
61
|
-
["grain", grainEffect],
|
|
62
|
-
["sharpen", sharpenEffect],
|
|
63
|
-
["edges", edgesEffect],
|
|
64
|
-
["threshold", thresholdEffect],
|
|
65
|
-
["radialBlur", radialBlurEffect],
|
|
66
|
-
["halftone", halftoneEffect],
|
|
67
|
-
["dither", ditherEffect],
|
|
68
|
-
["duotone", duotoneEffect],
|
|
69
|
-
["curves", curvesEffect],
|
|
70
|
-
["colorAdjustment", colorAdjustmentEffect],
|
|
71
|
-
["rgbShift", rgbShiftEffect],
|
|
72
|
-
["scanlines", scanlinesEffect],
|
|
73
|
-
["blockDisplace", blockDisplaceEffect],
|
|
74
|
-
["bitCrush", bitCrushEffect],
|
|
75
|
-
["ascii", asciiEffect],
|
|
76
|
-
["streak", streakEffect],
|
|
77
|
-
["glow", glowEffect],
|
|
78
|
-
["oilPaint", oilPaintEffect],
|
|
79
|
-
["wave", waveEffect],
|
|
80
|
-
["twirl", twirlEffect],
|
|
81
|
-
["progressiveBlur", progressiveBlurEffect],
|
|
82
|
-
["kaleidoscope", kaleidoscopeEffect],
|
|
83
|
-
["glass", glassEffect],
|
|
84
|
-
["lut", lutEffect],
|
|
85
|
-
]);
|
|
43
|
+
import { describeSpec } from "./spec.js";
|
|
86
44
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* Deliberately a second map rather than extra rows in {@link EFFECTS}: an alias
|
|
90
|
-
* is not a type, and putting it there would grow `effectTypes()` a phantom
|
|
91
|
-
* entry that the roster sweeps in the contract tests would then demand a neutral
|
|
92
|
-
* and a handler for. A document naming an alias is rewritten to the current key
|
|
93
|
-
* by that type's `resolve`, so the alias only has to survive long enough for
|
|
94
|
-
* that to happen.
|
|
45
|
+
* Every built-in effect: its spec (the parameters a host and the renderers
|
|
46
|
+
* read) and the `EffectData` derived from it, in registration order.
|
|
95
47
|
*/
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
[
|
|
99
|
-
]
|
|
100
|
-
|
|
48
|
+
const BUILT_INS = [
|
|
49
|
+
[blurSpec, blurEffect],
|
|
50
|
+
[directionalBlurSpec, directionalBlurEffect],
|
|
51
|
+
[grayscaleSpec, grayscaleEffect],
|
|
52
|
+
[pixelateSpec, pixelateEffect],
|
|
53
|
+
[bulgeSpec, bulgeEffect],
|
|
54
|
+
[magnifySpec, magnifyEffect],
|
|
55
|
+
[bloomSpec, bloomEffect],
|
|
56
|
+
[vintageSpec, vintageEffect],
|
|
57
|
+
[chromaticAberrationSpec, chromaticAberrationEffect],
|
|
58
|
+
[invertSpec, invertEffect],
|
|
59
|
+
[scatterSpec, scatterEffect],
|
|
60
|
+
[posterizeSpec, posterizeEffect],
|
|
61
|
+
[motionBlurSpec, motionBlurEffect],
|
|
62
|
+
[shaderSpec, shaderEffect],
|
|
63
|
+
[outlineSpec, outlineEffect],
|
|
64
|
+
[dropShadowSpec, dropShadowEffect],
|
|
65
|
+
[vignetteSpec, vignetteEffect],
|
|
66
|
+
[grainSpec, grainEffect],
|
|
67
|
+
[sharpenSpec, sharpenEffect],
|
|
68
|
+
[edgesSpec, edgesEffect],
|
|
69
|
+
[thresholdSpec, thresholdEffect],
|
|
70
|
+
[radialBlurSpec, radialBlurEffect],
|
|
71
|
+
[halftoneSpec, halftoneEffect],
|
|
72
|
+
[ditherSpec, ditherEffect],
|
|
73
|
+
[duotoneSpec, duotoneEffect],
|
|
74
|
+
[curvesSpec, curvesEffect],
|
|
75
|
+
[colorAdjustmentSpec, colorAdjustmentEffect],
|
|
76
|
+
[rgbShiftSpec, rgbShiftEffect],
|
|
77
|
+
[scanlinesSpec, scanlinesEffect],
|
|
78
|
+
[blockDisplaceSpec, blockDisplaceEffect],
|
|
79
|
+
[bitCrushSpec, bitCrushEffect],
|
|
80
|
+
[asciiSpec, asciiEffect],
|
|
81
|
+
[streakSpec, streakEffect],
|
|
82
|
+
[glowSpec, glowEffect],
|
|
83
|
+
[oilPaintSpec, oilPaintEffect],
|
|
84
|
+
[waveSpec, waveEffect],
|
|
85
|
+
[twirlSpec, twirlEffect],
|
|
86
|
+
[progressiveBlurSpec, progressiveBlurEffect],
|
|
87
|
+
[kaleidoscopeSpec, kaleidoscopeEffect],
|
|
88
|
+
[glassSpec, glassEffect],
|
|
89
|
+
[lutSpec, lutEffect],
|
|
90
|
+
];
|
|
91
|
+
const EFFECTS = new Map(BUILT_INS.map(([spec, data]) => [spec.type, data]));
|
|
92
|
+
const SPECS = new Map(BUILT_INS.map(([spec]) => [spec.type, spec]));
|
|
101
93
|
function dataFor(type) {
|
|
102
|
-
|
|
103
|
-
if (direct)
|
|
104
|
-
return direct;
|
|
105
|
-
const alias = EFFECT_ALIASES.get(type);
|
|
106
|
-
return alias ? EFFECTS.get(alias) : undefined;
|
|
94
|
+
return EFFECTS.get(type);
|
|
107
95
|
}
|
|
108
96
|
/**
|
|
109
97
|
* Normalise one authored effect — see {@link EffectData.resolve}.
|
|
@@ -122,6 +110,29 @@ export function resolveEffect(effect) {
|
|
|
122
110
|
* hand-kept list that silently misses whatever was added last.
|
|
123
111
|
*/
|
|
124
112
|
export const effectTypes = () => [...EFFECTS.keys()];
|
|
113
|
+
/** The spec of a built-in effect type, or `undefined`. */
|
|
114
|
+
export function effectSpec(type) {
|
|
115
|
+
return SPECS.get(type);
|
|
116
|
+
}
|
|
117
|
+
const descriptors = new Map();
|
|
118
|
+
/**
|
|
119
|
+
* A built-in effect type described for a host — its fields' kinds, defaults,
|
|
120
|
+
* ranges and inspector hints, as plain JSON (see {@link EffectDescriptor}).
|
|
121
|
+
* `undefined` for a type core does not know.
|
|
122
|
+
*/
|
|
123
|
+
export function describeEffect(type) {
|
|
124
|
+
const spec = effectSpec(type);
|
|
125
|
+
if (!spec)
|
|
126
|
+
return undefined;
|
|
127
|
+
let out = descriptors.get(spec.type);
|
|
128
|
+
if (!out)
|
|
129
|
+
descriptors.set(spec.type, (out = describeSpec(spec)));
|
|
130
|
+
return structuredClone(out);
|
|
131
|
+
}
|
|
132
|
+
/** {@link describeEffect} for every built-in effect, in registration order. */
|
|
133
|
+
export function effectDescriptors() {
|
|
134
|
+
return [...SPECS.keys()].map((type) => describeEffect(type));
|
|
135
|
+
}
|
|
125
136
|
/** True when `type` has a registered `EffectData` handler. */
|
|
126
137
|
export function hasEffect(type) {
|
|
127
138
|
return dataFor(type) !== undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa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CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\r\n\r\nimport { blurEffect } from \"./implementations/blur\";\r\nimport { directionalBlurEffect } from \"./implementations/directional-blur\";\r\nimport { grayscaleEffect } from \"./implementations/grayscale\";\r\nimport { pixelateEffect } from \"./implementations/pixelate\";\r\nimport { bulgeEffect } from \"./implementations/bulge\";\r\nimport { magnifyEffect } from \"./implementations/magnify\";\r\nimport { bloomEffect } from \"./implementations/bloom\";\r\nimport { vintageEffect } from \"./implementations/vintage\";\r\nimport { chromaticAberrationEffect } from \"./implementations/chromatic-aberration\";\r\nimport { invertEffect } from \"./implementations/invert\";\r\nimport { scatterEffect } from \"./implementations/scatter\";\r\nimport { posterizeEffect } from \"./implementations/posterize\";\r\nimport { motionBlurEffect } from \"./implementations/motion-blur\";\r\nimport { shaderEffect } from \"./implementations/shader\";\r\nimport { outlineEffect } from \"./implementations/outline\";\r\nimport { dropShadowEffect } from \"./implementations/drop-shadow\";\r\nimport { vignetteEffect } from \"./implementations/vignette\";\r\nimport { grainEffect } from \"./implementations/grain\";\r\nimport { sharpenEffect } from \"./implementations/sharpen\";\r\nimport { edgesEffect } from \"./implementations/edges\";\r\nimport { thresholdEffect } from \"./implementations/threshold\";\r\nimport { radialBlurEffect } from \"./implementations/radial-blur\";\r\nimport { halftoneEffect } from \"./implementations/halftone\";\r\nimport { ditherEffect } from \"./implementations/dither\";\r\nimport { duotoneEffect } from \"./implementations/duotone\";\r\nimport { curvesEffect } from \"./implementations/curves\";\r\nimport { colorAdjustmentEffect } from \"./implementations/color-adjustment\";\r\nimport { rgbShiftEffect } from \"./implementations/rgb-shift\";\r\nimport { scanlinesEffect } from \"./implementations/scanlines\";\r\nimport { blockDisplaceEffect } from \"./implementations/block-displace\";\r\nimport { bitCrushEffect } from \"./implementations/bit-crush\";\r\nimport { asciiEffect } from \"./implementations/ascii\";\r\nimport { streakEffect } from \"./implementations/streak\";\r\nimport { glowEffect } from \"./implementations/glow\";\r\nimport { oilPaintEffect } from \"./implementations/oil-paint\";\r\nimport { waveEffect } from \"./implementations/wave\";\r\nimport { twirlEffect } from \"./implementations/twirl\";\r\nimport { progressiveBlurEffect } from \"./implementations/progressive-blur\";\r\nimport { kaleidoscopeEffect } from \"./implementations/kaleidoscope\";\r\nimport { glassEffect } from \"./implementations/glass\";\r\nimport { lutEffect } from \"./implementations/lut\";\r\nimport { EffectData, EffectSurface, EFFECT_OPTION_KEYS } from \"./effect-data\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\n\r\n\r\nconst EFFECTS = new Map<string, EffectData<NodeEffect>>([\r\n [\"blur\", blurEffect as EffectData<NodeEffect>],\r\n [\"directionalBlur\", directionalBlurEffect as EffectData<NodeEffect>],\r\n [\"grayscale\", grayscaleEffect as EffectData<NodeEffect>],\r\n [\"pixelate\", pixelateEffect as EffectData<NodeEffect>],\r\n [\"bulge\", bulgeEffect as EffectData<NodeEffect>],\r\n [\"magnify\", magnifyEffect as EffectData<NodeEffect>],\r\n [\"bloom\", bloomEffect as EffectData<NodeEffect>],\r\n [\"vintage\", vintageEffect as EffectData<NodeEffect>],\r\n [\"chromaticAberration\", chromaticAberrationEffect as EffectData<NodeEffect>],\r\n [\"invert\", invertEffect as EffectData<NodeEffect>],\r\n [\"scatter\", scatterEffect as EffectData<NodeEffect>],\r\n [\"posterize\", posterizeEffect as EffectData<NodeEffect>],\r\n [\"motionBlur\", motionBlurEffect as EffectData<NodeEffect>],\r\n [\"shader\", shaderEffect as EffectData<NodeEffect>],\r\n [\"outline\", outlineEffect as EffectData<NodeEffect>],\r\n [\"dropShadow\", dropShadowEffect as EffectData<NodeEffect>],\r\n [\"vignette\", vignetteEffect as EffectData<NodeEffect>],\r\n [\"grain\", grainEffect as EffectData<NodeEffect>],\r\n [\"sharpen\", sharpenEffect as EffectData<NodeEffect>],\r\n [\"edges\", edgesEffect as EffectData<NodeEffect>],\r\n [\"threshold\", thresholdEffect as EffectData<NodeEffect>],\r\n [\"radialBlur\", radialBlurEffect as EffectData<NodeEffect>],\r\n [\"halftone\", halftoneEffect as EffectData<NodeEffect>],\r\n [\"dither\", ditherEffect as EffectData<NodeEffect>],\r\n [\"duotone\", duotoneEffect as EffectData<NodeEffect>],\r\n [\"curves\", curvesEffect as EffectData<NodeEffect>],\r\n [\"colorAdjustment\", colorAdjustmentEffect as EffectData<NodeEffect>],\r\n [\"rgbShift\", rgbShiftEffect as EffectData<NodeEffect>],\r\n [\"scanlines\", scanlinesEffect as EffectData<NodeEffect>],\r\n [\"blockDisplace\", blockDisplaceEffect as EffectData<NodeEffect>],\r\n [\"bitCrush\", bitCrushEffect as EffectData<NodeEffect>],\r\n [\"ascii\", asciiEffect as EffectData<NodeEffect>],\r\n [\"streak\", streakEffect as EffectData<NodeEffect>],\r\n [\"glow\", glowEffect as EffectData<NodeEffect>],\r\n [\"oilPaint\", oilPaintEffect as EffectData<NodeEffect>],\r\n [\"wave\", waveEffect as EffectData<NodeEffect>],\r\n [\"twirl\", twirlEffect as EffectData<NodeEffect>],\r\n [\"progressiveBlur\", progressiveBlurEffect as EffectData<NodeEffect>],\r\n [\"kaleidoscope\", kaleidoscopeEffect as EffectData<NodeEffect>],\r\n [\"glass\", glassEffect as EffectData<NodeEffect>],\r\n [\"lut\", lutEffect as EffectData<NodeEffect>],\r\n]);\r\n\r\n/**\r\n * Older spellings of a type key, and what they mean now.\r\n *\r\n * Deliberately a second map rather than extra rows in {@link EFFECTS}: an alias\r\n * is not a type, and putting it there would grow `effectTypes()` a phantom\r\n * entry that the roster sweeps in the contract tests would then demand a neutral\r\n * and a handler for. A document naming an alias is rewritten to the current key\r\n * by that type's `resolve`, so the alias only has to survive long enough for\r\n * that to happen.\r\n */\r\nconst EFFECT_ALIASES = new Map<string, string>([\r\n // `sksl` named the dialect; `shader` names the paint it is the sibling of.\r\n [\"sksl\", \"shader\"],\r\n]);\r\n\r\n/** The data for `type`, following an alias if that is what it is. */\r\nfunction dataFor(type: string): EffectData<NodeEffect> | undefined {\r\n const direct = EFFECTS.get(type);\r\n if (direct) return direct;\r\n const alias = EFFECT_ALIASES.get(type);\r\n return alias ? EFFECTS.get(alias) : undefined;\r\n}\r\n\r\n/**\r\n * Normalise one authored effect — see {@link EffectData.resolve}.\r\n *\r\n * Returns the effect untouched when its type registers no `resolve`, which is\r\n * every effect but one.\r\n */\r\nexport function resolveEffect(effect: NodeEffect): NodeEffect {\r\n const data = dataFor(effect.type);\r\n return data?.resolve ? data.resolve(effect) : effect;\r\n}\r\n\r\n/**\r\n * Every registered effect type, in registration order.\r\n *\r\n * The roster itself, so a contract test can sweep the whole set rather than a\r\n * hand-kept list that silently misses whatever was added last.\r\n */\r\nexport const effectTypes = (): string[] => [...EFFECTS.keys()];\r\n\r\n/** True when `type` has a registered `EffectData` handler. */\r\nexport function hasEffect(type: string): boolean {\r\n return dataFor(type) !== undefined;\r\n}\r\n\r\n/**\r\n * How a backend must realise `effect` — see {@link EffectSurface}. Unknown types\r\n * fall back to `\"filter\"`, the composable default.\r\n */\r\nexport function effectSurface(effect: NodeEffect): EffectSurface {\r\n const surface = dataFor(effect.type)?.surface;\r\n if (surface === undefined) return \"filter\";\r\n return typeof surface === \"function\" ? surface(effect) : surface;\r\n}\r\n\r\nexport function declareEffect(effect: NodeEffect, assets: AssetScope): void {\r\n dataFor(effect.type)?.declare?.(effect, assets);\r\n}\r\n\r\n/**\r\n * Interpolates two effects of the same type.\r\n *\r\n * The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here\r\n * for every kind, switching at the midpoint like any non-interpolable value, so\r\n * an effect's own `lerp` only has to describe its parameters and a new option\r\n * cannot be dropped by one of 45 hand-written copies.\r\n *\r\n * @internal\r\n */\r\nexport function lerpEffect(from: NodeEffect, to: NodeEffect, t: number): NodeEffect {\r\n if (from.type !== to.type) return t < 0.5 ? from : to;\r\n const data = dataFor(from.type);\r\n if (!data) return t < 0.5 ? from : to;\r\n const lerped = data.lerp(from, to, t);\r\n const source = t < 0.5 ? from : to;\r\n let out: NodeEffect | undefined;\r\n for (const key of EFFECT_OPTION_KEYS) {\r\n if (lerped[key] === source[key]) continue;\r\n // Copy lazily, and omit rather than write `undefined`: the equality\r\n // checks compare these fields directly.\r\n out ??= { ...lerped } as NodeEffect;\r\n const target = out as unknown as Record<string, unknown>;\r\n if (source[key] === undefined) delete target[key];\r\n else target[key] = source[key];\r\n }\r\n return out ?? lerped;\r\n}\r\n\r\n/**\r\n * Do two effects describe the same look? The effect's own `equals` compares its\r\n * parameters; the type and the cross-cutting {@link EFFECT_OPTION_KEYS} are\r\n * compared here for every kind.\r\n *\r\n * @internal\r\n */\r\nexport function equalsEffect(a: NodeEffect, b: NodeEffect): boolean {\r\n if (a.type !== b.type) return false;\r\n if (EFFECT_OPTION_KEYS.some((key) => a[key] !== b[key])) return false;\r\n const data = dataFor(a.type);\r\n return data ? data.equals(a, b) : a === b;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO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,KAAK,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\r\n\r\nimport { blurEffect, blurSpec } from \"./implementations/blur\";\r\nimport { directionalBlurEffect, directionalBlurSpec } from \"./implementations/directional-blur\";\r\nimport { grayscaleEffect, grayscaleSpec } from \"./implementations/grayscale\";\r\nimport { pixelateEffect, pixelateSpec } from \"./implementations/pixelate\";\r\nimport { bulgeEffect, bulgeSpec } from \"./implementations/bulge\";\r\nimport { magnifyEffect, magnifySpec } from \"./implementations/magnify\";\r\nimport { bloomEffect, bloomSpec } from \"./implementations/bloom\";\r\nimport { vintageEffect, vintageSpec } from \"./implementations/vintage\";\r\nimport { chromaticAberrationEffect, chromaticAberrationSpec } from \"./implementations/chromatic-aberration\";\r\nimport { invertEffect, invertSpec } from \"./implementations/invert\";\r\nimport { scatterEffect, scatterSpec } from \"./implementations/scatter\";\r\nimport { posterizeEffect, posterizeSpec } from \"./implementations/posterize\";\r\nimport { motionBlurEffect, motionBlurSpec } from \"./implementations/motion-blur\";\r\nimport { shaderEffect, shaderSpec } from \"./implementations/shader\";\r\nimport { outlineEffect, outlineSpec } from \"./implementations/outline\";\r\nimport { dropShadowEffect, dropShadowSpec } from \"./implementations/drop-shadow\";\r\nimport { vignetteEffect, vignetteSpec } from \"./implementations/vignette\";\r\nimport { grainEffect, grainSpec } from \"./implementations/grain\";\r\nimport { sharpenEffect, sharpenSpec } from \"./implementations/sharpen\";\r\nimport { edgesEffect, edgesSpec } from \"./implementations/edges\";\r\nimport { thresholdEffect, thresholdSpec } from \"./implementations/threshold\";\r\nimport { radialBlurEffect, radialBlurSpec } from \"./implementations/radial-blur\";\r\nimport { halftoneEffect, halftoneSpec } from \"./implementations/halftone\";\r\nimport { ditherEffect, ditherSpec } from \"./implementations/dither\";\r\nimport { duotoneEffect, duotoneSpec } from \"./implementations/duotone\";\r\nimport { curvesEffect, curvesSpec } from \"./implementations/curves\";\r\nimport { colorAdjustmentEffect, colorAdjustmentSpec } from \"./implementations/color-adjustment\";\r\nimport { rgbShiftEffect, rgbShiftSpec } from \"./implementations/rgb-shift\";\r\nimport { scanlinesEffect, scanlinesSpec } from \"./implementations/scanlines\";\r\nimport { blockDisplaceEffect, blockDisplaceSpec } from \"./implementations/block-displace\";\r\nimport { bitCrushEffect, bitCrushSpec } from \"./implementations/bit-crush\";\r\nimport { asciiEffect, asciiSpec } from \"./implementations/ascii\";\r\nimport { streakEffect, streakSpec } from \"./implementations/streak\";\r\nimport { glowEffect, glowSpec } from \"./implementations/glow\";\r\nimport { oilPaintEffect, oilPaintSpec } from \"./implementations/oil-paint\";\r\nimport { waveEffect, waveSpec } from \"./implementations/wave\";\r\nimport { twirlEffect, twirlSpec } from \"./implementations/twirl\";\r\nimport { progressiveBlurEffect, progressiveBlurSpec } from \"./implementations/progressive-blur\";\r\nimport { kaleidoscopeEffect, kaleidoscopeSpec } from \"./implementations/kaleidoscope\";\r\nimport { glassEffect, glassSpec } from \"./implementations/glass\";\r\nimport { lutEffect, lutSpec } from \"./implementations/lut\";\r\nimport { EffectData, EffectSurface, EFFECT_OPTION_KEYS } from \"./effect-data\";\r\nimport { describeSpec, type EffectDescriptor, type EffectSpec } from \"./spec\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\n\r\n\r\n/**\r\n * Every built-in effect: its spec (the parameters a host and the renderers\r\n * read) and the `EffectData` derived from it, in registration order.\r\n */\r\nconst BUILT_INS: readonly (readonly [EffectSpec, EffectData<any>])[] = [\r\n [blurSpec, blurEffect],\r\n [directionalBlurSpec, directionalBlurEffect],\r\n [grayscaleSpec, grayscaleEffect],\r\n [pixelateSpec, pixelateEffect],\r\n [bulgeSpec, bulgeEffect],\r\n [magnifySpec, magnifyEffect],\r\n [bloomSpec, bloomEffect],\r\n [vintageSpec, vintageEffect],\r\n [chromaticAberrationSpec, chromaticAberrationEffect],\r\n [invertSpec, invertEffect],\r\n [scatterSpec, scatterEffect],\r\n [posterizeSpec, posterizeEffect],\r\n [motionBlurSpec, motionBlurEffect],\r\n [shaderSpec, shaderEffect],\r\n [outlineSpec, outlineEffect],\r\n [dropShadowSpec, dropShadowEffect],\r\n [vignetteSpec, vignetteEffect],\r\n [grainSpec, grainEffect],\r\n [sharpenSpec, sharpenEffect],\r\n [edgesSpec, edgesEffect],\r\n [thresholdSpec, thresholdEffect],\r\n [radialBlurSpec, radialBlurEffect],\r\n [halftoneSpec, halftoneEffect],\r\n [ditherSpec, ditherEffect],\r\n [duotoneSpec, duotoneEffect],\r\n [curvesSpec, curvesEffect],\r\n [colorAdjustmentSpec, colorAdjustmentEffect],\r\n [rgbShiftSpec, rgbShiftEffect],\r\n [scanlinesSpec, scanlinesEffect],\r\n [blockDisplaceSpec, blockDisplaceEffect],\r\n [bitCrushSpec, bitCrushEffect],\r\n [asciiSpec, asciiEffect],\r\n [streakSpec, streakEffect],\r\n [glowSpec, glowEffect],\r\n [oilPaintSpec, oilPaintEffect],\r\n [waveSpec, waveEffect],\r\n [twirlSpec, twirlEffect],\r\n [progressiveBlurSpec, progressiveBlurEffect],\r\n [kaleidoscopeSpec, kaleidoscopeEffect],\r\n [glassSpec, glassEffect],\r\n [lutSpec, lutEffect],\r\n];\r\n\r\nconst EFFECTS = new Map<string, EffectData<NodeEffect>>(BUILT_INS.map(([spec, data]) => [spec.type, data]));\r\nconst SPECS = new Map<string, EffectSpec>(BUILT_INS.map(([spec]) => [spec.type, spec]));\r\n\r\nfunction dataFor(type: string): EffectData<NodeEffect> | undefined {\r\n return EFFECTS.get(type);\r\n}\r\n\r\n/**\r\n * Normalise one authored effect — see {@link EffectData.resolve}.\r\n *\r\n * Returns the effect untouched when its type registers no `resolve`, which is\r\n * every effect but one.\r\n */\r\nexport function resolveEffect(effect: NodeEffect): NodeEffect {\r\n const data = dataFor(effect.type);\r\n return data?.resolve ? data.resolve(effect) : effect;\r\n}\r\n\r\n/**\r\n * Every registered effect type, in registration order.\r\n *\r\n * The roster itself, so a contract test can sweep the whole set rather than a\r\n * hand-kept list that silently misses whatever was added last.\r\n */\r\nexport const effectTypes = (): string[] => [...EFFECTS.keys()];\r\n\r\n/** The spec of a built-in effect type, or `undefined`. */\r\nexport function effectSpec(type: string): EffectSpec | undefined {\r\n return SPECS.get(type);\r\n}\r\n\r\nconst descriptors = new Map<string, EffectDescriptor>();\r\n\r\n/**\r\n * A built-in effect type described for a host — its fields' kinds, defaults,\r\n * ranges and inspector hints, as plain JSON (see {@link EffectDescriptor}).\r\n * `undefined` for a type core does not know.\r\n */\r\nexport function describeEffect(type: string): EffectDescriptor | undefined {\r\n const spec = effectSpec(type);\r\n if (!spec) return undefined;\r\n let out = descriptors.get(spec.type);\r\n if (!out) descriptors.set(spec.type, (out = describeSpec(spec)));\r\n return structuredClone(out);\r\n}\r\n\r\n/** {@link describeEffect} for every built-in effect, in registration order. */\r\nexport function effectDescriptors(): EffectDescriptor[] {\r\n return [...SPECS.keys()].map((type) => describeEffect(type)!);\r\n}\r\n\r\n/** True when `type` has a registered `EffectData` handler. */\r\nexport function hasEffect(type: string): boolean {\r\n return dataFor(type) !== undefined;\r\n}\r\n\r\n/**\r\n * How a backend must realise `effect` — see {@link EffectSurface}. Unknown types\r\n * fall back to `\"filter\"`, the composable default.\r\n */\r\nexport function effectSurface(effect: NodeEffect): EffectSurface {\r\n const surface = dataFor(effect.type)?.surface;\r\n if (surface === undefined) return \"filter\";\r\n return typeof surface === \"function\" ? surface(effect) : surface;\r\n}\r\n\r\nexport function declareEffect(effect: NodeEffect, assets: AssetScope): void {\r\n dataFor(effect.type)?.declare?.(effect, assets);\r\n}\r\n\r\n/**\r\n * Interpolates two effects of the same type.\r\n *\r\n * The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here\r\n * for every kind, switching at the midpoint like any non-interpolable value, so\r\n * an effect's own `lerp` only has to describe its parameters and a new option\r\n * cannot be dropped by one of 45 hand-written copies.\r\n *\r\n * @internal\r\n */\r\nexport function lerpEffect(from: NodeEffect, to: NodeEffect, t: number): NodeEffect {\r\n if (from.type !== to.type) return t < 0.5 ? from : to;\r\n const data = dataFor(from.type);\r\n if (!data) return t < 0.5 ? from : to;\r\n const lerped = data.lerp(from, to, t);\r\n const source = t < 0.5 ? from : to;\r\n let out: NodeEffect | undefined;\r\n for (const key of EFFECT_OPTION_KEYS) {\r\n if (lerped[key] === source[key]) continue;\r\n // Copy lazily, and omit rather than write `undefined`: the equality\r\n // checks compare these fields directly.\r\n out ??= { ...lerped } as NodeEffect;\r\n const target = out as unknown as Record<string, unknown>;\r\n if (source[key] === undefined) delete target[key];\r\n else target[key] = source[key];\r\n }\r\n return out ?? lerped;\r\n}\r\n\r\n/**\r\n * Do two effects describe the same look? The effect's own `equals` compares its\r\n * parameters; the type and the cross-cutting {@link EFFECT_OPTION_KEYS} are\r\n * compared here for every kind.\r\n *\r\n * @internal\r\n */\r\nexport function equalsEffect(a: NodeEffect, b: NodeEffect): boolean {\r\n if (a.type !== b.type) return false;\r\n if (EFFECT_OPTION_KEYS.some((key) => a[key] !== b[key])) return false;\r\n const data = dataFor(a.type);\r\n return data ? data.equals(a, b) : a === b;\r\n}\r\n"]}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { type Vector2 } from "../../../attributes/layout/vector2.js";
|
|
2
|
+
import type { Color } from "../../../attributes/shape/fill/color/parser.js";
|
|
3
|
+
import type { AssetScope } from "../../../assets/scope.js";
|
|
4
|
+
import type { EffectAxis, EffectData, EffectMode, EffectOptions, EffectSurface, ModedEffect } from "./effect-data.js";
|
|
5
|
+
/**
|
|
6
|
+
* How a parameter's value is shaped, which decides its default interpolation,
|
|
7
|
+
* equality and how a renderer encodes it into a uniform.
|
|
8
|
+
*/
|
|
9
|
+
export type EffectParamKind = "number" | "color" | "vec2" | "enum" | "boolean" | "axis" | "text" | "colors" | "numbers" | "points" | "table" | "uniforms";
|
|
10
|
+
/** What a number measures, for a host's units and a renderer's scaling. */
|
|
11
|
+
export type EffectParamUnit = "px" | "deg" | "percent" | "factor" | "normalized";
|
|
12
|
+
/** The picker family an effect is listed under. */
|
|
13
|
+
export type EffectGroup = "blur" | "light" | "color" | "stylize" | "distort" | "glitch";
|
|
14
|
+
/** The control an inspector should draw for a parameter. */
|
|
15
|
+
export type EffectParamControl = "number" | "slider" | "angle" | "hue" | "segmented" | "select" | "text" | "color" | "point" | "toggle";
|
|
16
|
+
/** Per-parameter inspector hints. None of them changes what the effect does. */
|
|
17
|
+
export interface EffectParamHints {
|
|
18
|
+
/** i18n leaf for the field's label; defaults to the parameter name. */
|
|
19
|
+
readonly label?: string;
|
|
20
|
+
readonly control?: EffectParamControl;
|
|
21
|
+
/** Shown on the effect's row beside its name (one per effect). */
|
|
22
|
+
readonly inline?: boolean;
|
|
23
|
+
/** Inspector position; defaults to the declaration order. */
|
|
24
|
+
readonly order?: number;
|
|
25
|
+
/** For an angle: where 0° points (the bearing turns clockwise). Defaults to `"right"`. */
|
|
26
|
+
readonly zero?: "right" | "top";
|
|
27
|
+
/** i18n group for an enum's option labels. */
|
|
28
|
+
readonly optionsLabel?: string;
|
|
29
|
+
/** Not offered as a field: the value a fresh effect carries is kept as is. */
|
|
30
|
+
readonly hidden?: boolean;
|
|
31
|
+
/** Where a freshly inserted effect starts, when the builder default would show nothing. */
|
|
32
|
+
readonly initial?: unknown;
|
|
33
|
+
}
|
|
34
|
+
/** Interpolates one parameter. `from`/`to` are the whole effects, for parameters that depend on a sibling. */
|
|
35
|
+
export type EffectParamLerp<T> = (a: T, b: T, t: number, from: Record<string, unknown>, to: Record<string, unknown>) => T;
|
|
36
|
+
/**
|
|
37
|
+
* One parameter of a built-in effect: a stored field of the effect object.
|
|
38
|
+
*
|
|
39
|
+
* `T` is the stored type, `In` what a builder accepts for it (`normalize` maps
|
|
40
|
+
* one to the other: a bare number for a per-axis count, say). Only the
|
|
41
|
+
* serialisable fields reach {@link EffectDescriptor}.
|
|
42
|
+
*/
|
|
43
|
+
export interface EffectParamDef<T = unknown, In = T> extends EffectParamHints {
|
|
44
|
+
readonly kind: EffectParamKind;
|
|
45
|
+
/** What the builder writes when the option is omitted (an input, before `normalize`). */
|
|
46
|
+
readonly default?: In;
|
|
47
|
+
/** The stored field may be absent (`colorAdjustment`'s fields, `curves.channel`). */
|
|
48
|
+
readonly optional?: boolean;
|
|
49
|
+
/** The builder's options type requires it. */
|
|
50
|
+
readonly required?: boolean;
|
|
51
|
+
readonly min?: number;
|
|
52
|
+
readonly max?: number;
|
|
53
|
+
readonly step?: number;
|
|
54
|
+
readonly unit?: EffectParamUnit;
|
|
55
|
+
/** An enum's values, in the order a renderer indexes them. */
|
|
56
|
+
readonly options?: readonly (string | number)[];
|
|
57
|
+
readonly normalize?: (input: In) => T;
|
|
58
|
+
/** `"step"` switches at the midpoint; omitted uses the kind's interpolation. */
|
|
59
|
+
readonly lerp?: "step" | EffectParamLerp<T>;
|
|
60
|
+
readonly equals?: (a: T, b: T) => boolean;
|
|
61
|
+
/** Type carrier only; never set. */
|
|
62
|
+
readonly __type?: [T, In];
|
|
63
|
+
}
|
|
64
|
+
/** An effect's parameters, by stored field name, in builder (and stored-key) order. */
|
|
65
|
+
export type EffectParamTable = Readonly<Record<string, EffectParamDef<any, any>>>;
|
|
66
|
+
/**
|
|
67
|
+
* The declarative definition of a built-in effect: its parameters (types,
|
|
68
|
+
* defaults, ranges, inspector hints) plus the behaviour that has to stay code.
|
|
69
|
+
* Core's types, builder defaults, `lerp`/`equals` and the host-facing
|
|
70
|
+
* {@link EffectDescriptor} are derived from it, and the renderers bind their
|
|
71
|
+
* shader uniforms to its parameter names.
|
|
72
|
+
*/
|
|
73
|
+
export interface EffectSpec<T extends string = string, P extends EffectParamTable = EffectParamTable> {
|
|
74
|
+
readonly type: T;
|
|
75
|
+
readonly params: P;
|
|
76
|
+
readonly group: EffectGroup;
|
|
77
|
+
/** The option a bare number passed to the builder sets. */
|
|
78
|
+
readonly scalar?: string;
|
|
79
|
+
/** The builder's `mode` when none is given. */
|
|
80
|
+
readonly defaultMode?: EffectMode;
|
|
81
|
+
/** The one layer the effect does anything on. */
|
|
82
|
+
readonly onlyOn?: EffectMode;
|
|
83
|
+
/** Builder options at which the effect draws nothing, or `null` when it has none. */
|
|
84
|
+
readonly neutral: Readonly<Record<string, unknown>> | null;
|
|
85
|
+
readonly surface?: EffectData<any>["surface"];
|
|
86
|
+
readonly resolve?: (effect: any) => any;
|
|
87
|
+
readonly declare?: (effect: any, assets: AssetScope) => void;
|
|
88
|
+
/** Wraps or replaces the derived interpolation, which it is handed as `derived`. */
|
|
89
|
+
readonly lerp?: (from: any, to: any, t: number, derived: (from: any, to: any, t: number) => any) => any;
|
|
90
|
+
readonly equals?: (a: any, b: any) => boolean;
|
|
91
|
+
}
|
|
92
|
+
type ParamValue<D> = D extends {
|
|
93
|
+
readonly __type?: [infer T, unknown];
|
|
94
|
+
} ? T : never;
|
|
95
|
+
type ParamInput<D> = D extends {
|
|
96
|
+
readonly __type?: [unknown, infer I];
|
|
97
|
+
} ? I : never;
|
|
98
|
+
type IsOptional<D> = D extends {
|
|
99
|
+
readonly optional: true;
|
|
100
|
+
} ? true : false;
|
|
101
|
+
type IsRequired<D> = D extends {
|
|
102
|
+
readonly required: true;
|
|
103
|
+
} ? true : false;
|
|
104
|
+
/** The stored fields an effect's parameters describe. */
|
|
105
|
+
export type EffectFields<P extends EffectParamTable> = {
|
|
106
|
+
-readonly [K in keyof P as IsOptional<P[K]> extends true ? never : K]: ParamValue<P[K]>;
|
|
107
|
+
} & {
|
|
108
|
+
-readonly [K in keyof P as IsOptional<P[K]> extends true ? K : never]?: ParamValue<P[K]>;
|
|
109
|
+
};
|
|
110
|
+
/** A builder's options for an effect: every parameter as input, plus `mode`/`clip`. */
|
|
111
|
+
export type EffectOptionsOf<P extends EffectParamTable> = {
|
|
112
|
+
-readonly [K in keyof P as IsRequired<P[K]> extends true ? K : never]: ParamInput<P[K]>;
|
|
113
|
+
} & {
|
|
114
|
+
-readonly [K in keyof P as IsRequired<P[K]> extends true ? never : K]?: ParamInput<P[K]>;
|
|
115
|
+
} & EffectOptions;
|
|
116
|
+
/** The effect object a spec describes. */
|
|
117
|
+
export type EffectOf<S extends EffectSpec> = {
|
|
118
|
+
type: S["type"];
|
|
119
|
+
} & ModedEffect & EffectFields<S["params"]>;
|
|
120
|
+
/** Declares a built-in effect; see {@link EffectSpec}. */
|
|
121
|
+
export declare function defineEffect<const T extends string, const P extends EffectParamTable>(spec: EffectSpec<T, P>): EffectSpec<T, P>;
|
|
122
|
+
/** The middle of the layer, every centre option's default. Shared, as it always was. */
|
|
123
|
+
export declare const CENTER: Vector2;
|
|
124
|
+
type Options<T, In = T> = Omit<EffectParamDef<T, In>, "kind" | "__type" | "options" | "normalize" | "lerp" | "equals">;
|
|
125
|
+
type Behaviour<T> = Pick<EffectParamDef<T>, "lerp" | "equals">;
|
|
126
|
+
/** Parameter constructors for {@link defineEffect}. */
|
|
127
|
+
export declare const param: {
|
|
128
|
+
number<const O extends Options<number>>(o: O & Behaviour<number> & {
|
|
129
|
+
normalize?: (input: number) => number;
|
|
130
|
+
}): EffectParamDef<number> & NoInfer<O> & {
|
|
131
|
+
kind: "number";
|
|
132
|
+
};
|
|
133
|
+
color<const O extends Options<Color>>(o: O & Behaviour<Color>): EffectParamDef<Color> & NoInfer<O> & {
|
|
134
|
+
kind: "color";
|
|
135
|
+
};
|
|
136
|
+
/** A point or per-axis pair. `fromNumber` lets the builder take a bare number for it. */
|
|
137
|
+
vec2<const O extends Options<Vector2, number | Vector2> & {
|
|
138
|
+
fromNumber?: "both" | "y";
|
|
139
|
+
}>(o: O & Behaviour<Vector2>): EffectParamDef<Vector2, O extends {
|
|
140
|
+
fromNumber: string;
|
|
141
|
+
} ? number | Vector2 : Vector2> & NoInfer<O> & {
|
|
142
|
+
kind: "vec2";
|
|
143
|
+
};
|
|
144
|
+
choice<const V extends string | number, const O extends Options<V>>(options: readonly V[], o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & {
|
|
145
|
+
kind: "enum";
|
|
146
|
+
options: readonly V[];
|
|
147
|
+
};
|
|
148
|
+
boolean<const O extends Options<boolean>>(o: O & Behaviour<boolean>): EffectParamDef<boolean> & NoInfer<O> & {
|
|
149
|
+
kind: "boolean";
|
|
150
|
+
};
|
|
151
|
+
axis<const O extends Options<EffectAxis>>(o: O & Behaviour<EffectAxis>): EffectParamDef<EffectAxis> & NoInfer<O> & {
|
|
152
|
+
kind: "axis";
|
|
153
|
+
};
|
|
154
|
+
text<V extends string = string, const O extends Options<V> = Options<V, V>>(o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & {
|
|
155
|
+
kind: "text";
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* A parameter of stored type `T` that no generic kind covers, curried so
|
|
159
|
+
* `T` is given and the options inferred: `param.of<Color[]>()({ kind: "colors", … })`.
|
|
160
|
+
* It steps and compares by `===` unless given `lerp`/`equals`.
|
|
161
|
+
*/
|
|
162
|
+
of<T>(): <const O extends Options<T> & {
|
|
163
|
+
kind: EffectParamKind;
|
|
164
|
+
}>(o: O & Behaviour<T>) => EffectParamDef<T> & NoInfer<O>;
|
|
165
|
+
};
|
|
166
|
+
/** The derived `EffectData` of a spec: generic per-kind `lerp`/`equals` unless the spec gives its own. */
|
|
167
|
+
export declare function effectDataOf<S extends EffectSpec>(spec: S): EffectData<EffectOf<S>>;
|
|
168
|
+
/**
|
|
169
|
+
* Builds an effect from builder input: the scalar shorthand, then each
|
|
170
|
+
* parameter's option or default (normalised), then `mode`/`clip`.
|
|
171
|
+
*/
|
|
172
|
+
export declare function buildEffect<S extends EffectSpec>(spec: S, arg: number | EffectOptionsOf<S["params"]> | undefined): EffectOf<S>;
|
|
173
|
+
/** A JSON value — what every field of an {@link EffectDescriptor} is made of. */
|
|
174
|
+
export type EffectJson = string | number | boolean | null | EffectJson[] | {
|
|
175
|
+
[key: string]: EffectJson;
|
|
176
|
+
};
|
|
177
|
+
/** One parameter of an {@link EffectDescriptor}. */
|
|
178
|
+
export interface EffectParamDescriptor {
|
|
179
|
+
/** The stored field it writes. */
|
|
180
|
+
name: string;
|
|
181
|
+
kind: EffectParamKind;
|
|
182
|
+
/** What the builder writes when it is omitted, as stored (colours as authored). */
|
|
183
|
+
default?: EffectJson;
|
|
184
|
+
/** The builder's options require it. */
|
|
185
|
+
required?: boolean;
|
|
186
|
+
/** The stored field may be absent. */
|
|
187
|
+
optional?: boolean;
|
|
188
|
+
min?: number;
|
|
189
|
+
max?: number;
|
|
190
|
+
step?: number;
|
|
191
|
+
unit?: EffectParamUnit;
|
|
192
|
+
options?: (string | number)[];
|
|
193
|
+
/** Tweens continuously (false: switches at the midpoint). */
|
|
194
|
+
animatable: boolean;
|
|
195
|
+
/** i18n leaf for the label; the name unless the spec says otherwise. */
|
|
196
|
+
label: string;
|
|
197
|
+
control?: EffectParamControl;
|
|
198
|
+
inline?: boolean;
|
|
199
|
+
/** Inspector position. */
|
|
200
|
+
order: number;
|
|
201
|
+
zero?: "right" | "top";
|
|
202
|
+
optionsLabel?: string;
|
|
203
|
+
hidden?: boolean;
|
|
204
|
+
initial?: EffectJson;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A built-in effect, described for a host: what its fields are, their kinds,
|
|
208
|
+
* defaults and ranges, and how an inspector should lay them out. Plain JSON, so
|
|
209
|
+
* it can be shipped to a UI as is.
|
|
210
|
+
*/
|
|
211
|
+
export interface EffectDescriptor {
|
|
212
|
+
type: string;
|
|
213
|
+
group: EffectGroup;
|
|
214
|
+
/** `"dynamic"`: depends on the effect's `mode` (the user shader). */
|
|
215
|
+
surface: EffectSurface | "dynamic";
|
|
216
|
+
scalar?: string;
|
|
217
|
+
defaultMode?: EffectMode;
|
|
218
|
+
onlyOn?: EffectMode;
|
|
219
|
+
/** Stored fields at which it draws nothing (the rest at their defaults); `null` when it has none. */
|
|
220
|
+
neutral: {
|
|
221
|
+
[key: string]: EffectJson;
|
|
222
|
+
} | null;
|
|
223
|
+
/** In stored-key order; sort by `order` for the inspector's. */
|
|
224
|
+
params: EffectParamDescriptor[];
|
|
225
|
+
}
|
|
226
|
+
/** The serialisable {@link EffectDescriptor} of a spec. */
|
|
227
|
+
export declare function describeSpec(spec: EffectSpec): EffectDescriptor;
|
|
228
|
+
export {};
|
|
229
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/spec.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGnH;;;GAGG;AACH,MAAM,MAAM,eAAe,GACrB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,CAAC;AAEjB,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEjF,mD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