@motionscript/core 0.1.0-alpha.6 → 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 +34 -0
- package/NOTICE +15 -14
- package/README.md +5 -7
- package/dist/assets/errors.js +4 -5
- package/dist/assets/errors.js.map +1 -1
- 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/assets/scope.d.ts +1 -1
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +1 -1
- package/dist/assets/scope.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 +24 -31
- 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 +7 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +6 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +1 -1
- package/dist/attributes/layout/insets.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/size.d.ts +1 -1
- package/dist/attributes/layout/size.js +1 -1
- package/dist/attributes/layout/size.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/decorator.d.ts +44 -11
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +37 -9
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +24 -145
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +16 -112
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- 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 +47 -15
- 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/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.js +1 -1
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- 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/implementations/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +1 -1
- package/dist/attributes/shape/fill/implementations/video.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/lerp.d.ts +1 -1
- package/dist/attributes/shape/fill/lerp.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 +3 -7
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +2 -6
- 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 +6 -6
- 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/path/ops.d.ts +1 -2
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.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/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- 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/chunks/chunk-LKUYVFU3.js +2 -0
- package/dist/browser/chunks/{chunk-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
- package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
- package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- 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 +4 -4
- package/dist/browser/manifest.json +2 -4
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -18
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -17
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/components/builtins/geometry/shape-outline.js +470 -0
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/components/builtins/text/number-format.d.ts +66 -0
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/components/builtins/text/number-format.js +227 -0
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts +51 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js +77 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/components/builtins/text/text-defaults.d.ts +32 -0
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/components/builtins/text/text-defaults.js +37 -0
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/components/builtins/three/grid-geometry3d.js +114 -0
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +413 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/components/trees/2d/group-bounds.d.ts +56 -0
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/components/trees/2d/group-bounds.js +87 -0
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/components/trees/2d/node-lifecycle.js +264 -0
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/components/trees/2d/node-motion.d.ts +56 -0
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/components/trees/2d/node-motion.js +86 -0
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/components/trees/2d/node-render.js +67 -0
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/components/trees/2d/node-space.d.ts +63 -0
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/components/trees/2d/node-space.js +131 -0
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/components/trees/2d/node-transform.d.ts +55 -0
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/components/trees/2d/node-transform.js +73 -0
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/components/trees/2d/node2d.d.ts +1020 -0
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/components/trees/2d/node2d.js +1481 -0
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/components/trees/audio/node-audio.d.ts +116 -0
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/components/trees/audio/node-audio.js +171 -0
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts +53 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js +23 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/components/trees/node/node-reactive.d.ts +89 -0
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/components/trees/node/node-reactive.js +135 -0
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/components/trees/node/node-time.d.ts +39 -0
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/components/trees/node/node-time.js +14 -0
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/components/trees/node/node-walk.d.ts +46 -0
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/components/trees/node/node-walk.js +74 -0
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/components/trees/node/node.d.ts +401 -0
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/components/trees/node/node.js +680 -0
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/components/trees/root/canvas2d-node.js +216 -0
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/components/trees/three/node3d.d.ts +222 -0
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/components/trees/three/node3d.js +289 -0
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/builtins.js +13 -13
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -4
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +35 -7
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/index.d.ts +9 -2
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +5 -2
- 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-decorator.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +7 -3
- 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 +39 -25
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +41 -21
- 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 +48 -4
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +174 -44
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +18 -32
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +18 -6
- 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 +79 -19
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +31 -17
- package/dist/experimental.js.map +1 -1
- package/dist/index.d.ts +10 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.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/props/host.d.ts +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.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/clip.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +13 -7
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +9 -3
- 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 +3 -3
- 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/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +13 -19
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +67 -24
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +1 -1
- package/dist/render3d/scene3d.js +1 -1
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +2 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/vector3.d.ts +2 -2
- package/dist/render3d/vector3.js +2 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- 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 +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -25
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +6 -4
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +8 -4
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +2 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +34 -37
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +8 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +4 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +2 -2
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +3 -3
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +2 -2
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +2 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +15 -5
- 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/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +4 -5
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +50 -44
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +35 -29
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +14 -9
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +3 -2
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +1 -1
- package/dist/tween/command.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 +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +3 -11
- package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
- package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
- package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
- package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
- package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
- package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
- package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/lerp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA0B,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGpE,2EAA2E;AAC3E,MAAM,UAAU,SAAS,CAAC,IAAqB,EAAE,EAAmB,EAAE,CAAS;IAC3E,OAAO;QACH,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC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AC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["/**\r\n * Low-level color interpolation utilities.\r\n *\r\n * These helpers operate on {@link NormalizedColor} tuples (linear [R, G, B, A]\r\n * in the 0–1 range) and are used by fill implementations that need per-channel\r\n * lerp without pulling in the full fill-registry machinery.\r\n */\r\n\r\nimport { Color, NormalizedColor, parseColor } from \"./color/parser\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\n/** Linearly interpolates two normalized RGBA colors channel-by-channel. */\r\nexport function lerpColor(from: NormalizedColor, to: NormalizedColor, t: number): NormalizedColor {\r\n return [\r\n from[0] + (to[0] - from[0]) * t,\r\n from[1] + (to[1] - from[1]) * t,\r\n from[2] + (to[2] - from[2]) * t,\r\n from[3] + (to[3] - from[3]) * t,\r\n ];\r\n}\r\n\r\n/** Helpers the colour attribute carries beyond its mapper and lerp. */\r\nexport interface ColorOps {\r\n /**\r\n * `#rrggbb`, or `#rrggbbaa` when not opaque — for a consumer that takes a\r\n * colour as a string, such as a resolved
|
|
1
|
+
{"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/lerp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA0B,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGpE,2EAA2E;AAC3E,MAAM,UAAU,SAAS,CAAC,IAAqB,EAAE,EAAmB,EAAE,CAAS;IAC3E,OAAO;QACH,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;KAClC,CAAC;AACN,CAAC;AAWD;0DAC0D;AAC1D,MAAM,CAAC,MAAM,QAAQ,GAAoD;IACrE,OAAO;IACP,IAAI,EAAE,SAAS;IACf,GAAG,CAAC,KAAK;QACL,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3E,CAAC;CACJ,CAAC;AAEF,SAAS,OAAO,CAAC,KAAY;IACzB,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,IAAI,CAAC,OAAe;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["/**\r\n * Low-level color interpolation utilities.\r\n *\r\n * These helpers operate on {@link NormalizedColor} tuples (linear [R, G, B, A]\r\n * in the 0–1 range) and are used by fill implementations that need per-channel\r\n * lerp without pulling in the full fill-registry machinery.\r\n */\r\n\r\nimport { Color, NormalizedColor, parseColor } from \"./color/parser\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\n/** Linearly interpolates two normalized RGBA colors channel-by-channel. */\r\nexport function lerpColor(from: NormalizedColor, to: NormalizedColor, t: number): NormalizedColor {\r\n return [\r\n from[0] + (to[0] - from[0]) * t,\r\n from[1] + (to[1] - from[1]) * t,\r\n from[2] + (to[2] - from[2]) * t,\r\n from[3] + (to[3] - from[3]) * t,\r\n ];\r\n}\r\n\r\n/** Helpers the colour attribute carries beyond its mapper and lerp. */\r\nexport interface ColorOps {\r\n /**\r\n * `#rrggbb`, or `#rrggbbaa` when not opaque — for a consumer that takes a\r\n * colour as a string, such as a resolved `Types.color` entry read back.\r\n */\r\n hex(value: Color): string;\r\n}\r\n\r\n/** The colour attribute's op set: parses a CSS string (or passes an already-normalized\r\n * tuple through) and interpolates in normalized space. */\r\nexport const colorOps: AttributeOps<Color, NormalizedColor> & ColorOps = {\r\n resolve,\r\n lerp: lerpColor,\r\n hex(value) {\r\n const [r, g, b, a] = resolve(value);\r\n const alpha = byte(a);\r\n return `#${byte(r)}${byte(g)}${byte(b)}${alpha === \"ff\" ? \"\" : alpha}`;\r\n },\r\n};\r\n\r\nfunction resolve(value: Color): NormalizedColor {\r\n return Array.isArray(value) ? value : parseColor(value);\r\n}\r\n\r\nfunction byte(channel: number): string {\r\n return Math.round(Math.min(1, Math.max(0, channel)) * 255).toString(16).padStart(2, \"0\");\r\n}\r\n\r\n"]}
|
|
@@ -14,8 +14,7 @@ export declare function resolveFill(prop: FillProp): FillResolved;
|
|
|
14
14
|
* What an empty media slot paints: an image fill naming no source.
|
|
15
15
|
*
|
|
16
16
|
* The renderer turns an empty `src` into the transparency checkerboard rather
|
|
17
|
-
* than into nothing
|
|
18
|
-
* the whole of why. Both media nodes reach for this when their own source is
|
|
17
|
+
* than into nothing. Both media nodes reach for this when their own source is
|
|
19
18
|
* unset, so the two cannot end up drawing different placeholders.
|
|
20
19
|
*
|
|
21
20
|
* Resolved once and shared: it has no props to vary, and the two places that key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAoB,MAAM,SAAS,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAoBlE,KAAK,UAAU,CAAC,CAAC,SAAS,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;AAEzE,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,YAAY;IAC5C,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC;IACtB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/C;AAwBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAUxD;AAED
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAC5D,OAAO,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
|
|
|
55
55
|
* What an empty media slot paints: an image fill naming no source.
|
|
56
56
|
*
|
|
57
57
|
* The renderer turns an empty `src` into the transparency checkerboard rather
|
|
58
|
-
* than into nothing
|
|
59
|
-
* the whole of why. Both media nodes reach for this when their own source is
|
|
58
|
+
* than into nothing. Both media nodes reach for this when their own source is
|
|
60
59
|
* unset, so the two cannot end up drawing different placeholders.
|
|
61
60
|
*
|
|
62
61
|
* Resolved once and shared: it has no props to vary, and the two places that key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,+EAA+E;AAC/E,gFAAgF;AAChF,+BAA+B;AAC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BACZ,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;YAC9D,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import type { AssetScope } from \"@/assets/scope\";\r\nimport { FillProp, FillResolved, FillSpace } from \"./union\";\r\nimport { Fill, resolveChainFill } from \"./chain\";\r\nimport { canCoerce, coercePair } from \"./coerce\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\nimport { colorFill } from \"./implementations/color\";\r\nimport { linearGradientFill } from \"./implementations/linear-gradient\";\r\nimport { radialGradientFill } from \"./implementations/radial-gradient\";\r\nimport { conicGradientFill } from \"./implementations/conic-gradient\";\r\nimport { noiseFill } from \"./implementations/noise\";\r\nimport { fractalNoiseFill } from \"./implementations/fractal-noise\";\r\nimport { stripeFill } from \"./implementations/stripe\";\r\nimport { dotGridFill } from \"./implementations/dot-grid\";\r\nimport { gridFill } from \"./implementations/grid\";\r\nimport { shaderFill } from \"./implementations/shader\";\r\nimport { imageFill } from \"./implementations/image\";\r\nimport { videoFill } from \"./implementations/video\";\r\nimport { canvas3DFill } from \"./implementations/canvas3d\";\r\n// The one value import from `render3d` into the fill layer, for the bare-scene\r\n// coercion in `resolveFill`. Acyclic: `render3d` only imports `Color` back from\r\n// here, and does so type-only.\r\nimport { Scene3D } from \"@/render3d/scene3d\";\r\n\r\ntype FillResult<T extends FillResolved> = Omit<Omit<T, \"type\">, \"blend\">;\r\n\r\nexport interface FillData<T extends FillResolved> {\r\n resolve(prop: any): T;\r\n equals(a: T, b: T): boolean;\r\n lerp(from: FillResult<T>, to: FillResult<T>, t: number): FillResult<T>;\r\n declare?(fill: T, assets: AssetScope): void;\r\n}\r\n\r\nconst FILLS = new Map<string, FillData<FillResolved>>([\r\n [\"solid\", colorFill as FillData<FillResolved>],\r\n [\"linear-gradient\", linearGradientFill as FillData<FillResolved>],\r\n [\"radial-gradient\", radialGradientFill as FillData<FillResolved>],\r\n [\"conic-gradient\", conicGradientFill as FillData<FillResolved>],\r\n [\"noise\", noiseFill as FillData<FillResolved>],\r\n [\"fractalNoise\", fractalNoiseFill as FillData<FillResolved>],\r\n [\"stripe\", stripeFill as FillData<FillResolved>],\r\n [\"dotGrid\", dotGridFill as FillData<FillResolved>],\r\n [\"grid\", gridFill as FillData<FillResolved>],\r\n [\"shader\", shaderFill as FillData<FillResolved>],\r\n [\"image\", imageFill as FillData<FillResolved>],\r\n [\"video\", videoFill as FillData<FillResolved>],\r\n [\"canvas3D\", canvas3DFill as FillData<FillResolved>],\r\n]);\r\n\r\nfunction get(name: string): FillData<FillResolved> {\r\n const data = FILLS.get(name);\r\n if (!data) throw new Error(`Fill \"${name}\" is not registered`);\r\n return data;\r\n}\r\n\r\nexport function resolveFill(prop: FillProp): FillResolved {\r\n if (typeof prop === \"string\") return resolveFill({ type: \"solid\", color: prop });\r\n // A bare built scene is shorthand for a 3D fill, the same way a bare CSS\r\n // string is shorthand for a solid one.\r\n if (prop instanceof Scene3D) return resolveFill({ type: \"canvas3D\", scene: prop });\r\n const resolved = get(prop.type).resolve(prop);\r\n // `space` is a cross-cutting rendering directive (like `blend`); carry it\r\n // through generically so each fill `resolve()` doesn't have to know about it.\r\n const space = (prop as { space?: FillSpace }).space;\r\n return space !== undefined ? { ...resolved, space } : resolved;\r\n}\r\n\r\n/**\r\n * What an empty media slot paints: an image fill naming no source.\r\n *\r\n * The renderer turns an empty `src` into the transparency checkerboard rather\r\n * than into nothing — see `applyUnsetMediaPaint` in `skia-render`, which holds\r\n * the whole of why. Both media nodes reach for this when their own source is\r\n * unset, so the two cannot end up drawing different placeholders.\r\n *\r\n * Resolved once and shared: it has no props to vary, and the two places that key\r\n * per-fill state by object identity (`paintSlot`, `preflighted`) are both scoped\r\n * to one node's single `applyFills` call, where this can appear only once.\r\n *\r\n * Declared here rather than beside the image fill's own implementation because\r\n * resolving one needs {@link resolveFill}, and that lives on this side of the\r\n * dependency — the implementations are what the registry imports, not the other\r\n * way round.\r\n */\r\nexport const UNSET_MEDIA_FILL: FillResolved = resolveFill({\r\n type: \"image\",\r\n src: \"\",\r\n} as FillProp);\r\n\r\n/**\r\n * True when `a` and `b` can be interpolated into a single fill by {@link\r\n * lerpFill} without throwing — i.e. they share a type with the same `blend`, or\r\n * they're a color/gradient pair {@link canCoerce} can promote to one type.\r\n *\r\n * Pairs that fail this (e.g. color↔image, image↔video, or same-type fills with\r\n * differing blend modes) have no meaningful single-type in-between; {@link\r\n * fillOps}'s `lerp` cross-fades them as two stacked layers instead.\r\n */\r\nexport function canLerpFill(a: FillResolved, b: FillResolved): boolean {\r\n if (a.type === b.type) return a.blend === b.blend;\r\n return canCoerce(a, b);\r\n}\r\n\r\nexport function lerpFill(a: FillResolved, b: FillResolved, t: number): FillResolved {\r\n const clamped = Math.min(1, Math.max(0, t));\r\n\r\n // Cross-type tween (color↔gradient, or gradient↔gradient of different\r\n // kinds): promote both endpoints to a common type, then lerp with that\r\n // type's lerp. blend cannot interpolate, so it snaps with the rest of the\r\n // coerced shape.\r\n if (a.type !== b.type) {\r\n if (!canCoerce(a, b)) {\r\n throw new Error(`No registered lerp for fills of type \"${a.type}\" and \"${b.type}\"`);\r\n }\r\n const [ca, cb] = coercePair(a, b);\r\n return { ...ca, ...get(ca.type).lerp(ca, cb, clamped) };\r\n }\r\n\r\n if (a.blend !== b.blend) {\r\n throw new Error(`No registered lerp for fills of type \"${a.type}\" and \"${b.type}\"`);\r\n }\r\n return { ...a, ...get(a.type).lerp(a, b, clamped) };\r\n}\r\n\r\n/** Returns `fill` with its effective opacity scaled by `factor` (clamped to ≥0). */\r\nfunction scaleOpacity(fill: FillResolved, factor: number): FillResolved {\r\n return { ...fill, opacity: (fill.opacity ?? 1) * Math.max(0, factor) };\r\n}\r\n\r\nexport function declareFill(fill: FillResolved, assets: AssetScope): void {\r\n FILLS.get(fill.type)?.declare?.(fill, assets);\r\n}\r\n\r\n/** The fill-layer attribute's op set — the `fill` prop's resolve/lerp pair. */\r\nexport const fillOps: AttributeOps<Fill, FillResolved[]> = {\r\n resolve: (prop) => resolveChainFill(prop).map(resolveFill),\r\n lerp: (from, to, t) => {\r\n if (from === to) return from;\r\n if (!from.length && !to.length) return [];\r\n const clamped = Math.min(1, Math.max(0, t));\r\n const maxLength = Math.max(from.length, to.length);\r\n const result: FillResolved[] = [];\r\n for (let i = 0; i < maxLength; i++) {\r\n const f = from[i];\r\n const tf = to[i];\r\n if (f && tf) {\r\n // Interpolate in place when the two fills share an interpolatable\r\n // shape (same type, or a coercible color/gradient pair). When they\r\n // don't (e.g. color↔image, image↔video) there is no single-type\r\n // in-between, so cross-fade instead: paint the outgoing fill fading\r\n // out beneath the incoming fill fading in. The dropped-out endpoints\r\n // are omitted so a static array of one fill stays a single layer.\r\n if (canLerpFill(f, tf)) {\r\n result.push(lerpFill(f, tf, clamped));\r\n } else {\r\n if (clamped < 1) result.push(scaleOpacity(f, 1 - clamped));\r\n if (clamped > 0) result.push(scaleOpacity(tf, clamped));\r\n }\r\n } else if (f) {\r\n result.push(lerpFill(f, { ...f, opacity: 0 }, clamped));\r\n } else if (tf) {\r\n result.push(lerpFill({ ...tf, opacity: 0 }, tf, clamped));\r\n }\r\n }\r\n return result;\r\n },\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,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EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;gBAC1C,CAAC;qBAAM,CAAC;oBACJ,IAAI,OAAO,GAAG,CAAC;wBAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;oBAC3D,IAAI,OAAO,GAAG,CAAC;wBAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;gBAC5D,CAAC;YACL,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;YAC5D,CAAC;iBAAM,IAAI,EAAE,EAAE,CAAC;gBACZ,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;YAC9D,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import type { AssetScope } from \"@/assets/scope\";\r\nimport { FillProp, FillResolved, FillSpace } from \"./union\";\r\nimport { Fill, resolveChainFill } from \"./chain\";\r\nimport { canCoerce, coercePair } from \"./coerce\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\nimport { colorFill } from \"./implementations/color\";\r\nimport { linearGradientFill } from \"./implementations/linear-gradient\";\r\nimport { radialGradientFill } from \"./implementations/radial-gradient\";\r\nimport { conicGradientFill } from \"./implementations/conic-gradient\";\r\nimport { noiseFill } from \"./implementations/noise\";\r\nimport { fractalNoiseFill } from \"./implementations/fractal-noise\";\r\nimport { stripeFill } from \"./implementations/stripe\";\r\nimport { dotGridFill } from \"./implementations/dot-grid\";\r\nimport { gridFill } from \"./implementations/grid\";\r\nimport { shaderFill } from \"./implementations/shader\";\r\nimport { imageFill } from \"./implementations/image\";\r\nimport { videoFill } from \"./implementations/video\";\r\nimport { canvas3DFill } from \"./implementations/canvas3d\";\r\n// The one value import from `render3d` into the fill layer, for the bare-scene\r\n// coercion in `resolveFill`. Acyclic: `render3d` only imports `Color` back from\r\n// here, and does so type-only.\r\nimport { Scene3D } from \"@/render3d/scene3d\";\r\n\r\ntype FillResult<T extends FillResolved> = Omit<Omit<T, \"type\">, \"blend\">;\r\n\r\nexport interface FillData<T extends FillResolved> {\r\n resolve(prop: any): T;\r\n equals(a: T, b: T): boolean;\r\n lerp(from: FillResult<T>, to: FillResult<T>, t: number): FillResult<T>;\r\n declare?(fill: T, assets: AssetScope): void;\r\n}\r\n\r\nconst FILLS = new Map<string, FillData<FillResolved>>([\r\n [\"solid\", colorFill as FillData<FillResolved>],\r\n [\"linear-gradient\", linearGradientFill as FillData<FillResolved>],\r\n [\"radial-gradient\", radialGradientFill as FillData<FillResolved>],\r\n [\"conic-gradient\", conicGradientFill as FillData<FillResolved>],\r\n [\"noise\", noiseFill as FillData<FillResolved>],\r\n [\"fractalNoise\", fractalNoiseFill as FillData<FillResolved>],\r\n [\"stripe\", stripeFill as FillData<FillResolved>],\r\n [\"dotGrid\", dotGridFill as FillData<FillResolved>],\r\n [\"grid\", gridFill as FillData<FillResolved>],\r\n [\"shader\", shaderFill as FillData<FillResolved>],\r\n [\"image\", imageFill as FillData<FillResolved>],\r\n [\"video\", videoFill as FillData<FillResolved>],\r\n [\"canvas3D\", canvas3DFill as FillData<FillResolved>],\r\n]);\r\n\r\nfunction get(name: string): FillData<FillResolved> {\r\n const data = FILLS.get(name);\r\n if (!data) throw new Error(`Fill \"${name}\" is not registered`);\r\n return data;\r\n}\r\n\r\nexport function resolveFill(prop: FillProp): FillResolved {\r\n if (typeof prop === \"string\") return resolveFill({ type: \"solid\", color: prop });\r\n // A bare built scene is shorthand for a 3D fill, the same way a bare CSS\r\n // string is shorthand for a solid one.\r\n if (prop instanceof Scene3D) return resolveFill({ type: \"canvas3D\", scene: prop });\r\n const resolved = get(prop.type).resolve(prop);\r\n // `space` is a cross-cutting rendering directive (like `blend`); carry it\r\n // through generically so each fill `resolve()` doesn't have to know about it.\r\n const space = (prop as { space?: FillSpace }).space;\r\n return space !== undefined ? { ...resolved, space } : resolved;\r\n}\r\n\r\n/**\r\n * What an empty media slot paints: an image fill naming no source.\r\n *\r\n * The renderer turns an empty `src` into the transparency checkerboard rather\r\n * than into nothing. Both media nodes reach for this when their own source is\r\n * unset, so the two cannot end up drawing different placeholders.\r\n *\r\n * Resolved once and shared: it has no props to vary, and the two places that key\r\n * per-fill state by object identity (`paintSlot`, `preflighted`) are both scoped\r\n * to one node's single `applyFills` call, where this can appear only once.\r\n *\r\n * Declared here rather than beside the image fill's own implementation because\r\n * resolving one needs {@link resolveFill}, and that lives on this side of the\r\n * dependency — the implementations are what the registry imports, not the other\r\n * way round.\r\n */\r\nexport const UNSET_MEDIA_FILL: FillResolved = resolveFill({\r\n type: \"image\",\r\n src: \"\",\r\n} as FillProp);\r\n\r\n/**\r\n * True when `a` and `b` can be interpolated into a single fill by {@link\r\n * lerpFill} without throwing — i.e. they share a type with the same `blend`, or\r\n * they're a color/gradient pair {@link canCoerce} can promote to one type.\r\n *\r\n * Pairs that fail this (e.g. color↔image, image↔video, or same-type fills with\r\n * differing blend modes) have no meaningful single-type in-between; {@link\r\n * fillOps}'s `lerp` cross-fades them as two stacked layers instead.\r\n */\r\nexport function canLerpFill(a: FillResolved, b: FillResolved): boolean {\r\n if (a.type === b.type) return a.blend === b.blend;\r\n return canCoerce(a, b);\r\n}\r\n\r\nexport function lerpFill(a: FillResolved, b: FillResolved, t: number): FillResolved {\r\n const clamped = Math.min(1, Math.max(0, t));\r\n\r\n // Cross-type tween (color↔gradient, or gradient↔gradient of different\r\n // kinds): promote both endpoints to a common type, then lerp with that\r\n // type's lerp. blend cannot interpolate, so it snaps with the rest of the\r\n // coerced shape.\r\n if (a.type !== b.type) {\r\n if (!canCoerce(a, b)) {\r\n throw new Error(`No registered lerp for fills of type \"${a.type}\" and \"${b.type}\"`);\r\n }\r\n const [ca, cb] = coercePair(a, b);\r\n return { ...ca, ...get(ca.type).lerp(ca, cb, clamped) };\r\n }\r\n\r\n if (a.blend !== b.blend) {\r\n throw new Error(`No registered lerp for fills of type \"${a.type}\" and \"${b.type}\"`);\r\n }\r\n return { ...a, ...get(a.type).lerp(a, b, clamped) };\r\n}\r\n\r\n/** Returns `fill` with its effective opacity scaled by `factor` (clamped to ≥0). */\r\nfunction scaleOpacity(fill: FillResolved, factor: number): FillResolved {\r\n return { ...fill, opacity: (fill.opacity ?? 1) * Math.max(0, factor) };\r\n}\r\n\r\nexport function declareFill(fill: FillResolved, assets: AssetScope): void {\r\n FILLS.get(fill.type)?.declare?.(fill, assets);\r\n}\r\n\r\n/** The fill-layer attribute's op set — the `fill` prop's resolve/lerp pair. */\r\nexport const fillOps: AttributeOps<Fill, FillResolved[]> = {\r\n resolve: (prop) => resolveChainFill(prop).map(resolveFill),\r\n lerp: (from, to, t) => {\r\n if (from === to) return from;\r\n if (!from.length && !to.length) return [];\r\n const clamped = Math.min(1, Math.max(0, t));\r\n const maxLength = Math.max(from.length, to.length);\r\n const result: FillResolved[] = [];\r\n for (let i = 0; i < maxLength; i++) {\r\n const f = from[i];\r\n const tf = to[i];\r\n if (f && tf) {\r\n // Interpolate in place when the two fills share an interpolatable\r\n // shape (same type, or a coercible color/gradient pair). When they\r\n // don't (e.g. color↔image, image↔video) there is no single-type\r\n // in-between, so cross-fade instead: paint the outgoing fill fading\r\n // out beneath the incoming fill fading in. The dropped-out endpoints\r\n // are omitted so a static array of one fill stays a single layer.\r\n if (canLerpFill(f, tf)) {\r\n result.push(lerpFill(f, tf, clamped));\r\n } else {\r\n if (clamped < 1) result.push(scaleOpacity(f, 1 - clamped));\r\n if (clamped > 0) result.push(scaleOpacity(tf, clamped));\r\n }\r\n } else if (f) {\r\n result.push(lerpFill(f, { ...f, opacity: 0 }, clamped));\r\n } else if (tf) {\r\n result.push(lerpFill({ ...tf, opacity: 0 }, tf, clamped));\r\n }\r\n }\r\n return result;\r\n },\r\n};\r\n"]}
|
|
@@ -62,7 +62,7 @@ export interface ExposureFilterOptions {
|
|
|
62
62
|
}
|
|
63
63
|
/** Raw 4×5 row-major colour matrix. Array shorthand sets `matrix`. */
|
|
64
64
|
export interface ColorMatrixFilterOptions {
|
|
65
|
-
/** 4×5 row-major colour matrix
|
|
65
|
+
/** 4×5 row-major colour matrix: rows R, G, B, A of `[r, g, b, a, bias]`. */
|
|
66
66
|
matrix: number[];
|
|
67
67
|
}
|
|
68
68
|
/** Tone curve through control points. */
|
|
@@ -131,7 +131,7 @@ export declare class AdjustmentChain {
|
|
|
131
131
|
exposure(options: number | ExposureFilterOptions): this;
|
|
132
132
|
/** Append a color-adjustment filter from the given partial settings. */
|
|
133
133
|
colorAdjustment(options: ColorAdjustmentFilterOptions): this;
|
|
134
|
-
/** Append a raw 4×5 row-major color matrix
|
|
134
|
+
/** Append a raw 4×5 row-major color matrix. */
|
|
135
135
|
colorMatrix(options: number[] | ColorMatrixFilterOptions): this;
|
|
136
136
|
/** Append a curves filter from control `points` ([input, output] pairs). */
|
|
137
137
|
curves(options: CurvesFilterOptions): this;
|
|
@@ -208,10 +208,6 @@ export declare class AdjustmentChain {
|
|
|
208
208
|
kaleidoscope(options?: AsFilterOptions<number | KaleidoscopeOptions>): this;
|
|
209
209
|
/** Append a custom shader pass over the fill. */
|
|
210
210
|
shader(options: AsFilterOptions<ShaderEffectOptions>): this;
|
|
211
|
-
/** @deprecated Use {@link AdjustmentChain.shader}. */
|
|
212
|
-
sksl(options: AsFilterOptions<Omit<ShaderEffectOptions, "source"> & {
|
|
213
|
-
shader: string;
|
|
214
|
-
}>): this;
|
|
215
211
|
/** Allows spreading the chain into an array: `[...Adjustments.blur(5)]`. */
|
|
216
212
|
[Symbol.iterator](): Generator<AnyFilter, void, unknown>;
|
|
217
213
|
/** Serializes to the raw filter array so frameworks that call `toJSON` get a plain value. */
|
|
@@ -253,7 +249,7 @@ export type VideoAdjustment = (MediaAdjustment | VideoOnlyAdjustment) | (MediaAd
|
|
|
253
249
|
*
|
|
254
250
|
* @example
|
|
255
251
|
* node.filters = Adjustments.blur(8).grayscale(1);
|
|
256
|
-
*
|
|
252
|
+
* Rect({ fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }) })
|
|
257
253
|
*/
|
|
258
254
|
export declare const Adjustments: AdjustmentChain;
|
|
259
255
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EACR,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACd,MAAM,kBAAkB,CAAC;AAE1B,kEAAkE;AAClE,KAAK,SAAS,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAC9B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,oDAAoD;AACpD,MAAM,WAAW,sBAAsB;IACnC,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IAC/B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IAClC,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,sEAAsE;AACtE,MAAM,WAAW,wBAAwB;IACrC,
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EACR,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,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OAAO,EAAE,iBAAiB;CAGlC;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,CAAC;AAEpF;;;GAGG;AACH,MAAM,MAAM,eAAe,GACrB,CAAC,eAAe,GAAG,mBAAmB,CAAC,GACvC,CAAC,eAAe,GAAG,mBAAmB,CAAC,EAAE,GACzC,eAAe,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,iBAAwB,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,sBAA6B,CAAC;AAE3D;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,iBAAc,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,sBAAmB,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,EAAE,CAK3G"}
|
|
@@ -65,7 +65,7 @@ export class AdjustmentChain {
|
|
|
65
65
|
colorAdjustment(options) {
|
|
66
66
|
return this.append({ type: 'colorAdjustment', ...options });
|
|
67
67
|
}
|
|
68
|
-
/** Append a raw 4×5 row-major color matrix
|
|
68
|
+
/** Append a raw 4×5 row-major color matrix. */
|
|
69
69
|
colorMatrix(options) {
|
|
70
70
|
const matrix = Array.isArray(options) ? options : options.matrix;
|
|
71
71
|
return this.append({ type: 'colorMatrix', matrix });
|
|
@@ -213,10 +213,6 @@ export class AdjustmentChain {
|
|
|
213
213
|
shader(options) {
|
|
214
214
|
return this.append(fromEffect(new EffectChain().shader(options)));
|
|
215
215
|
}
|
|
216
|
-
/** @deprecated Use {@link AdjustmentChain.shader}. */
|
|
217
|
-
sksl(options) {
|
|
218
|
-
return this.append(fromEffect(new EffectChain().sksl(options)));
|
|
219
|
-
}
|
|
220
216
|
/** Allows spreading the chain into an array: `[...Adjustments.blur(5)]`. */
|
|
221
217
|
*[Symbol.iterator]() {
|
|
222
218
|
yield* this.list;
|
|
@@ -256,7 +252,7 @@ export class VideoAdjustmentChain extends AdjustmentChain {
|
|
|
256
252
|
*
|
|
257
253
|
* @example
|
|
258
254
|
* node.filters = Adjustments.blur(8).grayscale(1);
|
|
259
|
-
*
|
|
255
|
+
* Rect({ fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }) })
|
|
260
256
|
*/
|
|
261
257
|
export const Adjustments = new AdjustmentChain();
|
|
262
258
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkJ/C,8EAA8E;AAC9E,SAAS,YAAY,CAAmB,GAAe,EAAE,GAAY;IACjE,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,KAAkB;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAc,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,eAAe;IACL;IAAnB,YAAmB,OAAoB,EAAE;QAAtB,SAAI,GAAJ,IAAI,CAAkB;IAAI,CAAC;IAE9C;;;OAGG;IACO,MAAM,CAAC,MAAiB;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,WAA8C,CAAC;QACjE,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,uEAAuE;IAEvE,8BAA8B;IAC9B,IAAI,CAAC,OAAmC;QACpC,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,OAAO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;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAExC;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAsD;IAC1F,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrC,IAAI,OAAO,YAAY,eAAe;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\r\nimport { EffectChain } from \"../effects/chain\";\r\nimport type { BlendMode } from \"../fill/blend\";\r\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\r\nimport type { CurvesChannel } from \"./implementations/curves\";\r\nimport type { EffectOptions } from \"../effects/effect-data\";\r\nimport type {\r\n AsciiOptions,\r\n BitCrushOptions,\r\n BlockDisplaceOptions,\r\n BloomOptions,\r\n BulgeOptions,\r\n ChromaticAberrationOptions,\r\n DirectionalBlurOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n EdgesOptions,\r\n GrainOptions,\r\n HalftoneOptions,\r\n InvertOptions,\r\n LutOptions,\r\n KaleidoscopeOptions,\r\n OilPaintOptions,\r\n PixelateOptions,\r\n PosterizeOptions,\r\n ProgressiveBlurOptions,\r\n RadialBlurOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n ScatterOptions,\r\n SharpenOptions,\r\n ShaderEffectOptions,\r\n StreakOptions,\r\n ThresholdOptions,\r\n TwirlOptions,\r\n VignetteOptions,\r\n VintageOptions,\r\n WaveOptions,\r\n} from \"../effects/chain\";\r\n\r\n/** Any concrete filter a chain may hold — pixel or video-only. */\r\ntype AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\r\n\r\n/**\r\n * ## Adjustments and filters are two layers, not two names for one thing\r\n *\r\n * An **adjustment** is the unit an author writes: `Adjustments.blur(8)`, one\r\n * entry in the ordered chain a media fill's `preset` carries. A **filter** is\r\n * the primitive the renderer realises it as — `BlurFilter`, `CurvesFilter`, and\r\n * the `FilterData` handlers in `registry.ts`.\r\n *\r\n * Most of the time the two are one-to-one, which is what makes the distinction\r\n * look like pedantry. It isn't: an editor above this layer composes adjustments\r\n * that have no primitive of their own (a lift/gamma/gain grade is three\r\n * per-channel `CurvesFilter`s), and one primitive — the LUT's texture lookup —\r\n * is reached through no chain builder at all. Naming the two layers apart is\r\n * what lets that mapping be written down instead of assumed.\r\n *\r\n * It also settles a collision with no good answer otherwise: the options for\r\n * `Adjustments.colorAdjustment(…)` are named after the primitive they omit from\r\n * (`ColorAdjustmentFilterOptions`), because `ColorAdjustmentAdjustmentOptions`\r\n * is not a name anyone should have to type.\r\n *\r\n * ## The builders\r\n *\r\n * Media adjustments follow the same one-argument rule as node effects: every\r\n * builder takes a single options object, and those with one dominant scalar\r\n * also accept that scalar directly. Field names are the shared vocabulary —\r\n * `radius` for a pixel distance, `amount` for a 0–1 intensity — so\r\n * `Adjustments.blur(8)` and `Effects.blur(8)` describe the same quantity.\r\n *\r\n * Most of the roster *is* the node-effect roster: an adjustment is an effect\r\n * applied to one fill layer's own pixels instead of to a node and everything\r\n * beneath it, so `Adjustments.oilPaint(4)` and `Effects.oilPaint(4)` are the\r\n * same implementation reached two ways. See {@link EffectAdjustment} for the\r\n * short list of effects that cannot be adjustments.\r\n */\r\n\r\n/** Gaussian blur. Scalar shorthand sets `radius`. */\r\nexport interface BlurFilterOptions {\r\n /** Blur radius in pixels. */\r\n radius: number;\r\n}\r\n\r\n/** Desaturation. Scalar shorthand sets `amount`. */\r\nexport interface GrayscaleFilterOptions {\r\n /** 0 = original, 1 = fully grayscale. */\r\n amount: number;\r\n}\r\n\r\n/** Alpha (opacity) multiply. Scalar shorthand sets `amount`. */\r\nexport interface AlphaFilterOptions {\r\n /** 0 = fully transparent, 1 = unchanged. */\r\n amount: number;\r\n}\r\n\r\n/** Luminance scale. Scalar shorthand sets `amount`. */\r\nexport interface ExposureFilterOptions {\r\n /** Exposure multiplier. 1 = unchanged, >1 brighter, <1 darker. */\r\n amount: number;\r\n}\r\n\r\n/** Raw 4×5 row-major colour matrix. Array shorthand sets `matrix`. */\r\nexport interface ColorMatrixFilterOptions {\r\n /** 4×5 row-major colour matrix in Skia format. */\r\n matrix: number[];\r\n}\r\n\r\n/** Tone curve through control points. */\r\nexport interface CurvesFilterOptions {\r\n /** Curve control points as [input, output] pairs in [0, 1]. */\r\n points: [number, number][];\r\n /** Channel(s) to apply the curve to (default `'rgb'`). */\r\n channel?: CurvesChannel;\r\n}\r\n\r\n/** Photographic tonal/colour adjustments. All fields optional. */\r\nexport type ColorAdjustmentFilterOptions = Omit<ColorAdjustmentFilter, 'type'>;\r\n\r\n/** Stop-motion frame-rate resample (video only). Scalar shorthand sets `fps`. */\r\nexport interface PosterizeTimeFilterOptions {\r\n /** Target frame rate the source playhead snaps to. */\r\n fps: number;\r\n}\r\n\r\n/** Motion-trail echo of past frames (video only). */\r\nexport interface EchoFilterOptions {\r\n /** Number of past-frame taps drawn behind the current frame. */\r\n echoes: number;\r\n /** Delay between successive taps, in source seconds. */\r\n delay: number;\r\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n` (default 0.5). */\r\n decay?: number;\r\n /** Blend mode used to composite the echo taps (default `'screen'`). */\r\n blend?: BlendMode;\r\n}\r\n\r\n/**\r\n * A node effect's builder options as a **filter** accepts them: the same\r\n * fields minus the cross-cutting {@link EffectOptions} (today `mode`).\r\n *\r\n * A filter is on the fill's own pixels by definition, so there is no backdrop\r\n * to point it at — dropping the knob is clearer than accepting it and silently\r\n * ignoring it. Scalar shorthands survive untouched.\r\n */\r\ntype AsFilterOptions<T> = T extends number ? number : Omit<T, keyof EffectOptions>;\r\n\r\n/** Normalise a `number | Options` filter argument onto its dominant field. */\r\nfunction scalarFilter<O extends object>(arg: number | O, key: keyof O): O {\r\n return typeof arg === \"number\" ? ({ [key]: arg } as O) : arg;\r\n}\r\n\r\n/**\r\n * The single effect a one-builder {@link EffectChain} produced.\r\n *\r\n * Every effect-backed filter routes through here rather than re-declaring the\r\n * effect literal, so defaults, scalar shorthands and field normalisation have\r\n * exactly one definition — the one scenes already use.\r\n */\r\nfunction fromEffect(chain: EffectChain): AnyFilter {\r\n return chain.list[0] as AnyFilter;\r\n}\r\n\r\n/**\r\n * Immutable, chainable list of media filters — the filters valid on an **image**\r\n * fill.\r\n *\r\n * Each builder method returns a new chain with the filter appended, so chains\r\n * are safe to share and branch. {@link VideoAdjustmentChain} extends this with the\r\n * video-only temporal filters; the split is what keeps `posterizeTime` off an\r\n * image fill, mirroring how `Fill` is structured.\r\n *\r\n * @example\r\n * const chain = Adjustments.blur(4).grayscale(0.5);\r\n * node.filters = chain; // assign directly\r\n * node.filters = [...chain, { type: 'alpha', amount: 0.5 }]; // spread into array\r\n */\r\nexport class AdjustmentChain {\r\n constructor(public list: AnyFilter[] = []) { }\r\n\r\n /**\r\n * Append `filter`, returning a chain of the same class — so the video\r\n * subclass keeps its extra builders reachable after an inherited one.\r\n */\r\n protected append(filter: AnyFilter): this {\r\n const Ctor = this.constructor as new (list: AnyFilter[]) => this;\r\n return new Ctor([...this.list, filter]);\r\n }\r\n\r\n // -- Filters with no node-effect counterpart -------------------------\r\n\r\n /** Append a Gaussian blur. */\r\n blur(options: number | BlurFilterOptions) {\r\n const { radius } = scalarFilter(options, \"radius\");\r\n return this.append({ type: 'blur', radius });\r\n }\r\n\r\n /** Append a grayscale filter. */\r\n grayscale(options: number | GrayscaleFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'grayscale', amount });\r\n }\r\n\r\n /** Append an alpha (opacity) filter. */\r\n alpha(options: number | AlphaFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'alpha', amount });\r\n }\r\n\r\n /** Append an exposure filter. */\r\n exposure(options: number | ExposureFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'exposure', amount });\r\n }\r\n\r\n /** Append a color-adjustment filter from the given partial settings. */\r\n colorAdjustment(options: ColorAdjustmentFilterOptions) {\r\n return this.append({ type: 'colorAdjustment', ...options });\r\n }\r\n\r\n /** Append a raw 4×5 row-major color matrix (Skia format). */\r\n colorMatrix(options: number[] | ColorMatrixFilterOptions) {\r\n const matrix = Array.isArray(options) ? options : options.matrix;\r\n return this.append({ type: 'colorMatrix', matrix });\r\n }\r\n\r\n /** Append a curves filter from control `points` ([input, output] pairs). */\r\n curves(options: CurvesFilterOptions) {\r\n return this.append({ type: 'curves', points: options.points, channel: options.channel });\r\n }\r\n\r\n // -- Blur family ------------------------------------------------------\r\n\r\n /** Append a directional (linear) blur, smearing the fill along one axis. */\r\n directionalBlur(options: AsFilterOptions<number | DirectionalBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().directionalBlur(options)));\r\n }\r\n\r\n /** Append a radial blur — zoom or spin streaks about a centre point. */\r\n radialBlur(options?: AsFilterOptions<number | RadialBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().radialBlur(options)));\r\n }\r\n\r\n /**\r\n * Append a progressive blur — a blur that ramps across the fill, for the\r\n * frosted-toward-one-edge look.\r\n */\r\n progressiveBlur(options?: AsFilterOptions<number | ProgressiveBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().progressiveBlur(options)));\r\n }\r\n\r\n /** Append a bloom (glow): bright areas bleed soft light outward. */\r\n bloom(options?: AsFilterOptions<number | BloomOptions>) {\r\n return this.append(fromEffect(new EffectChain().bloom(options)));\r\n }\r\n\r\n /** Append anamorphic streaks off the fill's highlights. */\r\n streak(options?: AsFilterOptions<number | StreakOptions>) {\r\n return this.append(fromEffect(new EffectChain().streak(options)));\r\n }\r\n\r\n /** Append an unsharp-mask sharpen. */\r\n sharpen(options?: AsFilterOptions<number | SharpenOptions>) {\r\n return this.append(fromEffect(new EffectChain().sharpen(options)));\r\n }\r\n\r\n // -- Colour -----------------------------------------------------------\r\n\r\n /** Append a colour invert (negative). */\r\n invert(options?: AsFilterOptions<number | InvertOptions>) {\r\n return this.append(fromEffect(new EffectChain().invert(options)));\r\n }\r\n\r\n /** Append a vintage / film-look grade (sepia + desaturate + warmth). */\r\n vintage(options?: AsFilterOptions<number | VintageOptions>) {\r\n return this.append(fromEffect(new EffectChain().vintage(options)));\r\n }\r\n\r\n /** Append a duotone map — remap luminance between two colours. */\r\n duotone(options?: AsFilterOptions<number | DuotoneOptions>) {\r\n return this.append(fromEffect(new EffectChain().duotone(options)));\r\n }\r\n\r\n /** Append colour banding: quantize to `levels` tones per channel. */\r\n posterize(options?: AsFilterOptions<number | PosterizeOptions>) {\r\n return this.append(fromEffect(new EffectChain().posterize(options)));\r\n }\r\n\r\n /** Append a hard luminance threshold (1-bit black/white). */\r\n threshold(options?: AsFilterOptions<number | ThresholdOptions>) {\r\n return this.append(fromEffect(new EffectChain().threshold(options)));\r\n }\r\n\r\n /** Append a bit-depth crush, optionally snapping to a hardware palette. */\r\n bitCrush(options?: AsFilterOptions<number | BitCrushOptions>) {\r\n return this.append(fromEffect(new EffectChain().bitCrush(options)));\r\n }\r\n\r\n // -- Texture / pattern ------------------------------------------------\r\n\r\n /**\r\n * Append ordered (Bayer) dithering — quantize to `levels` tones, hiding the\r\n * banding in a repeating threshold pattern.\r\n */\r\n dither(options?: AsFilterOptions<number | DitherOptions>) {\r\n return this.append(fromEffect(new EffectChain().dither(options)));\r\n }\r\n\r\n /** Append a halftone screen — print-style dots (or lines) sized by tone. */\r\n halftone(options?: AsFilterOptions<number | HalftoneOptions>) {\r\n return this.append(fromEffect(new EffectChain().halftone(options)));\r\n }\r\n\r\n /** Append film grain. Animate it by tweening `seed`. */\r\n grain(options?: AsFilterOptions<number | GrainOptions>) {\r\n return this.append(fromEffect(new EffectChain().grain(options)));\r\n }\r\n\r\n /** Append a 3D colour lookup table — see {@link EffectChain.lut}. */\r\n lut(options: AsFilterOptions<LutOptions>) {\r\n return this.append(fromEffect(new EffectChain().lut(options as LutOptions)));\r\n }\r\n\r\n /** Append CRT-style scanlines. */\r\n scanlines(options?: AsFilterOptions<number | ScanlinesOptions>) {\r\n return this.append(fromEffect(new EffectChain().scanlines(options)));\r\n }\r\n\r\n /** Append an After Effects-style Mosaic — `blocks` across the fill. */\r\n pixelate(options: AsFilterOptions<number | PixelateOptions>) {\r\n return this.append(fromEffect(new EffectChain().pixelate(options)));\r\n }\r\n\r\n /**\r\n * Append Kuwahara \"oil paint\" brushwork: average within a region, never\r\n * across an edge, so flat areas smooth into strokes while edges stay crisp.\r\n *\r\n * Cost grows with `radius²` — the most expensive filter in the set.\r\n */\r\n oilPaint(options?: AsFilterOptions<number | OilPaintOptions>) {\r\n return this.append(fromEffect(new EffectChain().oilPaint(options)));\r\n }\r\n\r\n /** Append an ASCII-art remap of the fill through a glyph ramp. */\r\n ascii(options?: AsFilterOptions<number | AsciiOptions>) {\r\n return this.append(fromEffect(new EffectChain().ascii(options)));\r\n }\r\n\r\n /** Append an edge-detect pass (Sobel / Prewitt / Laplacian). */\r\n edges(options?: AsFilterOptions<number | EdgesOptions>) {\r\n return this.append(fromEffect(new EffectChain().edges(options)));\r\n }\r\n\r\n /** Append a darkened border falling off toward the fill's corners. */\r\n vignette(options?: AsFilterOptions<number | VignetteOptions>) {\r\n return this.append(fromEffect(new EffectChain().vignette(options)));\r\n }\r\n\r\n // -- Displacement / lens ----------------------------------------------\r\n\r\n /** Append lens-dispersion colour fringing. */\r\n chromaticAberration(options?: AsFilterOptions<number | ChromaticAberrationOptions>) {\r\n return this.append(fromEffect(new EffectChain().chromaticAberration(options)));\r\n }\r\n\r\n /** Append a hard per-channel RGB offset (the glitchy cousin of the above). */\r\n rgbShift(options?: AsFilterOptions<number | RgbShiftOptions>) {\r\n return this.append(fromEffect(new EffectChain().rgbShift(options)));\r\n }\r\n\r\n /** Append per-pixel random jitter. */\r\n scatter(options?: AsFilterOptions<number | ScatterOptions>) {\r\n return this.append(fromEffect(new EffectChain().scatter(options)));\r\n }\r\n\r\n /** Append horizontal band tearing — the datamosh / bad-signal look. */\r\n blockDisplace(options?: AsFilterOptions<number | BlockDisplaceOptions>) {\r\n return this.append(fromEffect(new EffectChain().blockDisplace(options)));\r\n }\r\n\r\n /** Append a bulge (barrel) or, with a negative strength, a pinch. */\r\n bulge(options: AsFilterOptions<number | BulgeOptions>) {\r\n return this.append(fromEffect(new EffectChain().bulge(options)));\r\n }\r\n\r\n /** Append a twirl (swirl about a centre point). */\r\n twirl(options?: AsFilterOptions<number | TwirlOptions>) {\r\n return this.append(fromEffect(new EffectChain().twirl(options)));\r\n }\r\n\r\n /** Append a sine/triangle/square wave warp. */\r\n wave(options?: AsFilterOptions<number | WaveOptions>) {\r\n return this.append(fromEffect(new EffectChain().wave(options)));\r\n }\r\n\r\n /** Append a kaleidoscope mirror of the fill about a centre point. */\r\n kaleidoscope(options?: AsFilterOptions<number | KaleidoscopeOptions>) {\r\n return this.append(fromEffect(new EffectChain().kaleidoscope(options)));\r\n }\r\n\r\n /** Append a custom shader pass over the fill. */\r\n shader(options: AsFilterOptions<ShaderEffectOptions>) {\r\n return this.append(fromEffect(new EffectChain().shader(options)));\r\n }\r\n\r\n /** @deprecated Use {@link AdjustmentChain.shader}. */\r\n sksl(options: AsFilterOptions<Omit<ShaderEffectOptions, \"source\"> & { shader: string }>) {\r\n return this.append(fromEffect(new EffectChain().sksl(options)));\r\n }\r\n\r\n /** Allows spreading the chain into an array: `[...Adjustments.blur(5)]`. */\r\n *[Symbol.iterator]() {\r\n yield* this.list;\r\n }\r\n\r\n /** Serializes to the raw filter array so frameworks that call `toJSON` get a plain value. */\r\n toJSON() {\r\n return this.list;\r\n }\r\n}\r\n\r\n/**\r\n * An {@link AdjustmentChain} plus the video-only temporal filters — the\r\n * filters valid on a **video** fill.\r\n *\r\n * @example\r\n * node.filters = VideoAdjustments.posterizeTime(6).grayscale(1);\r\n */\r\nexport class VideoAdjustmentChain extends AdjustmentChain {\r\n /** Append a posterize-time filter; snaps the video playhead to `fps`. */\r\n posterizeTime(options: number | PosterizeTimeFilterOptions) {\r\n const { fps } = scalarFilter(options, \"fps\");\r\n return this.append({ type: 'posterizeTime', fps });\r\n }\r\n\r\n /** Append an echo (motion-trail) filter over the clip's past frames. */\r\n echo(options: EchoFilterOptions) {\r\n return this.append({ type: 'echo', ...options });\r\n }\r\n}\r\n\r\n/**\r\n * Accepted shapes for an **image** fill's `filters` prop — a single pixel\r\n * filter, a plain array of them, or a filter chain. Mirrors how `Fill` is the\r\n * loose author-facing union for a fill. Video-only filters are excluded here.\r\n */\r\nexport type ImageAdjustment = MediaAdjustment | MediaAdjustment[] | AdjustmentChain;\r\n\r\n/**\r\n * Accepted shapes for a **video** fill's `filters` prop — the pixel filters\r\n * plus the video-only temporal filters (`posterizeTime`, `echo`).\r\n */\r\nexport type VideoAdjustment =\r\n | (MediaAdjustment | VideoOnlyAdjustment)\r\n | (MediaAdjustment | VideoOnlyAdjustment)[]\r\n | AdjustmentChain;\r\n\r\n/**\r\n * Entry point for building **image** filter chains fluently.\r\n *\r\n * An empty chain, so `Adjustments.blur(8)` is `new AdjustmentChain().blur(8)`\r\n * — and every builder's signature and documentation has one definition, on\r\n * {@link AdjustmentChain}, which is what an editor shows on hover.\r\n *\r\n * Contains only pixel filters; video-only filters (`posterizeTime`, `echo`)\r\n * live on {@link VideoAdjustments} because image fills cannot use them.\r\n *\r\n * @example\r\n * node.filters = Adjustments.blur(8).grayscale(1);\r\n * <Rect fill={Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) })} />\r\n */\r\nexport const Adjustments = new AdjustmentChain();\r\n\r\n/**\r\n * Entry point for building **video** filter chains fluently — every\r\n * {@link Adjustments} builder plus the video-only temporal ones.\r\n *\r\n * @example\r\n * node.filters = VideoAdjustments.posterizeTime(6);\r\n * node.filters = VideoAdjustments.grayscale(1).blur(6);\r\n */\r\nexport const VideoAdjustments = new VideoAdjustmentChain();\r\n\r\n/**\r\n * The previous name for {@link Adjustments}.\r\n *\r\n * Kept because a scene is *source code in someone else's project*: a rename that\r\n * only shows up as a compile error in a file we can't edit is still a rename that\r\n * broke their build. The alias costs one line and buys a release in which both\r\n * spellings work.\r\n *\r\n * @deprecated Use {@link Adjustments}. Removed in the next major.\r\n */\r\nexport const ImageFilters = Adjustments;\r\n\r\n/**\r\n * The previous name for {@link VideoAdjustments}.\r\n *\r\n * @deprecated Use {@link VideoAdjustments}. Removed in the next major.\r\n */\r\nexport const VideoFilters = VideoAdjustments;\r\n\r\n/**\r\n * Normalises any `ImageAdjustment`/`VideoAdjustment` value to a plain filter array.\r\n * Used internally when reading props before rendering or interpolation.\r\n */\r\nexport function resolveChainAdjustments(filters: ImageAdjustment | VideoAdjustment | undefined): AnyFilter[] {\r\n if (filters === undefined) return [];\r\n if (filters instanceof AdjustmentChain) return filters.list;\r\n if (Array.isArray(filters)) return filters;\r\n return [filters];\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkJ/C,8EAA8E;AAC9E,SAAS,YAAY,CAAmB,GAAe,EAAE,GAAY;IACjE,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,KAAkB;IAClC,OAAO,KAAK,CAAC,I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AAM,EAAE,GAAG,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,wEAAwE;IACxE,IAAI,CAAC,OAA0B;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;CACJ;AAkBD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAExC;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAsD;IAC1F,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrC,IAAI,OAAO,YAAY,eAAe;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\r\nimport { EffectChain } from \"../effects/chain\";\r\nimport type { BlendMode } from \"../fill/blend\";\r\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\r\nimport type { CurvesChannel } from \"./implementations/curves\";\r\nimport type { EffectOptions } from \"../effects/effect-data\";\r\nimport type {\r\n AsciiOptions,\r\n BitCrushOptions,\r\n BlockDisplaceOptions,\r\n BloomOptions,\r\n BulgeOptions,\r\n ChromaticAberrationOptions,\r\n DirectionalBlurOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n EdgesOptions,\r\n GrainOptions,\r\n HalftoneOptions,\r\n InvertOptions,\r\n LutOptions,\r\n KaleidoscopeOptions,\r\n OilPaintOptions,\r\n PixelateOptions,\r\n PosterizeOptions,\r\n ProgressiveBlurOptions,\r\n RadialBlurOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n ScatterOptions,\r\n SharpenOptions,\r\n ShaderEffectOptions,\r\n StreakOptions,\r\n ThresholdOptions,\r\n TwirlOptions,\r\n VignetteOptions,\r\n VintageOptions,\r\n WaveOptions,\r\n} from \"../effects/chain\";\r\n\r\n/** Any concrete filter a chain may hold — pixel or video-only. */\r\ntype AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\r\n\r\n/**\r\n * ## Adjustments and filters are two layers, not two names for one thing\r\n *\r\n * An **adjustment** is the unit an author writes: `Adjustments.blur(8)`, one\r\n * entry in the ordered chain a media fill's `preset` carries. A **filter** is\r\n * the primitive the renderer realises it as — `BlurFilter`, `CurvesFilter`, and\r\n * the `FilterData` handlers in `registry.ts`.\r\n *\r\n * Most of the time the two are one-to-one, which is what makes the distinction\r\n * look like pedantry. It isn't: an editor above this layer composes adjustments\r\n * that have no primitive of their own (a lift/gamma/gain grade is three\r\n * per-channel `CurvesFilter`s), and one primitive — the LUT's texture lookup —\r\n * is reached through no chain builder at all. Naming the two layers apart is\r\n * what lets that mapping be written down instead of assumed.\r\n *\r\n * It also settles a collision with no good answer otherwise: the options for\r\n * `Adjustments.colorAdjustment(…)` are named after the primitive they omit from\r\n * (`ColorAdjustmentFilterOptions`), because `ColorAdjustmentAdjustmentOptions`\r\n * is not a name anyone should have to type.\r\n *\r\n * ## The builders\r\n *\r\n * Media adjustments follow the same one-argument rule as node effects: every\r\n * builder takes a single options object, and those with one dominant scalar\r\n * also accept that scalar directly. Field names are the shared vocabulary —\r\n * `radius` for a pixel distance, `amount` for a 0–1 intensity — so\r\n * `Adjustments.blur(8)` and `Effects.blur(8)` describe the same quantity.\r\n *\r\n * Most of the roster *is* the node-effect roster: an adjustment is an effect\r\n * applied to one fill layer's own pixels instead of to a node and everything\r\n * beneath it, so `Adjustments.oilPaint(4)` and `Effects.oilPaint(4)` are the\r\n * same implementation reached two ways. See {@link EffectAdjustment} for the\r\n * short list of effects that cannot be adjustments.\r\n */\r\n\r\n/** Gaussian blur. Scalar shorthand sets `radius`. */\r\nexport interface BlurFilterOptions {\r\n /** Blur radius in pixels. */\r\n radius: number;\r\n}\r\n\r\n/** Desaturation. Scalar shorthand sets `amount`. */\r\nexport interface GrayscaleFilterOptions {\r\n /** 0 = original, 1 = fully grayscale. */\r\n amount: number;\r\n}\r\n\r\n/** Alpha (opacity) multiply. Scalar shorthand sets `amount`. */\r\nexport interface AlphaFilterOptions {\r\n /** 0 = fully transparent, 1 = unchanged. */\r\n amount: number;\r\n}\r\n\r\n/** Luminance scale. Scalar shorthand sets `amount`. */\r\nexport interface ExposureFilterOptions {\r\n /** Exposure multiplier. 1 = unchanged, >1 brighter, <1 darker. */\r\n amount: number;\r\n}\r\n\r\n/** Raw 4×5 row-major colour matrix. Array shorthand sets `matrix`. */\r\nexport interface ColorMatrixFilterOptions {\r\n /** 4×5 row-major colour matrix: rows R, G, B, A of `[r, g, b, a, bias]`. */\r\n matrix: number[];\r\n}\r\n\r\n/** Tone curve through control points. */\r\nexport interface CurvesFilterOptions {\r\n /** Curve control points as [input, output] pairs in [0, 1]. */\r\n points: [number, number][];\r\n /** Channel(s) to apply the curve to (default `'rgb'`). */\r\n channel?: CurvesChannel;\r\n}\r\n\r\n/** Photographic tonal/colour adjustments. All fields optional. */\r\nexport type ColorAdjustmentFilterOptions = Omit<ColorAdjustmentFilter, 'type'>;\r\n\r\n/** Stop-motion frame-rate resample (video only). Scalar shorthand sets `fps`. */\r\nexport interface PosterizeTimeFilterOptions {\r\n /** Target frame rate the source playhead snaps to. */\r\n fps: number;\r\n}\r\n\r\n/** Motion-trail echo of past frames (video only). */\r\nexport interface EchoFilterOptions {\r\n /** Number of past-frame taps drawn behind the current frame. */\r\n echoes: number;\r\n /** Delay between successive taps, in source seconds. */\r\n delay: number;\r\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n` (default 0.5). */\r\n decay?: number;\r\n /** Blend mode used to composite the echo taps (default `'screen'`). */\r\n blend?: BlendMode;\r\n}\r\n\r\n/**\r\n * A node effect's builder options as a **filter** accepts them: the same\r\n * fields minus the cross-cutting {@link EffectOptions} (today `mode`).\r\n *\r\n * A filter is on the fill's own pixels by definition, so there is no backdrop\r\n * to point it at — dropping the knob is clearer than accepting it and silently\r\n * ignoring it. Scalar shorthands survive untouched.\r\n */\r\ntype AsFilterOptions<T> = T extends number ? number : Omit<T, keyof EffectOptions>;\r\n\r\n/** Normalise a `number | Options` filter argument onto its dominant field. */\r\nfunction scalarFilter<O extends object>(arg: number | O, key: keyof O): O {\r\n return typeof arg === \"number\" ? ({ [key]: arg } as O) : arg;\r\n}\r\n\r\n/**\r\n * The single effect a one-builder {@link EffectChain} produced.\r\n *\r\n * Every effect-backed filter routes through here rather than re-declaring the\r\n * effect literal, so defaults, scalar shorthands and field normalisation have\r\n * exactly one definition — the one scenes already use.\r\n */\r\nfunction fromEffect(chain: EffectChain): AnyFilter {\r\n return chain.list[0] as AnyFilter;\r\n}\r\n\r\n/**\r\n * Immutable, chainable list of media filters — the filters valid on an **image**\r\n * fill.\r\n *\r\n * Each builder method returns a new chain with the filter appended, so chains\r\n * are safe to share and branch. {@link VideoAdjustmentChain} extends this with the\r\n * video-only temporal filters; the split is what keeps `posterizeTime` off an\r\n * image fill, mirroring how `Fill` is structured.\r\n *\r\n * @example\r\n * const chain = Adjustments.blur(4).grayscale(0.5);\r\n * node.filters = chain; // assign directly\r\n * node.filters = [...chain, { type: 'alpha', amount: 0.5 }]; // spread into array\r\n */\r\nexport class AdjustmentChain {\r\n constructor(public list: AnyFilter[] = []) { }\r\n\r\n /**\r\n * Append `filter`, returning a chain of the same class — so the video\r\n * subclass keeps its extra builders reachable after an inherited one.\r\n */\r\n protected append(filter: AnyFilter): this {\r\n const Ctor = this.constructor as new (list: AnyFilter[]) => this;\r\n return new Ctor([...this.list, filter]);\r\n }\r\n\r\n // -- Filters with no node-effect counterpart -------------------------\r\n\r\n /** Append a Gaussian blur. */\r\n blur(options: number | BlurFilterOptions) {\r\n const { radius } = scalarFilter(options, \"radius\");\r\n return this.append({ type: 'blur', radius });\r\n }\r\n\r\n /** Append a grayscale filter. */\r\n grayscale(options: number | GrayscaleFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'grayscale', amount });\r\n }\r\n\r\n /** Append an alpha (opacity) filter. */\r\n alpha(options: number | AlphaFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'alpha', amount });\r\n }\r\n\r\n /** Append an exposure filter. */\r\n exposure(options: number | ExposureFilterOptions) {\r\n const { amount } = scalarFilter(options, \"amount\");\r\n return this.append({ type: 'exposure', amount });\r\n }\r\n\r\n /** Append a color-adjustment filter from the given partial settings. */\r\n colorAdjustment(options: ColorAdjustmentFilterOptions) {\r\n return this.append({ type: 'colorAdjustment', ...options });\r\n }\r\n\r\n /** Append a raw 4×5 row-major color matrix. */\r\n colorMatrix(options: number[] | ColorMatrixFilterOptions) {\r\n const matrix = Array.isArray(options) ? options : options.matrix;\r\n return this.append({ type: 'colorMatrix', matrix });\r\n }\r\n\r\n /** Append a curves filter from control `points` ([input, output] pairs). */\r\n curves(options: CurvesFilterOptions) {\r\n return this.append({ type: 'curves', points: options.points, channel: options.channel });\r\n }\r\n\r\n // -- Blur family ------------------------------------------------------\r\n\r\n /** Append a directional (linear) blur, smearing the fill along one axis. */\r\n directionalBlur(options: AsFilterOptions<number | DirectionalBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().directionalBlur(options)));\r\n }\r\n\r\n /** Append a radial blur — zoom or spin streaks about a centre point. */\r\n radialBlur(options?: AsFilterOptions<number | RadialBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().radialBlur(options)));\r\n }\r\n\r\n /**\r\n * Append a progressive blur — a blur that ramps across the fill, for the\r\n * frosted-toward-one-edge look.\r\n */\r\n progressiveBlur(options?: AsFilterOptions<number | ProgressiveBlurOptions>) {\r\n return this.append(fromEffect(new EffectChain().progressiveBlur(options)));\r\n }\r\n\r\n /** Append a bloom (glow): bright areas bleed soft light outward. */\r\n bloom(options?: AsFilterOptions<number | BloomOptions>) {\r\n return this.append(fromEffect(new EffectChain().bloom(options)));\r\n }\r\n\r\n /** Append anamorphic streaks off the fill's highlights. */\r\n streak(options?: AsFilterOptions<number | StreakOptions>) {\r\n return this.append(fromEffect(new EffectChain().streak(options)));\r\n }\r\n\r\n /** Append an unsharp-mask sharpen. */\r\n sharpen(options?: AsFilterOptions<number | SharpenOptions>) {\r\n return this.append(fromEffect(new EffectChain().sharpen(options)));\r\n }\r\n\r\n // -- Colour -----------------------------------------------------------\r\n\r\n /** Append a colour invert (negative). */\r\n invert(options?: AsFilterOptions<number | InvertOptions>) {\r\n return this.append(fromEffect(new EffectChain().invert(options)));\r\n }\r\n\r\n /** Append a vintage / film-look grade (sepia + desaturate + warmth). */\r\n vintage(options?: AsFilterOptions<number | VintageOptions>) {\r\n return this.append(fromEffect(new EffectChain().vintage(options)));\r\n }\r\n\r\n /** Append a duotone map — remap luminance between two colours. */\r\n duotone(options?: AsFilterOptions<number | DuotoneOptions>) {\r\n return this.append(fromEffect(new EffectChain().duotone(options)));\r\n }\r\n\r\n /** Append colour banding: quantize to `levels` tones per channel. */\r\n posterize(options?: AsFilterOptions<number | PosterizeOptions>) {\r\n return this.append(fromEffect(new EffectChain().posterize(options)));\r\n }\r\n\r\n /** Append a hard luminance threshold (1-bit black/white). */\r\n threshold(options?: AsFilterOptions<number | ThresholdOptions>) {\r\n return this.append(fromEffect(new EffectChain().threshold(options)));\r\n }\r\n\r\n /** Append a bit-depth crush, optionally snapping to a hardware palette. */\r\n bitCrush(options?: AsFilterOptions<number | BitCrushOptions>) {\r\n return this.append(fromEffect(new EffectChain().bitCrush(options)));\r\n }\r\n\r\n // -- Texture / pattern ------------------------------------------------\r\n\r\n /**\r\n * Append ordered (Bayer) dithering — quantize to `levels` tones, hiding the\r\n * banding in a repeating threshold pattern.\r\n */\r\n dither(options?: AsFilterOptions<number | DitherOptions>) {\r\n return this.append(fromEffect(new EffectChain().dither(options)));\r\n }\r\n\r\n /** Append a halftone screen — print-style dots (or lines) sized by tone. */\r\n halftone(options?: AsFilterOptions<number | HalftoneOptions>) {\r\n return this.append(fromEffect(new EffectChain().halftone(options)));\r\n }\r\n\r\n /** Append film grain. Animate it by tweening `seed`. */\r\n grain(options?: AsFilterOptions<number | GrainOptions>) {\r\n return this.append(fromEffect(new EffectChain().grain(options)));\r\n }\r\n\r\n /** Append a 3D colour lookup table — see {@link EffectChain.lut}. */\r\n lut(options: AsFilterOptions<LutOptions>) {\r\n return this.append(fromEffect(new EffectChain().lut(options as LutOptions)));\r\n }\r\n\r\n /** Append CRT-style scanlines. */\r\n scanlines(options?: AsFilterOptions<number | ScanlinesOptions>) {\r\n return this.append(fromEffect(new EffectChain().scanlines(options)));\r\n }\r\n\r\n /** Append an After Effects-style Mosaic — `blocks` across the fill. */\r\n pixelate(options: AsFilterOptions<number | PixelateOptions>) {\r\n return this.append(fromEffect(new EffectChain().pixelate(options)));\r\n }\r\n\r\n /**\r\n * Append Kuwahara \"oil paint\" brushwork: average within a region, never\r\n * across an edge, so flat areas smooth into strokes while edges stay crisp.\r\n *\r\n * Cost grows with `radius²` — the most expensive filter in the set.\r\n */\r\n oilPaint(options?: AsFilterOptions<number | OilPaintOptions>) {\r\n return this.append(fromEffect(new EffectChain().oilPaint(options)));\r\n }\r\n\r\n /** Append an ASCII-art remap of the fill through a glyph ramp. */\r\n ascii(options?: AsFilterOptions<number | AsciiOptions>) {\r\n return this.append(fromEffect(new EffectChain().ascii(options)));\r\n }\r\n\r\n /** Append an edge-detect pass (Sobel / Prewitt / Laplacian). */\r\n edges(options?: AsFilterOptions<number | EdgesOptions>) {\r\n return this.append(fromEffect(new EffectChain().edges(options)));\r\n }\r\n\r\n /** Append a darkened border falling off toward the fill's corners. */\r\n vignette(options?: AsFilterOptions<number | VignetteOptions>) {\r\n return this.append(fromEffect(new EffectChain().vignette(options)));\r\n }\r\n\r\n // -- Displacement / lens ----------------------------------------------\r\n\r\n /** Append lens-dispersion colour fringing. */\r\n chromaticAberration(options?: AsFilterOptions<number | ChromaticAberrationOptions>) {\r\n return this.append(fromEffect(new EffectChain().chromaticAberration(options)));\r\n }\r\n\r\n /** Append a hard per-channel RGB offset (the glitchy cousin of the above). */\r\n rgbShift(options?: AsFilterOptions<number | RgbShiftOptions>) {\r\n return this.append(fromEffect(new EffectChain().rgbShift(options)));\r\n }\r\n\r\n /** Append per-pixel random jitter. */\r\n scatter(options?: AsFilterOptions<number | ScatterOptions>) {\r\n return this.append(fromEffect(new EffectChain().scatter(options)));\r\n }\r\n\r\n /** Append horizontal band tearing — the datamosh / bad-signal look. */\r\n blockDisplace(options?: AsFilterOptions<number | BlockDisplaceOptions>) {\r\n return this.append(fromEffect(new EffectChain().blockDisplace(options)));\r\n }\r\n\r\n /** Append a bulge (barrel) or, with a negative strength, a pinch. */\r\n bulge(options: AsFilterOptions<number | BulgeOptions>) {\r\n return this.append(fromEffect(new EffectChain().bulge(options)));\r\n }\r\n\r\n /** Append a twirl (swirl about a centre point). */\r\n twirl(options?: AsFilterOptions<number | TwirlOptions>) {\r\n return this.append(fromEffect(new EffectChain().twirl(options)));\r\n }\r\n\r\n /** Append a sine/triangle/square wave warp. */\r\n wave(options?: AsFilterOptions<number | WaveOptions>) {\r\n return this.append(fromEffect(new EffectChain().wave(options)));\r\n }\r\n\r\n /** Append a kaleidoscope mirror of the fill about a centre point. */\r\n kaleidoscope(options?: AsFilterOptions<number | KaleidoscopeOptions>) {\r\n return this.append(fromEffect(new EffectChain().kaleidoscope(options)));\r\n }\r\n\r\n /** Append a custom shader pass over the fill. */\r\n shader(options: AsFilterOptions<ShaderEffectOptions>) {\r\n return this.append(fromEffect(new EffectChain().shader(options)));\r\n }\r\n\r\n /** Allows spreading the chain into an array: `[...Adjustments.blur(5)]`. */\r\n *[Symbol.iterator]() {\r\n yield* this.list;\r\n }\r\n\r\n /** Serializes to the raw filter array so frameworks that call `toJSON` get a plain value. */\r\n toJSON() {\r\n return this.list;\r\n }\r\n}\r\n\r\n/**\r\n * An {@link AdjustmentChain} plus the video-only temporal filters — the\r\n * filters valid on a **video** fill.\r\n *\r\n * @example\r\n * node.filters = VideoAdjustments.posterizeTime(6).grayscale(1);\r\n */\r\nexport class VideoAdjustmentChain extends AdjustmentChain {\r\n /** Append a posterize-time filter; snaps the video playhead to `fps`. */\r\n posterizeTime(options: number | PosterizeTimeFilterOptions) {\r\n const { fps } = scalarFilter(options, \"fps\");\r\n return this.append({ type: 'posterizeTime', fps });\r\n }\r\n\r\n /** Append an echo (motion-trail) filter over the clip's past frames. */\r\n echo(options: EchoFilterOptions) {\r\n return this.append({ type: 'echo', ...options });\r\n }\r\n}\r\n\r\n/**\r\n * Accepted shapes for an **image** fill's `filters` prop — a single pixel\r\n * filter, a plain array of them, or a filter chain. Mirrors how `Fill` is the\r\n * loose author-facing union for a fill. Video-only filters are excluded here.\r\n */\r\nexport type ImageAdjustment = MediaAdjustment | MediaAdjustment[] | AdjustmentChain;\r\n\r\n/**\r\n * Accepted shapes for a **video** fill's `filters` prop — the pixel filters\r\n * plus the video-only temporal filters (`posterizeTime`, `echo`).\r\n */\r\nexport type VideoAdjustment =\r\n | (MediaAdjustment | VideoOnlyAdjustment)\r\n | (MediaAdjustment | VideoOnlyAdjustment)[]\r\n | AdjustmentChain;\r\n\r\n/**\r\n * Entry point for building **image** filter chains fluently.\r\n *\r\n * An empty chain, so `Adjustments.blur(8)` is `new AdjustmentChain().blur(8)`\r\n * — and every builder's signature and documentation has one definition, on\r\n * {@link AdjustmentChain}, which is what an editor shows on hover.\r\n *\r\n * Contains only pixel filters; video-only filters (`posterizeTime`, `echo`)\r\n * live on {@link VideoAdjustments} because image fills cannot use them.\r\n *\r\n * @example\r\n * node.filters = Adjustments.blur(8).grayscale(1);\r\n * Rect({ fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }) })\r\n */\r\nexport const Adjustments = new AdjustmentChain();\r\n\r\n/**\r\n * Entry point for building **video** filter chains fluently — every\r\n * {@link Adjustments} builder plus the video-only temporal ones.\r\n *\r\n * @example\r\n * node.filters = VideoAdjustments.posterizeTime(6);\r\n * node.filters = VideoAdjustments.grayscale(1).blur(6);\r\n */\r\nexport const VideoAdjustments = new VideoAdjustmentChain();\r\n\r\n/**\r\n * The previous name for {@link Adjustments}.\r\n *\r\n * Kept because a scene is *source code in someone else's project*: a rename that\r\n * only shows up as a compile error in a file we can't edit is still a rename that\r\n * broke their build. The alias costs one line and buys a release in which both\r\n * spellings work.\r\n *\r\n * @deprecated Use {@link Adjustments}. Removed in the next major.\r\n */\r\nexport const ImageFilters = Adjustments;\r\n\r\n/**\r\n * The previous name for {@link VideoAdjustments}.\r\n *\r\n * @deprecated Use {@link VideoAdjustments}. Removed in the next major.\r\n */\r\nexport const VideoFilters = VideoAdjustments;\r\n\r\n/**\r\n * Normalises any `ImageAdjustment`/`VideoAdjustment` value to a plain filter array.\r\n * Used internally when reading props before rendering or interpolation.\r\n */\r\nexport function resolveChainAdjustments(filters: ImageAdjustment | VideoAdjustment | undefined): AnyFilter[] {\r\n if (filters === undefined) return [];\r\n if (filters instanceof AdjustmentChain) return filters.list;\r\n if (Array.isArray(filters)) return filters;\r\n return [filters];\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterData } from "../registry.js";
|
|
2
2
|
/**
|
|
3
|
-
* Applies an arbitrary 4×5 color transform
|
|
3
|
+
* Applies an arbitrary 4×5 color transform.
|
|
4
4
|
*
|
|
5
5
|
* The matrix is row-major with rows [R, G, B, A], each row being
|
|
6
6
|
* [rScale, gScale, bScale, aScale, bias]. Useful for tinting,
|
|
@@ -8,7 +8,7 @@ import type { FilterData } from "../registry.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface ColorMatrixFilter {
|
|
10
10
|
type: 'colorMatrix';
|
|
11
|
-
/** 4×5 row-major color matrix
|
|
11
|
+
/** 4×5 row-major color matrix. */
|
|
12
12
|
matrix: number[];
|
|
13
13
|
}
|
|
14
14
|
export declare const colorMatrixFilter: FilterData<ColorMatrixFilter>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-matrix.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"color-matrix.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAQ3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-matrix.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe1C,MAAM,CAAC,MAAM,iBAAiB,GAAkC;IAC5D,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;KACzE,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACvG,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\r\nimport { lerpNumber } from \"@/tween/lerp\";\r\n\r\n/**\r\n * Applies an arbitrary 4×5 color transform
|
|
1
|
+
{"version":3,"file":"color-matrix.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe1C,MAAM,CAAC,MAAM,iBAAiB,GAAkC;IAC5D,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;KACzE,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACvG,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\r\nimport { lerpNumber } from \"@/tween/lerp\";\r\n\r\n/**\r\n * Applies an arbitrary 4×5 color transform.\r\n *\r\n * The matrix is row-major with rows [R, G, B, A], each row being\r\n * [rScale, gScale, bScale, aScale, bias]. Useful for tinting,\r\n * channel swaps, or any effect not covered by the named filters.\r\n */\r\nexport interface ColorMatrixFilter {\r\n type: 'colorMatrix';\r\n /** 4×5 row-major color matrix. */\r\n matrix: number[];\r\n}\r\n\r\nexport const colorMatrixFilter: FilterData<ColorMatrixFilter> = {\r\n // Lerps each matrix coefficient independently; missing target coefficients\r\n // hold their source value so partial matrices still animate gracefully.\r\n lerp: (from, to, t) => ({\r\n type: \"colorMatrix\",\r\n matrix: from.matrix.map((v, i) => lerpNumber(v, to.matrix[i] ?? v, t)),\r\n }),\r\n equals: (a, b) => a.matrix.length === b.matrix.length && a.matrix.every((v, i) => v === b.matrix[i]),\r\n};\r\n"]}
|
|
@@ -9,7 +9,7 @@ export interface FilterData<T extends AnyFilter> {
|
|
|
9
9
|
/** Return true when both filters are visually identical (used to skip redundant redraws). */
|
|
10
10
|
equals(a: T, b: T): boolean;
|
|
11
11
|
}
|
|
12
|
-
/** True when `type` is a pixel filter that composes into a
|
|
12
|
+
/** True when `type` is a pixel filter that composes into a media fill's filter chain. */
|
|
13
13
|
export declare function isPixelFilter(type: string): boolean;
|
|
14
14
|
/** True when `type` has a registered `FilterData` handler, here or in the effects registry. */
|
|
15
15
|
export declare function hasFilter(type: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAYjD,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAE9D,sFAAsF;AACtF,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,SAAS;IAC3C,+FAA+F;IAC/F,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;CAC/B;AAiCD,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAYjD,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAE9D,sFAAsF;AACtF,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,SAAS;IAC3C,+FAA+F;IAC/F,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;CAC/B;AAiCD,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAK/E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAGzE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAKpE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EACnD,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,EACrB,EAAE,EAAE,CAAC,EAAE,GAAG,SAAS,EACnB,CAAC,EAAE,MAAM,GACV,CAAC,EAAE,GAAG,SAAS,CAGjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAe1F"}
|
|
@@ -33,11 +33,11 @@ const FILTERS = new Map([
|
|
|
33
33
|
/**
|
|
34
34
|
* Video-only filter types. These are consumed by the video fill's per-frame
|
|
35
35
|
* `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`),
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* not the pixel filter chain. `isPixelFilter` lets a renderer skip them when
|
|
37
|
+
* composing that chain.
|
|
38
38
|
*/
|
|
39
39
|
const VIDEO_ONLY = new Set(["posterizeTime", "echo"]);
|
|
40
|
-
/** True when `type` is a pixel filter that composes into a
|
|
40
|
+
/** True when `type` is a pixel filter that composes into a media fill's filter chain. */
|
|
41
41
|
export function isPixelFilter(type) {
|
|
42
42
|
return !VIDEO_ONLY.has(type);
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI1F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAapD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAgC;IACnD,CAAC,UAAU,EAAE,cAAuC,CAAC;IACrD,CAAC,MAAM,EAAE,UAAmC,CAAC;IAC7C,CAAC,WAAW,EAAE,eAAwC,CAAC;IACvD,CAAC,OAAO,EAAE,WAAoC,CAAC;IAC/C,CAAC,aAAa,EAAE,iBAA0C,CAAC;IAC3D,CAAC,QAAQ,EAAE,YAAqC,CAAC;IACjD,CAAC,iBAAiB,EAAE,qBAA8C,CAAC;IACnE,CAAC,eAAe,EAAE,mBAA4C,CAAC;IAC/D,CAAC,MAAM,EAAE,UAAmC,CAAC;CAChD,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAS,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9D,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,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,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAQ,CAAC;AAC3D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAiB,EAAE,EAAe,EAAE,CAAS;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;aAAM,IAAI,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;aAAM,IAAI,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\r\nimport { declareEffect, effectSurface, hasEffect, lerpEffect } from \"../effects/registry\";\r\nimport type { NodeEffect } from \"../effects/union\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\n\r\nimport { exposureFilter } from \"./implementations/exposure\";\r\nimport { blurFilter } from \"./implementations/blur\";\r\nimport { grayscaleFilter } from \"./implementations/grayscale\";\r\nimport { alphaFilter } from \"./implementations/alpha\";\r\nimport { colorMatrixFilter } from \"./implementations/color-matrix\";\r\nimport { curvesFilter } from \"./implementations/curves\";\r\nimport { colorAdjustmentFilter } from \"./implementations/color-adjustment\";\r\nimport { posterizeTimeFilter } from \"./implementations/posterize-time\";\r\nimport { echoFilter } from \"./implementations/echo\";\r\n\r\n/** Any concrete filter object accepted on a media fill — pixel or video-only. */\r\nexport type AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\r\n\r\n/** Interpolation and equality contract every filter implementation must implement. */\r\nexport interface FilterData<T extends AnyFilter> {\r\n /** Return a new filter linearly interpolated between `from` and `to` at progress `t` (0–1). */\r\n lerp(from: T, to: T, t: number): T;\r\n /** Return true when both filters are visually identical (used to skip redundant redraws). */\r\n equals(a: T, b: T): boolean;\r\n}\r\n\r\n/**\r\n * Maps each filter `type` to its `FilterData` handler. Statically imported\r\n * constants (no runtime registration step), mirroring the `FILLS` map in the\r\n * fill registry — so the table is always populated and there is no side-effect\r\n * import to forget.\r\n *\r\n * It holds only the filters that exist *solely* as filters. Most of the roster\r\n * is {@link EffectAdjustment} — a node effect applied to a fill's own pixels — and\r\n * those are looked up in the effects registry rather than duplicated here, so\r\n * `dither` interpolates the same way whether it is on a node or on an image.\r\n */\r\nconst FILTERS = new Map<string, FilterData<AnyFilter>>([\r\n [\"exposure\", exposureFilter as FilterData<AnyFilter>],\r\n [\"blur\", blurFilter as FilterData<AnyFilter>],\r\n [\"grayscale\", grayscaleFilter as FilterData<AnyFilter>],\r\n [\"alpha\", alphaFilter as FilterData<AnyFilter>],\r\n [\"colorMatrix\", colorMatrixFilter as FilterData<AnyFilter>],\r\n [\"curves\", curvesFilter as FilterData<AnyFilter>],\r\n [\"colorAdjustment\", colorAdjustmentFilter as FilterData<AnyFilter>],\r\n [\"posterizeTime\", posterizeTimeFilter as FilterData<AnyFilter>],\r\n [\"echo\", echoFilter as FilterData<AnyFilter>],\r\n]);\r\n\r\n/**\r\n * Video-only filter types. These are consumed by the video fill's per-frame\r\n * `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`),\r\n * not the pixel filter chain. `isPixelFilter` lets a renderer skip them when\r\n * composing that chain.\r\n */\r\nconst VIDEO_ONLY = new Set<string>([\"posterizeTime\", \"echo\"]);\r\n\r\n/** True when `type` is a pixel filter that composes into a media fill's filter chain. */\r\nexport function isPixelFilter(type: string): boolean {\r\n return !VIDEO_ONLY.has(type);\r\n}\r\n\r\n/** True when `type` has a registered `FilterData` handler, here or in the effects registry. */\r\nexport function hasFilter(type: string): boolean {\r\n return FILTERS.has(type) || hasEffect(type);\r\n}\r\n\r\n/**\r\n * Interpolate between two individual filters at progress `t`.\r\n * Falls back to a hard cut at t = 0.5 when the types differ or are unregistered.\r\n *\r\n * A type with no dedicated `FilterData` is an {@link EffectAdjustment}, so it is\r\n * handed to `lerpEffect` — one interpolation per effect, whether it is animated\r\n * on a node or inside a fill.\r\n */\r\nexport function lerpFilter(from: AnyFilter, to: AnyFilter, t: number): AnyFilter {\r\n if (from.type !== to.type) return t < 0.5 ? from : to;\r\n const data = FILTERS.get(from.type);\r\n if (data) return data.lerp(from, to, t);\r\n return lerpEffect(from as NodeEffect, to as NodeEffect, t) as AnyFilter;\r\n}\r\n\r\n/**\r\n * The filters defined here reference nothing, but an {@link EffectAdjustment} can —\r\n * `lut` samples an image — and an undeclared one is a lookup the effect can only\r\n * read as \"no lookup table\".\r\n */\r\nexport function declareFilter(filter: AnyFilter, assets: AssetScope): void {\r\n if (FILTERS.has(filter.type)) return;\r\n declareEffect(filter as NodeEffect, assets);\r\n}\r\n\r\n/**\r\n * How a backend must realise `filter` — `\"shader\"` when it resamples pixel\r\n * positions and therefore has to wrap the fill's shader rather than compose\r\n * into its `ImageFilter` chain. The filters defined here are all `\"filter\"`;\r\n * an {@link EffectAdjustment} answers with its effect's own declaration.\r\n */\r\nexport function filterSurface(filter: AnyFilter): \"filter\" | \"shader\" {\r\n if (FILTERS.has(filter.type)) return \"filter\";\r\n // A filter is applied to the fill's own pixels, so it is never a backdrop\r\n // effect however the underlying effect's `mode` predicate reads.\r\n return effectSurface({ ...filter, mode: \"foreground\" } as NodeEffect);\r\n}\r\n\r\n/**\r\n * {@link lerpFilterArray} over two *optional* arrays, answering `undefined`\r\n * when neither side has a filter.\r\n *\r\n * A media fill's `lerp` is spread over the whole fill (`{...a, ...lerp(a,b,t)}`),\r\n * so returning `[]` for the overwhelmingly common no-filter case would allocate\r\n * a fresh array per fill per frame and turn an absent field into a present one.\r\n */\r\nexport function lerpOptionalFilters<T extends AnyFilter>(\r\n from: T[] | undefined,\r\n to: T[] | undefined,\r\n t: number,\r\n): T[] | undefined {\r\n if (!from?.length && !to?.length) return undefined;\r\n return lerpFilterArray(from ?? [], to ?? [], t) as T[];\r\n}\r\n\r\n/**\r\n * Interpolate between two filter arrays of potentially different lengths.\r\n * Indices present in only one array are kept as-is; matched indices are lerped pairwise.\r\n */\r\nexport function lerpFilterArray(from: AnyFilter[], to: AnyFilter[], t: number): AnyFilter[] {\r\n const maxLen = Math.max(from.length, to.length);\r\n const result: AnyFilter[] = [];\r\n for (let i = 0; i < maxLen; i++) {\r\n const a = from[i];\r\n const b = to[i];\r\n if (a && b) {\r\n result.push(lerpFilter(a, b, t));\r\n } else if (a) {\r\n result.push(a);\r\n } else if (b) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n}\r\n"]}
|
|
@@ -53,9 +53,10 @@ type NonFilterEffect = MagnifyEffect | GlassEffect | MotionBlurEffect | OutlineE
|
|
|
53
53
|
* This is what lets a background image be oil-painted, dithered or posterized
|
|
54
54
|
* without wrapping it in a node whose effect would also hit its children:
|
|
55
55
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Rect({
|
|
57
|
+
* fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }),
|
|
58
|
+
* children: [Text({ text: "still sharp" })],
|
|
59
|
+
* })
|
|
59
60
|
*
|
|
60
61
|
* The effects carry a `mode` field that means nothing here (a fill has no
|
|
61
62
|
* backdrop); the {@link VideoAdjustmentChain} builders drop it, and the renderer ignores
|
|
@@ -64,9 +65,8 @@ type NonFilterEffect = MagnifyEffect | GlassEffect | MotionBlurEffect | OutlineE
|
|
|
64
65
|
export type EffectAdjustment = Exclude<NodeEffect, NonFilterEffect>;
|
|
65
66
|
/**
|
|
66
67
|
* Discriminated union of pixel filters — the filters valid on both image and
|
|
67
|
-
* video fills. Each is realised either as a
|
|
68
|
-
*
|
|
69
|
-
* *positions* — as a lens shader wrapping the fill's own shader.
|
|
68
|
+
* video fills. Each is realised either as a per-pixel colour filter, or — for
|
|
69
|
+
* the ones that resample pixel *positions* — as a lens pass over the fill.
|
|
70
70
|
*/
|
|
71
71
|
export type MediaAdjustment = ExposureFilter | BlurFilter | GrayscaleFilter | AlphaFilter | ColorMatrixFilter | CurvesFilter | ColorAdjustmentFilter | EffectAdjustment;
|
|
72
72
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,C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AAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { AlphaFilter } from \"./implementations/alpha\";\r\nimport type { BlurFilter } from \"./implementations/blur\";\r\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\r\nimport type { ColorMatrixFilter } from \"./implementations/color-matrix\";\r\nimport type { CurvesFilter } from \"./implementations/curves\";\r\nimport type { ExposureFilter } from \"./implementations/exposure\";\r\nimport type { GrayscaleFilter } from \"./implementations/grayscale\";\r\nimport type { PosterizeTimeFilter } from \"./implementations/posterize-time\";\r\nimport type { VideoEchoFilter } from \"./implementations/echo\";\r\n\r\nimport type { NodeEffect } from \"../effects/union\";\r\nimport type { BlurEffect } from \"../effects/implementations/blur\";\r\nimport type { GrayscaleEffect } from \"../effects/implementations/grayscale\";\r\nimport type { CurvesEffect } from \"../effects/implementations/curves\";\r\nimport type { ColorAdjustmentEffect } from \"../effects/implementations/color-adjustment\";\r\nimport type { MagnifyEffect } from \"../effects/implementations/magnify\";\r\nimport type { MotionBlurEffect } from \"../effects/implementations/motion-blur\";\r\nimport type { OutlineEffect } from \"../effects/implementations/outline\";\r\nimport type { DropShadowEffect } from \"@/attributes/shape/effects/implementations/drop-shadow\";\r\nimport type { GlowEffect } from \"../effects/implementations/glow\";\r\nimport type { GlassEffect } from \"../effects/implementations/glass\";\r\n\r\n/**\r\n * The node effects that are **not** media filters, and why.\r\n *\r\n * Everything else in {@link NodeEffect} is a function of the pixels it is\r\n * given, so it means exactly the same thing applied to a node's rendered\r\n * content or to one fill layer's own pixels — and the renderer already runs\r\n * both through a single handler registry. This is the exception list, so a new\r\n * effect becomes a filter by default rather than by remembering to add it.\r\n *\r\n * Two reasons land here:\r\n *\r\n * - **Needs something a fill layer doesn't have.** `magnify` and `glass` sample\r\n * the backdrop beneath the node — glass is a slab you see *through*, and a\r\n * node's own paint is not something there is anything behind; `motionBlur` and\r\n * `trails` are derived from the node's sampled velocity. A fill has no\r\n * backdrop and no motion of its own.\r\n * - **Draws outside the silhouette.** `outline` paints a ring around the\r\n * content, which the shape path a fill is clipped to would cut away, and\r\n * `glow` bleeds past it in every direction — a glow clipped to the thing that\r\n * cast it is not a dimmer glow, it is no glow at all. (`bloom` stays: it is\r\n * the contained version of the same idea, which is what makes it the right\r\n * one to reach for on a fill.)\r\n *\r\n * `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded for a third,\r\n * bookkeeping reason: they already have a dedicated filter type below, sharing\r\n * the same fields and the same renderer handler.\r\n */\r\ntype NonFilterEffect =\r\n | MagnifyEffect\r\n | GlassEffect\r\n | MotionBlurEffect\r\n | OutlineEffect\r\n | DropShadowEffect\r\n | GlowEffect\r\n | BlurEffect\r\n | GrayscaleEffect\r\n | CurvesEffect\r\n | ColorAdjustmentEffect;\r\n\r\n/**\r\n * Node effects usable as a media filter — i.e. applied to one image/video\r\n * fill's own pixels rather than to a node and everything under it.\r\n *\r\n * This is what lets a background image be oil-painted, dithered or posterized\r\n * without wrapping it in a node whose effect would also hit its children:\r\n *\r\n *
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { AlphaFilter } from \"./implementations/alpha\";\r\nimport type { BlurFilter } from \"./implementations/blur\";\r\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\r\nimport type { ColorMatrixFilter } from \"./implementations/color-matrix\";\r\nimport type { CurvesFilter } from \"./implementations/curves\";\r\nimport type { ExposureFilter } from \"./implementations/exposure\";\r\nimport type { GrayscaleFilter } from \"./implementations/grayscale\";\r\nimport type { PosterizeTimeFilter } from \"./implementations/posterize-time\";\r\nimport type { VideoEchoFilter } from \"./implementations/echo\";\r\n\r\nimport type { NodeEffect } from \"../effects/union\";\r\nimport type { BlurEffect } from \"../effects/implementations/blur\";\r\nimport type { GrayscaleEffect } from \"../effects/implementations/grayscale\";\r\nimport type { CurvesEffect } from \"../effects/implementations/curves\";\r\nimport type { ColorAdjustmentEffect } from \"../effects/implementations/color-adjustment\";\r\nimport type { MagnifyEffect } from \"../effects/implementations/magnify\";\r\nimport type { MotionBlurEffect } from \"../effects/implementations/motion-blur\";\r\nimport type { OutlineEffect } from \"../effects/implementations/outline\";\r\nimport type { DropShadowEffect } from \"@/attributes/shape/effects/implementations/drop-shadow\";\r\nimport type { GlowEffect } from \"../effects/implementations/glow\";\r\nimport type { GlassEffect } from \"../effects/implementations/glass\";\r\n\r\n/**\r\n * The node effects that are **not** media filters, and why.\r\n *\r\n * Everything else in {@link NodeEffect} is a function of the pixels it is\r\n * given, so it means exactly the same thing applied to a node's rendered\r\n * content or to one fill layer's own pixels — and the renderer already runs\r\n * both through a single handler registry. This is the exception list, so a new\r\n * effect becomes a filter by default rather than by remembering to add it.\r\n *\r\n * Two reasons land here:\r\n *\r\n * - **Needs something a fill layer doesn't have.** `magnify` and `glass` sample\r\n * the backdrop beneath the node — glass is a slab you see *through*, and a\r\n * node's own paint is not something there is anything behind; `motionBlur` and\r\n * `trails` are derived from the node's sampled velocity. A fill has no\r\n * backdrop and no motion of its own.\r\n * - **Draws outside the silhouette.** `outline` paints a ring around the\r\n * content, which the shape path a fill is clipped to would cut away, and\r\n * `glow` bleeds past it in every direction — a glow clipped to the thing that\r\n * cast it is not a dimmer glow, it is no glow at all. (`bloom` stays: it is\r\n * the contained version of the same idea, which is what makes it the right\r\n * one to reach for on a fill.)\r\n *\r\n * `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded for a third,\r\n * bookkeeping reason: they already have a dedicated filter type below, sharing\r\n * the same fields and the same renderer handler.\r\n */\r\ntype NonFilterEffect =\r\n | MagnifyEffect\r\n | GlassEffect\r\n | MotionBlurEffect\r\n | OutlineEffect\r\n | DropShadowEffect\r\n | GlowEffect\r\n | BlurEffect\r\n | GrayscaleEffect\r\n | CurvesEffect\r\n | ColorAdjustmentEffect;\r\n\r\n/**\r\n * Node effects usable as a media filter — i.e. applied to one image/video\r\n * fill's own pixels rather than to a node and everything under it.\r\n *\r\n * This is what lets a background image be oil-painted, dithered or posterized\r\n * without wrapping it in a node whose effect would also hit its children:\r\n *\r\n * Rect({\r\n * fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }),\r\n * children: [Text({ text: \"still sharp\" })],\r\n * })\r\n *\r\n * The effects carry a `mode` field that means nothing here (a fill has no\r\n * backdrop); the {@link VideoAdjustmentChain} builders drop it, and the renderer ignores\r\n * it on this path.\r\n */\r\nexport type EffectAdjustment = Exclude<NodeEffect, NonFilterEffect>;\r\n\r\n/**\r\n * Discriminated union of pixel filters — the filters valid on both image and\r\n * video fills. Each is realised either as a per-pixel colour filter, or — for\r\n * the ones that resample pixel *positions* — as a lens pass over the fill.\r\n */\r\nexport type MediaAdjustment =\r\n | ExposureFilter\r\n | BlurFilter\r\n | GrayscaleFilter\r\n | AlphaFilter\r\n | ColorMatrixFilter\r\n | CurvesFilter\r\n | ColorAdjustmentFilter\r\n | EffectAdjustment;\r\n\r\n/**\r\n * Discriminated union of video-only filters — temporal/multi-frame effects that\r\n * are meaningless on a still image (a single frame has no time axis and no\r\n * previous frames). Consumed outside the pixel `setImageFilter` path.\r\n */\r\nexport type VideoOnlyAdjustment =\r\n | PosterizeTimeFilter\r\n | VideoEchoFilter;\r\n"]}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* carries the rest, which is the repo's existing shape for an attribute whose
|
|
6
6
|
* operations go past interpolation — `insetsOps` is `AttributeOps & InsetsOps`,
|
|
7
7
|
* `alignmentOps` is `AttributeOps & AlignmentOps`, `cornerRadiusOps` the same.
|
|
8
|
-
*
|
|
9
|
-
* addition.
|
|
8
|
+
* Every `Types.path` entry is untouched by the addition.
|
|
10
9
|
*
|
|
11
10
|
* Behind it is **one** pen walk. There were seven — one each in `bounds`,
|
|
12
11
|
* `length`, `dash`, `sampler`, `subpath`, `morph` and the editor's vector model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/path/ops.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/path/ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AASlE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGvH,+DAA+D;AAC/D,MAAM,WAAW,OAAO;IAEpB,gFAAgF;IAChF,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,EAAE,CAAC;IACxD,6EAA6E;IAC7E,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,EAAE,CAAC;IACxD,6EAA6E;IAC7E,MAAM,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,EAAE,CAAC;IACvD,sEAAsE;IACtE,OAAO,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;IAGpD,mEAAmE;IACnE,MAAM,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACvD,2DAA2D;IAC3D,IAAI,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG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