@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,4 +1,5 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
|
+
import { type EffectFields } from "../spec.js";
|
|
2
3
|
/**
|
|
3
4
|
* A 3D colour lookup table — the `.cube` a colourist hands you.
|
|
4
5
|
*
|
|
@@ -33,14 +34,40 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
|
33
34
|
* honest answer — there is no meaningful midpoint between two measured cubes —
|
|
34
35
|
* and the way to dissolve between looks is two fills, or {@link amount}.
|
|
35
36
|
*/
|
|
36
|
-
export interface LutEffect extends ModedEffect {
|
|
37
|
+
export interface LutEffect extends ModedEffect, EffectFields<typeof lutSpec.params> {
|
|
37
38
|
type: "lut";
|
|
38
|
-
/** The cube, flat RGB triples, red-fastest. Immutable and shared; see above. */
|
|
39
|
-
table: Float32Array;
|
|
40
|
-
/** Entries per axis. `table.length` must be `size³ × 3`. */
|
|
41
|
-
size: number;
|
|
42
|
-
/** 0–1 mix against the ungraded colour. 0 is a no-op, 1 is the full look. */
|
|
43
|
-
amount: number;
|
|
44
39
|
}
|
|
40
|
+
/** The {@link LutEffect} spec: its parameters, defaults and ranges. */
|
|
41
|
+
export declare const lutSpec: import("../spec.js").EffectSpec<"lut", {
|
|
42
|
+
/** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */
|
|
43
|
+
readonly table: import("../spec.js").EffectParamDef<Float32Array<ArrayBufferLike>, Float32Array<ArrayBufferLike>> & NoInfer<{
|
|
44
|
+
readonly kind: "table";
|
|
45
|
+
readonly required: true;
|
|
46
|
+
readonly hidden: true;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Entries per axis. Cuts with the table: a table read at the wrong stride
|
|
50
|
+
* is not a wrong colour, it is garbage.
|
|
51
|
+
*/
|
|
52
|
+
readonly size: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
53
|
+
readonly required: true;
|
|
54
|
+
readonly min: 2;
|
|
55
|
+
readonly step: 1;
|
|
56
|
+
readonly lerp: "step";
|
|
57
|
+
readonly hidden: true;
|
|
58
|
+
}> & {
|
|
59
|
+
kind: "number";
|
|
60
|
+
};
|
|
61
|
+
/** 0–1 mix against the ungraded colour. */
|
|
62
|
+
readonly amount: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
63
|
+
readonly default: 1;
|
|
64
|
+
readonly min: 0;
|
|
65
|
+
readonly max: 1;
|
|
66
|
+
readonly control: "slider";
|
|
67
|
+
readonly inline: true;
|
|
68
|
+
}> & {
|
|
69
|
+
kind: "number";
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
45
72
|
export declare const lutEffect: EffectData<LutEffect>;
|
|
46
73
|
//# sourceMappingURL=lut.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lut.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lut.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC;IAC/E,IAAI,EAAE,KAAK,CAAC;CACf;AAED,uEAAuE;AACvE,eAAO,MAAM,OAAO;IAUZ,qFAAqF;;;;;;IAErF;;;OAGG;;;;;;;;;;IAEH,2CAA2C;;;;;;;;;;EAGjD,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,SAAS,CAAyB,CAAC"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// stride is not a wrong colour, it is garbage — so they cut together.
|
|
7
|
-
table: t < 0.5 ? from.table : to.table,
|
|
8
|
-
size: t < 0.5 ? from.size : to.size,
|
|
9
|
-
amount: lerpNumber(from.amount, to.amount, t),
|
|
10
|
-
mode: t < 0.5 ? from.mode : to.mode,
|
|
11
|
-
}),
|
|
12
|
-
equals: (a, b) => a.table === b.table &&
|
|
13
|
-
a.size === b.size &&
|
|
14
|
-
a.amount === b.amount &&
|
|
15
|
-
a.mode === b.mode,
|
|
1
|
+
import { defineEffect, effectDataOf, param } from "../spec.js";
|
|
2
|
+
/** The {@link LutEffect} spec: its parameters, defaults and ranges. */
|
|
3
|
+
export const lutSpec = defineEffect({
|
|
4
|
+
type: "lut",
|
|
5
|
+
group: "color",
|
|
16
6
|
// It samples a second texture at a coordinate derived from the source's own
|
|
17
7
|
// colour, so it needs the source as a shader it can read — not a colour
|
|
18
8
|
// matrix it can compose.
|
|
19
9
|
surface: "shader",
|
|
20
|
-
|
|
10
|
+
// A LUT's neutral is its mix, not its table.
|
|
11
|
+
neutral: { amount: 0 },
|
|
12
|
+
params: {
|
|
13
|
+
/** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */
|
|
14
|
+
table: param.of()({ kind: "table", required: true, hidden: true }),
|
|
15
|
+
/**
|
|
16
|
+
* Entries per axis. Cuts with the table: a table read at the wrong stride
|
|
17
|
+
* is not a wrong colour, it is garbage.
|
|
18
|
+
*/
|
|
19
|
+
size: param.number({ required: true, min: 2, step: 1, lerp: "step", hidden: true }),
|
|
20
|
+
/** 0–1 mix against the ungraded colour. */
|
|
21
|
+
amount: param.number({ default: 1, min: 0, max: 1, control: "slider", inline: true }),
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export const lutEffect = effectDataOf(lutSpec);
|
|
21
25
|
//# sourceMappingURL=lut.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAwC/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAChC,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,OAAO;IACd,4EAA4E;IAC5E,wEAAwE;IACxE,yBAAyB;IACzB,OAAO,EAAE,QAAQ;IACjB,6CAA6C;IAC7C,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,qFAAqF;QACrF,KAAK,EAAE,KAAK,CAAC,EAAE,EAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAChF;;;WAGG;QACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACnF,2CAA2C;QAC3C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KACxF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAA0B,YAAY,CAAC,OAAO,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/**\r\n * A 3D colour lookup table — the `.cube` a colourist hands you.\r\n *\r\n * The one adjustment in the roster that is not a formula. Everything else here\r\n * says what to *do* to a colour; a LUT is a measured cube of what each colour\r\n * should *become*, which is how film-stock and print emulations are shipped and\r\n * why no combination of curves and matrices substitutes for one. Applying it is\r\n * a trilinear lookup per pixel.\r\n *\r\n * A node effect rather than a media-only adjustment, deliberately: everything\r\n * outside {@link NonFilterEffect} is automatically an `EffectAdjustment` too, so\r\n * one implementation grades an image fill's own pixels *and* a whole node —\r\n * which is what lets a graded photo and the graded titles over it be the same\r\n * look rather than two things kept in step by hand.\r\n *\r\n * ## The table\r\n *\r\n * Flat RGB triples, **red-fastest** — index `((b · size) + g) · size + r`, times\r\n * three — which is the order a `.cube` file writes its lines in, so a parser\r\n * fills this with no transposition to get wrong.\r\n *\r\n * It is a `Float32Array` and it is treated as **immutable and shared**: `equals`\r\n * compares it by reference and `lerp` hard-cuts it, exactly as `texture` does\r\n * with its `src`. That is not laziness. A 33³ cube is 107,811 floats; comparing\r\n * it per frame would cost more than the draw, interpolating it would allocate a\r\n * second cube per frame, and the renderer's GPU upload is cached against this\r\n * very identity. Hand the same array back each frame and a LUT costs one texture\r\n * upload for the life of the scene; build a fresh one per frame and it costs one\r\n * per frame.\r\n *\r\n * Cross-fading two *different* LUTs is therefore a cut, not a blend. That is the\r\n * honest answer — there is no meaningful midpoint between two measured cubes —\r\n * and the way to dissolve between looks is two fills, or {@link amount}.\r\n */\r\nexport interface LutEffect extends ModedEffect, EffectFields<typeof lutSpec.params> {\r\n type: \"lut\";\r\n}\r\n\r\n/** The {@link LutEffect} spec: its parameters, defaults and ranges. */\r\nexport const lutSpec = defineEffect({\r\n type: \"lut\",\r\n group: \"color\",\r\n // It samples a second texture at a coordinate derived from the source's own\r\n // colour, so it needs the source as a shader it can read — not a colour\r\n // matrix it can compose.\r\n surface: \"shader\",\r\n // A LUT's neutral is its mix, not its table.\r\n neutral: { amount: 0 },\r\n params: {\r\n /** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */\r\n table: param.of<Float32Array>()({ kind: \"table\", required: true, hidden: true }),\r\n /**\r\n * Entries per axis. Cuts with the table: a table read at the wrong stride\r\n * is not a wrong colour, it is garbage.\r\n */\r\n size: param.number({ required: true, min: 2, step: 1, lerp: \"step\", hidden: true }),\r\n /** 0–1 mix against the ungraded colour. */\r\n amount: param.number({ default: 1, min: 0, max: 1, control: \"slider\", inline: true }),\r\n },\r\n});\r\n\r\nexport const lutEffect: EffectData<LutEffect> = effectDataOf(lutSpec);\r\n"]}
|
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
import { Vector2 } from "../../../../attributes/layout/vector2.js";
|
|
2
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
3
|
-
|
|
2
|
+
import { type EffectFields } from "../spec.js";
|
|
3
|
+
export interface MagnifyEffect extends ModedEffect, EffectFields<typeof magnifySpec.params> {
|
|
4
4
|
type: "magnify";
|
|
5
|
-
/** Magnify centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */
|
|
6
|
-
center: Vector2;
|
|
7
|
-
/**
|
|
8
|
-
* Magnification factor for the backdrop beneath the node.
|
|
9
|
-
* 1 = no magnification, 2 = 2× magnified, 0.5 = zoomed out to half size.
|
|
10
|
-
*/
|
|
11
|
-
scale: number;
|
|
12
5
|
}
|
|
6
|
+
/** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */
|
|
7
|
+
export declare const magnifySpec: import("../spec.js").EffectSpec<"magnify", {
|
|
8
|
+
/** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */
|
|
9
|
+
readonly scale: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
10
|
+
readonly default: 2;
|
|
11
|
+
readonly min: 0;
|
|
12
|
+
readonly step: 0.1;
|
|
13
|
+
readonly unit: "factor";
|
|
14
|
+
readonly label: "magnification";
|
|
15
|
+
readonly inline: true;
|
|
16
|
+
}> & {
|
|
17
|
+
kind: "number";
|
|
18
|
+
};
|
|
19
|
+
/** Magnify centre in 0–1 layer coords. */
|
|
20
|
+
readonly center: import("../spec.js").EffectParamDef<import("../../../index.js").Vector2, import("../../../index.js").Vector2> & NoInfer<{
|
|
21
|
+
readonly default: import("../../../index.js").Vector2;
|
|
22
|
+
readonly min: 0;
|
|
23
|
+
readonly max: 1;
|
|
24
|
+
readonly step: 0.01;
|
|
25
|
+
readonly unit: "normalized";
|
|
26
|
+
readonly label: "lensCenter";
|
|
27
|
+
}> & {
|
|
28
|
+
kind: "vec2";
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
13
31
|
export declare const magnifyEffect: EffectData<MagnifyEffect>;
|
|
14
32
|
//# sourceMappingURL=magnify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magnify.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"magnify.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,2EAA2E;AAC3E,eAAO,MAAM,WAAW;IAUhB,iEAAiE;;;;;;;;;;;IAEjE,0CAA0C;;;;;;;;;;;EAGhD,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAA6B,CAAC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
center: lerpVector2(from.center, to.center, t),
|
|
7
|
-
scale: lerpNumber(from.scale, to.scale, t),
|
|
8
|
-
mode: t < 0.5 ? from.mode : to.mode,
|
|
9
|
-
}),
|
|
10
|
-
equals: (a, b) => a.center.x === b.center.x &&
|
|
11
|
-
a.center.y === b.center.y &&
|
|
12
|
-
a.scale === b.scale &&
|
|
13
|
-
a.mode === b.mode,
|
|
1
|
+
import { CENTER, defineEffect, effectDataOf, param } from "../spec.js";
|
|
2
|
+
/** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */
|
|
3
|
+
export const magnifySpec = defineEffect({
|
|
4
|
+
type: "magnify",
|
|
5
|
+
group: "distort",
|
|
14
6
|
// Resamples the backdrop about `center`.
|
|
15
7
|
surface: "shader",
|
|
16
|
-
|
|
8
|
+
scalar: "scale",
|
|
9
|
+
defaultMode: "backdrop",
|
|
10
|
+
onlyOn: "backdrop",
|
|
11
|
+
neutral: { scale: 1 },
|
|
12
|
+
params: {
|
|
13
|
+
/** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */
|
|
14
|
+
scale: param.number({ default: 2, min: 0, step: 0.1, unit: "factor", label: "magnification", inline: true }),
|
|
15
|
+
/** Magnify centre in 0–1 layer coords. */
|
|
16
|
+
center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: "normalized", label: "lensCenter" }),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export const magnifyEffect = effectDataOf(magnifySpec);
|
|
17
20
|
//# sourceMappingURL=magnify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAMvF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,yCAAyC;IACzC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACrB,MAAM,EAAE;QACJ,iEAAiE;QACjE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC5G,0CAA0C;QAC1C,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;KAC/G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAA8B,YAAY,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { CENTER, defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\nexport interface MagnifyEffect extends ModedEffect, EffectFields<typeof magnifySpec.params> {\r\n type: \"magnify\";\r\n}\r\n\r\n/** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */\r\nexport const magnifySpec = defineEffect({\r\n type: \"magnify\",\r\n group: \"distort\",\r\n // Resamples the backdrop about `center`.\r\n surface: \"shader\",\r\n scalar: \"scale\",\r\n defaultMode: \"backdrop\",\r\n onlyOn: \"backdrop\",\r\n neutral: { scale: 1 },\r\n params: {\r\n /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */\r\n scale: param.number({ default: 2, min: 0, step: 0.1, unit: \"factor\", label: \"magnification\", inline: true }),\r\n /** Magnify centre in 0–1 layer coords. */\r\n center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: \"normalized\", label: \"lensCenter\" }),\r\n },\r\n});\r\n\r\nexport const magnifyEffect: EffectData<MagnifyEffect> = effectDataOf(magnifySpec);\r\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ModedEffect, EffectData
|
|
1
|
+
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
|
+
import { type EffectFields } from "../spec.js";
|
|
2
3
|
/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */
|
|
3
4
|
export type MotionBlurAlignment = "behind" | "centered" | "ahead" | number;
|
|
4
5
|
/**
|
|
@@ -7,32 +8,66 @@ export type MotionBlurAlignment = "behind" | "centered" | "ahead" | number;
|
|
|
7
8
|
* per-frame motion (sampled by the renderer), modelled on After Effects' shutter
|
|
8
9
|
* angle (`length`) and shutter phase (`alignment`). A static node renders sharp.
|
|
9
10
|
*/
|
|
10
|
-
export interface MotionBlurEffect extends ModedEffect {
|
|
11
|
+
export interface MotionBlurEffect extends ModedEffect, EffectFields<typeof motionBlurSpec.params> {
|
|
11
12
|
type: "motionBlur";
|
|
13
|
+
}
|
|
14
|
+
/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */
|
|
15
|
+
export declare function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number;
|
|
16
|
+
/** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */
|
|
17
|
+
export declare const motionBlurSpec: import("../spec.js").EffectSpec<"motionBlur", {
|
|
12
18
|
/**
|
|
13
19
|
* Shutter "openness" as a percentage, the user-friendly form of a shutter
|
|
14
20
|
* angle. `100` ≈ 360° = a smear spanning the node's full per-frame
|
|
15
21
|
* displacement; `0` = no blur.
|
|
16
22
|
*/
|
|
17
|
-
length: number
|
|
23
|
+
readonly length: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
24
|
+
readonly default: 50;
|
|
25
|
+
readonly min: 0;
|
|
26
|
+
readonly unit: "percent";
|
|
27
|
+
readonly label: "shutter";
|
|
28
|
+
readonly inline: true;
|
|
29
|
+
}> & {
|
|
30
|
+
kind: "number";
|
|
31
|
+
};
|
|
18
32
|
/**
|
|
19
33
|
* Shutter phase — where the smear sits relative to the node's current
|
|
20
|
-
* position along its motion
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
alignment: MotionBlurAlignment;
|
|
24
|
-
/**
|
|
25
|
-
* Quality hint for the renderer. Low values use a cheap continuous smear;
|
|
26
|
-
* above the renderer's threshold it switches to discrete multi-tap
|
|
27
|
-
* accumulation (After Effects' "Samples Per Frame" look).
|
|
34
|
+
* position along its motion: `'behind'` (−1) trails it, `'centered'` (0)
|
|
35
|
+
* straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.
|
|
28
36
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
readonly alignment: import("../spec.js").EffectParamDef<MotionBlurAlignment, MotionBlurAlignment> & NoInfer<{
|
|
38
|
+
readonly kind: "enum";
|
|
39
|
+
readonly default: "centered";
|
|
40
|
+
readonly options: readonly ["centered", "behind", "ahead"];
|
|
41
|
+
readonly optionsLabel: "motionBlurAlignment";
|
|
42
|
+
readonly lerp: (a: MotionBlurAlignment, b: MotionBlurAlignment, t: number) => number;
|
|
43
|
+
readonly equals: (a: MotionBlurAlignment, b: MotionBlurAlignment) => boolean;
|
|
44
|
+
}>;
|
|
45
|
+
/** Renderer quality hint; above 32 switches to multi-tap accumulation. */
|
|
46
|
+
readonly samples: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
47
|
+
readonly default: 16;
|
|
48
|
+
readonly min: 1;
|
|
49
|
+
readonly step: 1;
|
|
50
|
+
readonly hidden: true;
|
|
51
|
+
}> & {
|
|
52
|
+
kind: "number";
|
|
53
|
+
};
|
|
54
|
+
/** Blur-length multiplier. */
|
|
55
|
+
readonly strength: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
56
|
+
readonly default: 1;
|
|
57
|
+
readonly min: 0;
|
|
58
|
+
readonly max: 2;
|
|
59
|
+
readonly control: "slider";
|
|
60
|
+
}> & {
|
|
61
|
+
kind: "number";
|
|
62
|
+
};
|
|
63
|
+
/** Per-axis velocity scale. */
|
|
64
|
+
readonly axis: import("../spec.js").EffectParamDef<import("../index.js").EffectAxis, import("../index.js").EffectAxis> & NoInfer<{
|
|
65
|
+
readonly default: "both";
|
|
66
|
+
readonly optionsLabel: "effectAxis";
|
|
67
|
+
readonly lerp: (a: import("../index.js").EffectAxis, b: import("../index.js").EffectAxis, t: number) => import("../../../../attributes/layout/vector2.js").Vector2;
|
|
68
|
+
}> & {
|
|
69
|
+
kind: "axis";
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
37
72
|
export declare const motionBlurEffect: EffectData<MotionBlurEffect>;
|
|
38
73
|
//# sourceMappingURL=motion-blur.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"motion-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC;IAC7F,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAOjF;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc;IAMnB;;;;OAIG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;IAUH,0EAA0E;;;;;;;;;IAE1E,8BAA8B;;;;;;;;;IAE9B,+BAA+B;;;;;;;;EAOrC,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAgC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { lerpNumber } from "../../../../tween/lerp.js";
|
|
2
2
|
import { lerpVector2 } from "../../../../attributes/layout/vector2.js";
|
|
3
|
-
import { resolveEffectAxis
|
|
3
|
+
import { resolveEffectAxis } from "../effect-data.js";
|
|
4
|
+
import { defineEffect, effectDataOf, param } from "../spec.js";
|
|
4
5
|
/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */
|
|
5
6
|
export function resolveMotionBlurAlignment(alignment) {
|
|
6
7
|
switch (alignment) {
|
|
@@ -10,23 +11,44 @@ export function resolveMotionBlurAlignment(alignment) {
|
|
|
10
11
|
default: return Math.max(-1, Math.min(1, alignment));
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
/** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */
|
|
15
|
+
export const motionBlurSpec = defineEffect({
|
|
16
|
+
type: "motionBlur",
|
|
17
|
+
group: "blur",
|
|
18
|
+
scalar: "length",
|
|
19
|
+
neutral: { length: 0 },
|
|
20
|
+
params: {
|
|
21
|
+
/**
|
|
22
|
+
* Shutter "openness" as a percentage, the user-friendly form of a shutter
|
|
23
|
+
* angle. `100` ≈ 360° = a smear spanning the node's full per-frame
|
|
24
|
+
* displacement; `0` = no blur.
|
|
25
|
+
*/
|
|
26
|
+
length: param.number({ default: 50, min: 0, unit: "percent", label: "shutter", inline: true }),
|
|
27
|
+
/**
|
|
28
|
+
* Shutter phase — where the smear sits relative to the node's current
|
|
29
|
+
* position along its motion: `'behind'` (−1) trails it, `'centered'` (0)
|
|
30
|
+
* straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.
|
|
31
|
+
*/
|
|
32
|
+
alignment: param.of()({
|
|
33
|
+
kind: "enum",
|
|
34
|
+
default: "centered",
|
|
35
|
+
options: ["centered", "behind", "ahead"],
|
|
36
|
+
optionsLabel: "motionBlurAlignment",
|
|
37
|
+
// Resolved to a phase, so e.g. 'behind' → 'ahead' sweeps.
|
|
38
|
+
lerp: (a, b, t) => lerpNumber(resolveMotionBlurAlignment(a), resolveMotionBlurAlignment(b), t),
|
|
39
|
+
equals: (a, b) => resolveMotionBlurAlignment(a) === resolveMotionBlurAlignment(b),
|
|
40
|
+
}),
|
|
41
|
+
/** Renderer quality hint; above 32 switches to multi-tap accumulation. */
|
|
42
|
+
samples: param.number({ default: 16, min: 1, step: 1, hidden: true }),
|
|
43
|
+
/** Blur-length multiplier. */
|
|
44
|
+
strength: param.number({ default: 1, min: 0, max: 2, control: "slider" }),
|
|
45
|
+
/** Per-axis velocity scale. */
|
|
46
|
+
axis: param.axis({
|
|
47
|
+
default: "both",
|
|
48
|
+
optionsLabel: "effectAxis",
|
|
49
|
+
lerp: (a, b, t) => lerpVector2(resolveEffectAxis(a), resolveEffectAxis(b), t),
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export const motionBlurEffect = effectDataOf(motionBlurSpec);
|
|
32
54
|
//# sourceMappingURL=motion-blur.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAe/E,oFAAoF;AACpF,MAAM,UAAU,0BAA0B,CAAC,SAA8B;IACrE,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;IACvC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ;;;;WAIG;QACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC9F;;;;WAIG;QACH,SAAS,EAAE,KAAK,CAAC,EAAE,EAAuB,CAAC;YACvC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;YACxC,YAAY,EAAE,qBAAqB;YACnC,0DAA0D;YAC1D,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC9F,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC;SACpF,CAAC;QACF,0EAA0E;QAC1E,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACrE,8BAA8B;QAC9B,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACzE,+BAA+B;QAC/B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;YACb,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAChF,CAAC;KACL;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAiC,YAAY,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectAxis } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */\r\nexport type MotionBlurAlignment = \"behind\" | \"centered\" | \"ahead\" | number;\r\n\r\n/**\r\n * Velocity-driven motion blur. Unlike {@link DirectionalBlurEffect}, whose smear\r\n * is authored, this derives its direction and length from the node's actual\r\n * per-frame motion (sampled by the renderer), modelled on After Effects' shutter\r\n * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.\r\n */\r\nexport interface MotionBlurEffect extends ModedEffect, EffectFields<typeof motionBlurSpec.params> {\r\n type: \"motionBlur\";\r\n}\r\n\r\n/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */\r\nexport function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number {\r\n switch (alignment) {\r\n case \"behind\": return -1;\r\n case \"centered\": return 0;\r\n case \"ahead\": return 1;\r\n default: return Math.max(-1, Math.min(1, alignment));\r\n }\r\n}\r\n\r\n/** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */\r\nexport const motionBlurSpec = defineEffect({\r\n type: \"motionBlur\",\r\n group: \"blur\",\r\n scalar: \"length\",\r\n neutral: { length: 0 },\r\n params: {\r\n /**\r\n * Shutter \"openness\" as a percentage, the user-friendly form of a shutter\r\n * angle. `100` ≈ 360° = a smear spanning the node's full per-frame\r\n * displacement; `0` = no blur.\r\n */\r\n length: param.number({ default: 50, min: 0, unit: \"percent\", label: \"shutter\", inline: true }),\r\n /**\r\n * Shutter phase — where the smear sits relative to the node's current\r\n * position along its motion: `'behind'` (−1) trails it, `'centered'` (0)\r\n * straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.\r\n */\r\n alignment: param.of<MotionBlurAlignment>()({\r\n kind: \"enum\",\r\n default: \"centered\",\r\n options: [\"centered\", \"behind\", \"ahead\"],\r\n optionsLabel: \"motionBlurAlignment\",\r\n // Resolved to a phase, so e.g. 'behind' → 'ahead' sweeps.\r\n lerp: (a, b, t) => lerpNumber(resolveMotionBlurAlignment(a), resolveMotionBlurAlignment(b), t),\r\n equals: (a, b) => resolveMotionBlurAlignment(a) === resolveMotionBlurAlignment(b),\r\n }),\r\n /** Renderer quality hint; above 32 switches to multi-tap accumulation. */\r\n samples: param.number({ default: 16, min: 1, step: 1, hidden: true }),\r\n /** Blur-length multiplier. */\r\n strength: param.number({ default: 1, min: 0, max: 2, control: \"slider\" }),\r\n /** Per-axis velocity scale. */\r\n axis: param.axis({\r\n default: \"both\",\r\n optionsLabel: \"effectAxis\",\r\n lerp: (a, b, t) => lerpVector2(resolveEffectAxis(a), resolveEffectAxis(b), t),\r\n }),\r\n },\r\n});\r\n\r\nexport const motionBlurEffect: EffectData<MotionBlurEffect> = effectDataOf(motionBlurSpec);\r\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
|
+
import { type EffectFields } from "../spec.js";
|
|
2
3
|
/**
|
|
3
4
|
* Kuwahara filter — the painterly one.
|
|
4
5
|
*
|
|
@@ -10,10 +11,23 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
|
10
11
|
* Cost grows with the square of `radius` — four windows of `(radius+1)²` samples
|
|
11
12
|
* each — so this is the most expensive effect in the set by a wide margin.
|
|
12
13
|
*/
|
|
13
|
-
export interface OilPaintEffect extends ModedEffect {
|
|
14
|
+
export interface OilPaintEffect extends ModedEffect, EffectFields<typeof oilPaintSpec.params> {
|
|
14
15
|
type: "oilPaint";
|
|
15
|
-
/** Window radius in px. Brush size, and the dominant cost. 0 = off. */
|
|
16
|
-
radius: number;
|
|
17
16
|
}
|
|
17
|
+
/** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */
|
|
18
|
+
export declare const oilPaintSpec: import("../spec.js").EffectSpec<"oilPaint", {
|
|
19
|
+
/** Window radius in pixels — brush size, capped at 6. */
|
|
20
|
+
readonly radius: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
21
|
+
readonly default: 3;
|
|
22
|
+
readonly min: 0;
|
|
23
|
+
readonly max: 6;
|
|
24
|
+
readonly step: 1;
|
|
25
|
+
readonly unit: "px";
|
|
26
|
+
readonly label: "brush";
|
|
27
|
+
readonly inline: true;
|
|
28
|
+
}> & {
|
|
29
|
+
kind: "number";
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
18
32
|
export declare const oilPaintEffect: EffectData<OilPaintEffect>;
|
|
19
33
|
//# sourceMappingURL=oil-paint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oil-paint.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oil-paint.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC;IACzF,IAAI,EAAE,UAAU,CAAC;CACpB;AAED,4EAA4E;AAC5E,eAAO,MAAM,YAAY;IAQjB,yDAAyD;;;;;;;;;;;;EAG/D,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,cAAc,CAA8B,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
mode: t < 0.5 ? from.mode : to.mode,
|
|
7
|
-
}),
|
|
8
|
-
equals: (a, b) => a.radius === b.radius && a.mode === b.mode,
|
|
1
|
+
import { defineEffect, effectDataOf, param } from "../spec.js";
|
|
2
|
+
/** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */
|
|
3
|
+
export const oilPaintSpec = defineEffect({
|
|
4
|
+
type: "oilPaint",
|
|
5
|
+
group: "blur",
|
|
9
6
|
// Reads a large neighbourhood per pixel.
|
|
10
7
|
surface: "shader",
|
|
11
|
-
|
|
8
|
+
scalar: "radius",
|
|
9
|
+
neutral: { radius: 0 },
|
|
10
|
+
params: {
|
|
11
|
+
/** Window radius in pixels — brush size, capped at 6. */
|
|
12
|
+
radius: param.number({ default: 3, min: 0, max: 6, step: 1, unit: "px", label: "brush", inline: true }),
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
export const oilPaintEffect = effectDataOf(oilPaintSpec);
|
|
12
16
|
//# sourceMappingURL=oil-paint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAiB/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,MAAM;IACb,yCAAyC;IACzC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,yDAAyD;QACzD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAC1G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAA+B,YAAY,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/**\r\n * Kuwahara filter — the painterly one.\r\n *\r\n * Each pixel looks at four overlapping quadrant windows and takes the mean of\r\n * whichever is *flattest*. Averaging within a region but never across a boundary\r\n * is what makes it read as brushwork: flat areas smooth into strokes while edges\r\n * stay crisp, where a plain blur would soften both.\r\n *\r\n * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples\r\n * each — so this is the most expensive effect in the set by a wide margin.\r\n */\r\nexport interface OilPaintEffect extends ModedEffect, EffectFields<typeof oilPaintSpec.params> {\r\n type: \"oilPaint\";\r\n}\r\n\r\n/** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */\r\nexport const oilPaintSpec = defineEffect({\r\n type: \"oilPaint\",\r\n group: \"blur\",\r\n // Reads a large neighbourhood per pixel.\r\n surface: \"shader\",\r\n scalar: \"radius\",\r\n neutral: { radius: 0 },\r\n params: {\r\n /** Window radius in pixels — brush size, capped at 6. */\r\n radius: param.number({ default: 3, min: 0, max: 6, step: 1, unit: \"px\", label: \"brush\", inline: true }),\r\n },\r\n});\r\n\r\nexport const oilPaintEffect: EffectData<OilPaintEffect> = effectDataOf(oilPaintSpec);\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Color } from "../../../../attributes/shape/fill/color/parser.js";
|
|
2
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
|
+
import { type EffectFields } from "../spec.js";
|
|
3
3
|
/**
|
|
4
4
|
* Where the outline sits relative to the node's silhouette — the same three
|
|
5
5
|
* choices Figma and Illustrator offer for a stroke:
|
|
@@ -14,14 +14,34 @@ export type OutlinePosition = "outside" | "center" | "inside";
|
|
|
14
14
|
* (a.k.a. "stroke" in Figma) that geometry strokes can't give you when the
|
|
15
15
|
* silhouette comes from text, an image's alpha, or a whole subtree.
|
|
16
16
|
*/
|
|
17
|
-
export interface OutlineEffect extends ModedEffect {
|
|
17
|
+
export interface OutlineEffect extends ModedEffect, EffectFields<typeof outlineSpec.params> {
|
|
18
18
|
type: "outline";
|
|
19
|
-
/** Band thickness in px. 0 = off. */
|
|
20
|
-
width: number;
|
|
21
|
-
/** Band colour — any CSS colour, theme alias, or RGBA tuple. */
|
|
22
|
-
color: Color;
|
|
23
|
-
/** Which side of the silhouette edge the band grows from. */
|
|
24
|
-
position: OutlinePosition;
|
|
25
19
|
}
|
|
20
|
+
/** The {@link OutlineEffect} spec: its parameters, defaults and ranges. */
|
|
21
|
+
export declare const outlineSpec: import("../spec.js").EffectSpec<"outline", {
|
|
22
|
+
/** Band thickness in pixels. */
|
|
23
|
+
readonly width: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
24
|
+
readonly default: 4;
|
|
25
|
+
readonly min: 0;
|
|
26
|
+
readonly unit: "px";
|
|
27
|
+
readonly inline: true;
|
|
28
|
+
}> & {
|
|
29
|
+
kind: "number";
|
|
30
|
+
};
|
|
31
|
+
/** Band colour. */
|
|
32
|
+
readonly color: import("../spec.js").EffectParamDef<import("../../fill/index.js").Color, import("../../fill/index.js").Color> & NoInfer<{
|
|
33
|
+
readonly default: "black";
|
|
34
|
+
}> & {
|
|
35
|
+
kind: "color";
|
|
36
|
+
};
|
|
37
|
+
/** Which side of the edge the band grows from. */
|
|
38
|
+
readonly position: import("../spec.js").EffectParamDef<"center" | "outside" | "inside", "center" | "outside" | "inside"> & NoInfer<{
|
|
39
|
+
readonly default: "outside";
|
|
40
|
+
readonly optionsLabel: "outlinePosition";
|
|
41
|
+
}> & {
|
|
42
|
+
kind: "enum";
|
|
43
|
+
options: readonly ("center" | "outside" | "inside")[];
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
26
46
|
export declare const outlineEffect: EffectData<OutlineEffect>;
|
|
27
47
|
//# sourceMappingURL=outline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,2EAA2E;AAC3E,eAAO,MAAM,WAAW;IAShB,gCAAgC;;;;;;;;;IAEhC,mBAAmB;;;;;;IAEnB,kDAAkD;;;;;;;;EAGxD,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAA6B,CAAC"}
|