@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.6
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 +247 -0
- package/LICENSE +201 -201
- package/NOTICE +48 -0
- package/README.md +93 -72
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +79 -4
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/manifest.js.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -3
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +1 -1
- package/dist/attributes/audio/filters/chain.js.map +1 -1
- package/dist/attributes/audio/filters/curve.d.ts +8 -8
- package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
- package/dist/attributes/audio/filters/curve.js +20 -19
- package/dist/attributes/audio/filters/curve.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
- package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/filters/index.d.ts +1 -1
- package/dist/attributes/audio/filters/index.d.ts.map +1 -1
- package/dist/attributes/audio/filters/index.js +1 -1
- package/dist/attributes/audio/filters/index.js.map +1 -1
- package/dist/attributes/audio/filters/registry.js.map +1 -1
- package/dist/attributes/audio/filters/union.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +17 -2
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +4 -2
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +15 -8
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +4 -2
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -4
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/index.js.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/vector2.js.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/mask/boolean.js.map +1 -1
- package/dist/attributes/mask/mask.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +3 -1
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +9 -2
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +15 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/corners/index.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +28 -120
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +16 -88
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +15 -8
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +2 -6
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +23 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +44 -10
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/constants.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +81 -44
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +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.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +4 -10
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -13
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +2 -2
- 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 -7
- 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/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shadow/index.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
- package/dist/browser/chunks/chunk-2RIYH36X.js.map +7 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
- package/dist/browser/jsx-jsx-runtime.js +1 -1
- package/dist/browser/manifest.json +4 -2
- package/dist/browser/sdk.js +1 -1
- package/dist/component/api.d.ts +508 -0
- package/dist/component/api.d.ts.map +1 -0
- package/dist/component/api.js +4 -0
- package/dist/component/api.js.map +1 -0
- package/dist/component/builtins/audio.d.ts +26 -0
- package/dist/component/builtins/audio.d.ts.map +1 -0
- package/dist/component/builtins/audio.js +41 -0
- package/dist/component/builtins/audio.js.map +1 -0
- package/dist/component/builtins/canvas3d.d.ts +98 -0
- package/dist/component/builtins/canvas3d.d.ts.map +1 -0
- package/dist/component/builtins/canvas3d.js +21 -0
- package/dist/component/builtins/canvas3d.js.map +1 -0
- package/dist/component/builtins/composite.d.ts +56 -0
- package/dist/component/builtins/composite.d.ts.map +1 -0
- package/dist/component/builtins/composite.js +25 -0
- package/dist/component/builtins/composite.js.map +1 -0
- package/dist/component/builtins/geometry.d.ts +505 -0
- package/dist/component/builtins/geometry.d.ts.map +1 -0
- package/dist/component/builtins/geometry.js +107 -0
- package/dist/component/builtins/geometry.js.map +1 -0
- package/dist/component/builtins/layout.d.ts +88 -0
- package/dist/component/builtins/layout.d.ts.map +1 -0
- package/dist/component/builtins/layout.js +84 -0
- package/dist/component/builtins/layout.js.map +1 -0
- package/dist/component/builtins/media.d.ts +95 -0
- package/dist/component/builtins/media.d.ts.map +1 -0
- package/dist/component/builtins/media.js +149 -0
- package/dist/component/builtins/media.js.map +1 -0
- package/dist/component/builtins/providers.d.ts +23 -0
- package/dist/component/builtins/providers.d.ts.map +1 -0
- package/dist/component/builtins/providers.js +30 -0
- package/dist/component/builtins/providers.js.map +1 -0
- package/dist/component/builtins/text.d.ts +193 -0
- package/dist/component/builtins/text.d.ts.map +1 -0
- package/dist/component/builtins/text.js +113 -0
- package/dist/component/builtins/text.js.map +1 -0
- package/dist/component/builtins/three.d.ts +1085 -0
- package/dist/component/builtins/three.d.ts.map +1 -0
- package/dist/component/builtins/three.js +265 -0
- package/dist/component/builtins/three.js.map +1 -0
- package/dist/component/clip-of.d.ts +5 -0
- package/dist/component/clip-of.d.ts.map +1 -0
- package/dist/component/clip-of.js +33 -0
- package/dist/component/clip-of.js.map +1 -0
- package/dist/component/commands-for.d.ts +19 -0
- package/dist/component/commands-for.d.ts.map +1 -0
- package/dist/component/commands-for.js +5 -0
- package/dist/component/commands-for.js.map +1 -0
- package/dist/component/component-audio.d.ts +9 -0
- package/dist/component/component-audio.d.ts.map +1 -0
- package/dist/component/component-audio.js +18 -0
- package/dist/component/component-audio.js.map +1 -0
- package/dist/component/component2d.d.ts +9 -0
- package/dist/component/component2d.d.ts.map +1 -0
- package/dist/component/component2d.js +239 -0
- package/dist/component/component2d.js.map +1 -0
- package/dist/component/component3d.d.ts +9 -0
- package/dist/component/component3d.d.ts.map +1 -0
- package/dist/component/component3d.js +99 -0
- package/dist/component/component3d.js.map +1 -0
- package/dist/component/factory.d.ts +63 -0
- package/dist/component/factory.d.ts.map +1 -0
- package/dist/component/factory.js +313 -0
- package/dist/component/factory.js.map +1 -0
- package/dist/component/modules/aim.d.ts +30 -0
- package/dist/component/modules/aim.d.ts.map +1 -0
- package/dist/component/modules/aim.js +39 -0
- package/dist/component/modules/aim.js.map +1 -0
- package/dist/component/modules/corners.d.ts +13 -0
- package/dist/component/modules/corners.d.ts.map +1 -0
- package/dist/component/modules/corners.js +12 -0
- package/dist/component/modules/corners.js.map +1 -0
- package/dist/component/modules/flow.d.ts +26 -0
- package/dist/component/modules/flow.d.ts.map +1 -0
- package/dist/component/modules/flow.js +55 -0
- package/dist/component/modules/flow.js.map +1 -0
- package/dist/component/modules/material.d.ts +40 -0
- package/dist/component/modules/material.d.ts.map +1 -0
- package/dist/component/modules/material.js +75 -0
- package/dist/component/modules/material.js.map +1 -0
- package/dist/component/modules/paint.d.ts +71 -0
- package/dist/component/modules/paint.d.ts.map +1 -0
- package/dist/component/modules/paint.js +106 -0
- package/dist/component/modules/paint.js.map +1 -0
- package/dist/component/modules/shapes.d.ts +31 -0
- package/dist/component/modules/shapes.d.ts.map +1 -0
- package/dist/component/modules/shapes.js +43 -0
- package/dist/component/modules/shapes.js.map +1 -0
- package/dist/component/modules/text-layout.d.ts +26 -0
- package/dist/component/modules/text-layout.d.ts.map +1 -0
- package/dist/component/modules/text-layout.js +57 -0
- package/dist/component/modules/text-layout.js.map +1 -0
- package/dist/component/modules/text-style.d.ts +48 -0
- package/dist/component/modules/text-style.d.ts.map +1 -0
- package/dist/component/modules/text-style.js +63 -0
- package/dist/component/modules/text-style.js.map +1 -0
- package/dist/component/modules/three-entries.d.ts +23 -0
- package/dist/component/modules/three-entries.d.ts.map +1 -0
- package/dist/component/modules/three-entries.js +41 -0
- package/dist/component/modules/three-entries.js.map +1 -0
- package/dist/component/modules/view3d.d.ts +55 -0
- package/dist/component/modules/view3d.d.ts.map +1 -0
- package/dist/component/modules/view3d.js +160 -0
- package/dist/component/modules/view3d.js.map +1 -0
- package/dist/component/timeline.d.ts +22 -0
- package/dist/component/timeline.d.ts.map +1 -0
- package/dist/component/timeline.js +128 -0
- package/dist/component/timeline.js.map +1 -0
- package/dist/component/type-def.d.ts +26 -0
- package/dist/component/type-def.d.ts.map +1 -0
- package/dist/component/type-def.js +16 -0
- package/dist/component/type-def.js.map +1 -0
- package/dist/component/types.d.ts +91 -0
- package/dist/component/types.d.ts.map +1 -0
- package/dist/component/types.js +88 -0
- package/dist/component/types.js.map +1 -0
- package/dist/component/views.d.ts +121 -0
- package/dist/component/views.d.ts.map +1 -0
- package/dist/component/views.js +413 -0
- package/dist/component/views.js.map +1 -0
- package/dist/component.d.ts +4 -5
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -5
- package/dist/component.js.map +1 -1
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +15 -39
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +1 -1
- package/dist/document/command-traits.js +16 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +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/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +2 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +70 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +2 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/registry.d.ts +23 -11
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +46 -19
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +49 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +247 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +100 -19
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +290 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +12 -12
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +2 -2
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +37 -31
- package/dist/document/validate.js.map +1 -1
- package/dist/document/withdraw.d.ts +28 -0
- package/dist/document/withdraw.d.ts.map +1 -0
- package/dist/document/withdraw.js +61 -0
- package/dist/document/withdraw.js.map +1 -0
- package/dist/experimental.d.ts +22 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +20 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +9 -1
- package/dist/jsx/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx/jsx-runtime.js +13 -3
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/freeform.js.map +1 -1
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/item.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/nodes/2d/node-lifecycle.js.map +1 -1
- package/dist/nodes/2d/node-motion.js.map +1 -1
- package/dist/nodes/2d/node-render.d.ts +3 -3
- package/dist/nodes/2d/node-render.d.ts.map +1 -1
- package/dist/nodes/2d/node-render.js.map +1 -1
- package/dist/nodes/2d/node-transform.js.map +1 -1
- package/dist/nodes/2d/node2d.d.ts +115 -3
- package/dist/nodes/2d/node2d.d.ts.map +1 -1
- package/dist/nodes/2d/node2d.js +180 -28
- package/dist/nodes/2d/node2d.js.map +1 -1
- package/dist/nodes/2d/paint-node.d.ts +27 -0
- package/dist/nodes/2d/paint-node.d.ts.map +1 -1
- package/dist/nodes/2d/paint-node.js +42 -0
- package/dist/nodes/2d/paint-node.js.map +1 -1
- package/dist/nodes/audio/audio-bus.js.map +1 -1
- package/dist/nodes/audio/index.d.ts +2 -2
- package/dist/nodes/audio/index.d.ts.map +1 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +1 -1
- package/dist/nodes/audio/node-audio.js.map +1 -1
- package/dist/nodes/audio/sound-node.d.ts +4 -3
- package/dist/nodes/audio/sound-node.d.ts.map +1 -1
- package/dist/nodes/audio/sound-node.js +4 -1
- package/dist/nodes/audio/sound-node.js.map +1 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
- package/dist/nodes/geometry/bounds-shape-node.js +2 -2
- package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
- package/dist/nodes/geometry/box-path-node.d.ts +3 -3
- package/dist/nodes/geometry/box-path-node.js +2 -2
- package/dist/nodes/geometry/box-path-node.js.map +1 -1
- package/dist/nodes/geometry/ellipse-node.js.map +1 -1
- package/dist/nodes/geometry/group-bounds.d.ts +2 -2
- package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
- package/dist/nodes/geometry/group-bounds.js +1 -2
- package/dist/nodes/geometry/group-bounds.js.map +1 -1
- package/dist/nodes/geometry/path-node.d.ts.map +1 -1
- package/dist/nodes/geometry/path-node.js +6 -0
- package/dist/nodes/geometry/path-node.js.map +1 -1
- package/dist/nodes/geometry/polygon-node.js.map +1 -1
- package/dist/nodes/geometry/polygram-node.js.map +1 -1
- package/dist/nodes/geometry/rect-node.js.map +1 -1
- package/dist/nodes/geometry/shape-node.js.map +1 -1
- package/dist/nodes/geometry/shape-outline.d.ts +2 -2
- package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
- package/dist/nodes/geometry/shape-outline.js +2 -13
- package/dist/nodes/geometry/shape-outline.js.map +1 -1
- package/dist/nodes/index.d.ts +40 -33
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +17 -36
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/layout/camera-node.d.ts +9 -0
- package/dist/nodes/layout/camera-node.d.ts.map +1 -1
- package/dist/nodes/layout/camera-node.js +38 -3
- package/dist/nodes/layout/camera-node.js.map +1 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
- package/dist/nodes/layout/orbit-camera-node.js +1 -1
- package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
- package/dist/nodes/layout/rotated-box.js.map +1 -1
- package/dist/nodes/media/video-node.d.ts.map +1 -1
- package/dist/nodes/media/video-node.js +2 -0
- package/dist/nodes/media/video-node.js.map +1 -1
- package/dist/nodes/node/declare-paints.js.map +1 -1
- package/dist/nodes/node/node-editor-state.js.map +1 -1
- package/dist/nodes/node/node-reactive.js.map +1 -1
- package/dist/nodes/node/node-time.d.ts +3 -3
- package/dist/nodes/node/node-time.d.ts.map +1 -1
- package/dist/nodes/node/node-time.js +1 -1
- package/dist/nodes/node/node-time.js.map +1 -1
- package/dist/nodes/node/node-walk.js.map +1 -1
- package/dist/nodes/node/node.d.ts +12 -4
- package/dist/nodes/node/node.d.ts.map +1 -1
- package/dist/nodes/node/node.js +67 -27
- package/dist/nodes/node/node.js.map +1 -1
- package/dist/nodes/node/text-defaults.d.ts +10 -12
- package/dist/nodes/node/text-defaults.d.ts.map +1 -1
- package/dist/nodes/node/text-defaults.js +10 -12
- package/dist/nodes/node/text-defaults.js.map +1 -1
- package/dist/nodes/{scene → root}/canvas2d-node.d.ts +4 -3
- package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
- package/dist/nodes/{scene → root}/canvas2d-node.js +5 -2
- package/dist/nodes/root/canvas2d-node.js.map +1 -0
- package/dist/nodes/root/provider-node.d.ts.map +1 -0
- package/dist/nodes/root/provider-node.js.map +1 -0
- package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
- package/dist/nodes/root/theme-provider-node.js.map +1 -0
- package/dist/nodes/text/default-text-style-node.d.ts +5 -2
- package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
- package/dist/nodes/text/default-text-style-node.js +10 -4
- package/dist/nodes/text/default-text-style-node.js.map +1 -1
- package/dist/nodes/text/number-format.d.ts +1 -1
- package/dist/nodes/text/number-format.js +1 -1
- package/dist/nodes/text/number-format.js.map +1 -1
- package/dist/nodes/text/number-node.js.map +1 -1
- package/dist/nodes/text/number-pattern.js.map +1 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -5
- package/dist/nodes/text/richtext-node.d.ts.map +1 -1
- package/dist/nodes/text/richtext-node.js +6 -72
- package/dist/nodes/text/richtext-node.js.map +1 -1
- package/dist/nodes/text/text-base.d.ts +5 -22
- package/dist/nodes/text/text-base.d.ts.map +1 -1
- package/dist/nodes/text/text-base.js +13 -364
- package/dist/nodes/text/text-base.js.map +1 -1
- package/dist/nodes/text/text-layout.d.ts +87 -0
- package/dist/nodes/text/text-layout.d.ts.map +1 -0
- package/dist/nodes/text/text-layout.js +368 -0
- package/dist/nodes/text/text-layout.js.map +1 -0
- package/dist/nodes/text/text-node.js.map +1 -1
- package/dist/nodes/text/text-selection.js.map +1 -1
- package/dist/nodes/three/camera-nodes.d.ts +21 -3
- package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
- package/dist/nodes/three/camera-nodes.js +42 -1
- package/dist/nodes/three/camera-nodes.js.map +1 -1
- package/dist/nodes/three/canvas3d-node.d.ts +32 -7
- package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
- package/dist/nodes/three/canvas3d-node.js +50 -2
- package/dist/nodes/three/canvas3d-node.js.map +1 -1
- package/dist/nodes/three/drawable-nodes.d.ts +25 -11
- package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
- package/dist/nodes/three/drawable-nodes.js +43 -13
- package/dist/nodes/three/drawable-nodes.js.map +1 -1
- package/dist/nodes/three/environment-nodes.d.ts +9 -3
- package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
- package/dist/nodes/three/environment-nodes.js.map +1 -1
- package/dist/nodes/three/geometry-nodes.d.ts +2 -2
- package/dist/nodes/three/geometry-nodes.js +2 -2
- package/dist/nodes/three/geometry-nodes.js.map +1 -1
- package/dist/nodes/three/grid-geometry3d.js.map +1 -1
- package/dist/nodes/three/group3d.js.map +1 -1
- package/dist/nodes/three/light-nodes.d.ts.map +1 -1
- package/dist/nodes/three/light-nodes.js +3 -3
- package/dist/nodes/three/light-nodes.js.map +1 -1
- package/dist/nodes/three/mesh3d.js.map +1 -1
- package/dist/nodes/three/node3d.d.ts +48 -0
- package/dist/nodes/three/node3d.d.ts.map +1 -1
- package/dist/nodes/three/node3d.js +53 -3
- package/dist/nodes/three/node3d.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +2 -2
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/latex.js.map +1 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +2 -2
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +8 -4
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +18 -10
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -0
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +39 -6
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +9 -0
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +18 -1
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +27 -0
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +9 -4
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +27 -9
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +18 -0
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +97 -0
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -0
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +44 -3
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +124 -10
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +13 -5
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +31 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +63 -6
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/precompisition.js.map +1 -1
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +9 -7
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +12 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +1 -1
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +7 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +50 -25
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +52 -42
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +2 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +12 -0
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +15 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +37 -0
- package/dist/tween/ease/describe.js.map +1 -0
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/seekable.d.ts +1 -1
- package/dist/tween/seekable.js.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.js.map +1 -1
- package/dist/util/generateList.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +7 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
- package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
- package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
- package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/provider-node.js +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
|
@@ -15,8 +15,6 @@ const GLOW_RAMP_STOPS = [0, 1];
|
|
|
15
15
|
const ZERO = { x: 0, y: 0 };
|
|
16
16
|
/** Normalise {@link PixelateOptions.blocks} to a per-axis count. */
|
|
17
17
|
const toBlocks = (blocks) => typeof blocks === "number" ? { x: blocks, y: blocks } : blocks;
|
|
18
|
-
/** Normalise a scalar-or-vector px option to both axes. */
|
|
19
|
-
const toBothAxes = (value) => typeof value === "number" ? { x: value, y: value } : value;
|
|
20
18
|
/**
|
|
21
19
|
* Normalise {@link WaveOptions.amplitude}. A bare number means the Y axis only —
|
|
22
20
|
* a wave that displaces along its own direction of travel just smears, so the
|
|
@@ -24,7 +22,7 @@ const toBothAxes = (value) => typeof value === "number" ? { x: value, y: value }
|
|
|
24
22
|
*/
|
|
25
23
|
const toAmplitude = (value) => typeof value === "number" ? { x: 0, y: value } : value;
|
|
26
24
|
/**
|
|
27
|
-
* Immutable, chainable list of
|
|
25
|
+
* Immutable, chainable list of node effects.
|
|
28
26
|
*
|
|
29
27
|
* Each builder method returns a new `EffectChain` with the effect appended,
|
|
30
28
|
* so chains are safe to share and branch.
|
|
@@ -98,7 +96,7 @@ export class EffectChain {
|
|
|
98
96
|
*/
|
|
99
97
|
magnify(options) {
|
|
100
98
|
const o = scalarOptions(options, "scale");
|
|
101
|
-
return this.append(withEffectOptions({ type: "magnify", scale: o.scale ?? 2, center: o.center ?? CENTER }, { mode: o.mode ?? "backdrop" }));
|
|
99
|
+
return this.append(withEffectOptions({ type: "magnify", scale: o.scale ?? 2, center: o.center ?? CENTER }, { ...o, mode: o.mode ?? "backdrop" }));
|
|
102
100
|
}
|
|
103
101
|
/**
|
|
104
102
|
* Append a bloom (glow) effect. Bright areas bleed soft light outward via a
|
|
@@ -422,24 +420,6 @@ export class EffectChain {
|
|
|
422
420
|
colored: o.colored ?? false,
|
|
423
421
|
}, o));
|
|
424
422
|
}
|
|
425
|
-
/**
|
|
426
|
-
* Append an image overlay — paper grain, canvas weave, fabric. The image is
|
|
427
|
-
* yours: drop it in the project's `public/` folder and name it the way an
|
|
428
|
-
* image fill would.
|
|
429
|
-
*
|
|
430
|
-
* A missing or not-yet-loaded image makes the effect a no-op, so a wrong
|
|
431
|
-
* path costs you the texture and nothing else.
|
|
432
|
-
*/
|
|
433
|
-
texture(options) {
|
|
434
|
-
return this.append(withEffectOptions({
|
|
435
|
-
type: "texture",
|
|
436
|
-
src: options.src,
|
|
437
|
-
amount: options.amount ?? 1,
|
|
438
|
-
blend: options.blend ?? "multiply",
|
|
439
|
-
scale: options.scale ?? 1,
|
|
440
|
-
angle: options.angle ?? 0,
|
|
441
|
-
}, options));
|
|
442
|
-
}
|
|
443
423
|
/**
|
|
444
424
|
* Append Kuwahara brushwork — averages within a region but never across an
|
|
445
425
|
* edge, so flat areas smooth into strokes while boundaries stay crisp.
|
|
@@ -494,22 +474,6 @@ export class EffectChain {
|
|
|
494
474
|
phase: o.phase ?? 0,
|
|
495
475
|
}, o));
|
|
496
476
|
}
|
|
497
|
-
/**
|
|
498
|
-
* Append god rays — bright areas streamed outward from `center` and screened
|
|
499
|
-
* over the source, so light appears to pass whatever occludes it.
|
|
500
|
-
*/
|
|
501
|
-
godRays(options) {
|
|
502
|
-
const o = scalarOptions(options, "intensity");
|
|
503
|
-
return this.append(withEffectOptions({
|
|
504
|
-
type: "godRays",
|
|
505
|
-
intensity: o.intensity ?? 1,
|
|
506
|
-
threshold: o.threshold ?? 0.6,
|
|
507
|
-
length: o.length ?? 0.6,
|
|
508
|
-
center: o.center ?? CENTER,
|
|
509
|
-
decay: o.decay ?? 0.96,
|
|
510
|
-
samples: o.samples ?? 32,
|
|
511
|
-
}, o));
|
|
512
|
-
}
|
|
513
477
|
/**
|
|
514
478
|
* Append a custom SkSL shader. `mode` picks the layer it runs on — a
|
|
515
479
|
* foreground overlay blended with `blendMode`, or a backdrop shader that
|
|
@@ -551,26 +515,6 @@ export class EffectChain {
|
|
|
551
515
|
const { shader, ...rest } = options;
|
|
552
516
|
return this.shader({ ...rest, source: shader });
|
|
553
517
|
}
|
|
554
|
-
/**
|
|
555
|
-
* Append a displacement map — the content resampled at a position pushed
|
|
556
|
-
* around by a second image, rather than recoloured.
|
|
557
|
-
*
|
|
558
|
-
* With `{ mode: 'backdrop' }` the displacement runs on what is painted
|
|
559
|
-
* beneath the node and is clipped to its silhouette, which is refraction:
|
|
560
|
-
* the scene bends through the shape while the shape's own edges stay sharp.
|
|
561
|
-
*/
|
|
562
|
-
displace(options) {
|
|
563
|
-
const o = options;
|
|
564
|
-
return this.append(withEffectOptions({
|
|
565
|
-
type: "displace",
|
|
566
|
-
src: o.src,
|
|
567
|
-
amount: toBothAxes(o.amount ?? 20),
|
|
568
|
-
channel: o.channel ?? "rg",
|
|
569
|
-
midpoint: o.midpoint ?? 0.5,
|
|
570
|
-
scale: o.scale ?? 1,
|
|
571
|
-
angle: o.angle ?? 0,
|
|
572
|
-
}, o));
|
|
573
|
-
}
|
|
574
518
|
/**
|
|
575
519
|
* Append a sine warp. Tween `phase` over 360 to make the wave travel — it
|
|
576
520
|
* wraps, so a linear tween loops seamlessly.
|
|
@@ -638,29 +582,13 @@ export class EffectChain {
|
|
|
638
582
|
}, o));
|
|
639
583
|
}
|
|
640
584
|
/**
|
|
641
|
-
* Append
|
|
642
|
-
*
|
|
643
|
-
* and refills after a backwards scrub; see {@link TrailsEffect}.
|
|
644
|
-
*/
|
|
645
|
-
trails(options) {
|
|
646
|
-
const o = scalarOptions(options, "echoes");
|
|
647
|
-
return this.append(withEffectOptions({
|
|
648
|
-
type: "trails",
|
|
649
|
-
echoes: Math.round(o.echoes ?? 6),
|
|
650
|
-
delay: o.delay ?? 1 / 24,
|
|
651
|
-
decay: o.decay ?? 0.72,
|
|
652
|
-
blend: o.blend ?? "screen",
|
|
653
|
-
}, o));
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Append bevelled glass — the backdrop refracted, dispersed and frosted
|
|
657
|
-
* through the node's silhouette, with a specular rim along the bevel.
|
|
585
|
+
* Append Figma's Glass — the backdrop refracted, dispersed and frosted
|
|
586
|
+
* through a curved edge on the node's outline, with a rim of light.
|
|
658
587
|
*
|
|
659
588
|
* Like `magnify`, this reads what is painted *beneath* the node and is
|
|
660
|
-
* clipped to its outline, so the shape's own edges stay sharp.
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
* equally.
|
|
589
|
+
* clipped to its outline, so the shape's own edges stay sharp. It needs no
|
|
590
|
+
* map: the curve is derived from the outline itself, so it follows a
|
|
591
|
+
* rounded rect, an ellipse, a hand-drawn path or text equally.
|
|
664
592
|
*
|
|
665
593
|
* Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.
|
|
666
594
|
*/
|
|
@@ -668,14 +596,14 @@ export class EffectChain {
|
|
|
668
596
|
const o = scalarOptions(options, "refraction");
|
|
669
597
|
return this.append(withEffectOptions({
|
|
670
598
|
type: "glass",
|
|
671
|
-
lightAngle: o.lightAngle ??
|
|
672
|
-
lightIntensity: o.lightIntensity ??
|
|
673
|
-
refraction: o.refraction ??
|
|
674
|
-
depth: o.depth ??
|
|
675
|
-
dispersion: o.dispersion ??
|
|
676
|
-
frost: o.frost ??
|
|
677
|
-
splay: o.splay ??
|
|
678
|
-
}, { mode: o.mode ?? "backdrop" }));
|
|
599
|
+
lightAngle: o.lightAngle ?? -45,
|
|
600
|
+
lightIntensity: o.lightIntensity ?? 80,
|
|
601
|
+
refraction: o.refraction ?? 80,
|
|
602
|
+
depth: o.depth ?? 20,
|
|
603
|
+
dispersion: o.dispersion ?? 50,
|
|
604
|
+
frost: o.frost ?? 4,
|
|
605
|
+
splay: o.splay ?? 0,
|
|
606
|
+
}, { ...o, mode: o.mode ?? "backdrop" }));
|
|
679
607
|
}
|
|
680
608
|
/** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */
|
|
681
609
|
*[Symbol.iterator]() {
|
|
@@ -703,7 +631,7 @@ export class EffectChain {
|
|
|
703
631
|
*/
|
|
704
632
|
export const Effects = new EffectChain();
|
|
705
633
|
/**
|
|
706
|
-
* Normalises any {@link Effect} value to a plain `
|
|
634
|
+
* Normalises any {@link Effect} value to a plain `NodeEffect[]`.
|
|
707
635
|
* Used internally when reading props before rendering or interpolation.
|
|
708
636
|
*
|
|
709
637
|
* Chains used as array elements are flattened so each contributes its effects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/chain.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAA6B,MAAM,oBAAoB,CAAC;AAmnBxF,MAAM,MAAM,GAAY,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAChE,MAAM,eAAe,GAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,MAAM,IAAI,GAAY,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAErC,oEAAoE;AACpE,MAAM,QAAQ,GAAG,CAAC,MAAwB,EAAW,EAAE,CACnD,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAEnE,2DAA2D;AAC3D,MAAM,UAAU,GAAG,CAAC,KAAuB,EAAW,EAAE,CACpD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,C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AAK,EAAE;YAAE,OAAO,IAAI,CAAC;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACT,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import { SceneEffect } from \"./union\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { BlendMode } from \"../fill/blend\";\nimport type { Color } from \"../fill/color/parser\";\nimport type { EffectAxis, EffectOptions } from \"./effect-data\";\nimport { scalarOptions, withEffectOptions } from \"./effect-data\";\nimport { resolveEffect, lerpEffect } from \"./registry\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\nimport { normalizeUniforms } from \"../sksl-uniforms\";\nimport { resolveShaderProperties, type ShaderPropertyValues } from \"../shaders/resolve\";\nimport type { EffectShader } from \"../shaders/pack\";\nimport type { InvertChannel } from \"./implementations/invert\";\nimport type { MotionBlurAlignment } from \"./implementations/motion-blur\";\nimport type { SkSLUniform, SkSLUniformRecord } from \"./implementations/shader\";\nimport type { OutlinePosition } from \"./implementations/outline\";\nimport type { EdgeKernel } from \"./implementations/edges\";\nimport type { GlowChannel, GlowLoopStyle, GlowOriginal, GlowTint } from \"./implementations/glow\";\nimport type { RadialBlurStyle } from \"./implementations/radial-blur\";\nimport type { HalftoneShape, HalftoneSeparation } from \"./implementations/halftone\";\nimport type { DitherMatrix, DitherNoise } from \"./implementations/dither\";\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\nimport type { CurvesChannel } from \"../filters/implementations/curves\";\nimport type { BitCrushPalette } from \"./implementations/bit-crush\";\nimport type { AsciiCharset } from \"./implementations/ascii\";\nimport type { DisplaceChannel } from \"./implementations/displace\";\nimport type { WaveShape } from \"./implementations/wave\";\nimport type { ProgressiveBlurShape } from \"./implementations/progressive-blur\";\n\n/**\n * Every effect builder takes **exactly one argument**: an options object\n * carrying all of that effect's data. Builders with one dominant animated\n * scalar also accept that scalar directly, so the common case stays terse:\n *\n * Effects.blur(8)\n * Effects.blur({ radius: 8, mode: 'backdrop' })\n *\n * Field names are shared vocabulary across every effect — `radius` is always a\n * pixel distance, `amount` always a 0–1 intensity, `angle` always degrees,\n * `center` always a 0–1 normalised point, `axis` always an {@link EffectAxis}.\n */\n\n/** Gaussian blur. Scalar shorthand sets `radius`. */\nexport interface BlurOptions extends EffectOptions {\n /** Blur spread in pixels. */\n radius: number;\n}\n\n/** Directional (linear) blur. Scalar shorthand sets `radius`. */\nexport interface DirectionalBlurOptions extends EffectOptions {\n /** Smear length in pixels along `angle`. */\n radius: number;\n /** Smear axis in degrees — 0 = horizontal, 90 = vertical (default 0). */\n angle?: number;\n}\n\n/** Desaturation. Scalar shorthand sets `amount`. */\nexport interface GrayscaleOptions extends EffectOptions {\n /** 0–1: 0 = original, 1 = fully desaturated. */\n amount: number;\n}\n\n/**\n * After Effects-style Mosaic. Scalar shorthand sets `blocks` on both axes.\n *\n * `blocks` is the *number of blocks* across the node, so a count equal to the\n * node's pixel size on that axis is pristine and lower counts are coarser.\n */\nexport interface PixelateOptions extends EffectOptions {\n /** Block count — a number for both axes, or per-axis via `{ x, y }`. */\n blocks: number | Vector2;\n /** AE \"Sharp Colors\": solid blocks (true, the default) vs. smoothly blended. */\n sharpColors?: boolean;\n}\n\n/** Bulge / pinch lens over the node's content, or the backdrop. Scalar shorthand sets `strength`. */\nexport interface BulgeOptions extends EffectOptions {\n /** Positive bulges (barrel), negative pinches (pincushion). Range ≈ −1…1. */\n strength: number;\n /** Lens centre in 0–1 layer coords (default middle). */\n center?: Vector2;\n}\n\n/** Magnifier lens over the backdrop. Scalar shorthand sets `scale`. */\nexport interface MagnifyOptions extends EffectOptions {\n /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out (default 2). */\n scale?: number;\n /** Magnify centre in 0–1 layer coords (default middle). */\n center?: Vector2;\n}\n\n/** Bloom (glow). Scalar shorthand sets `intensity`. */\nexport interface BloomOptions extends EffectOptions {\n /** Additive multiplier for the bloom pass (default 1). */\n intensity?: number;\n /** 0–1 luminance cutoff — only pixels brighter than this bloom (default 0.7). */\n threshold?: number;\n /** Spread in pixels (default 12). */\n radius?: number;\n}\n\n/** Vintage / film-look colour grading. Scalar shorthand sets `amount`. */\nexport interface VintageOptions extends EffectOptions {\n /** 0–1: 0 = original, 1 = full sepia + desaturate (default 1). */\n amount?: number;\n /** −1…1: negative = cool/cyan tint, positive = warm/amber (default 0.2). */\n warmth?: number;\n}\n\n/** Lens-dispersion colour fringing. Scalar shorthand sets `amount`. */\nexport interface ChromaticAberrationOptions extends EffectOptions {\n /** Pixel offset distance for the R/B fringe (default 4). */\n amount?: number;\n /** Fringe axis in degrees — 0 = horizontal, R right / B left (default 0). */\n angle?: number;\n}\n\n/** Colour invert. Scalar shorthand sets `strength`. */\nexport interface InvertOptions extends EffectOptions {\n /** 0–1: blend from original (0) to fully inverted (1) (default 1). */\n strength?: number;\n /** Which channel / colour component to invert (default `'rgba'`). */\n channel?: InvertChannel;\n}\n\n/** Per-pixel random jitter. Scalar shorthand sets `strength`. */\nexport interface ScatterOptions extends EffectOptions {\n /** Maximum random pixel displacement (default 10). */\n strength?: number;\n /** Axis pixels are scattered along (default `'both'`). */\n axis?: EffectAxis;\n}\n\n/** Colour banding. Scalar shorthand sets `levels`. */\nexport interface PosterizeOptions extends EffectOptions {\n /** Number of brightness levels per channel (≥ 2, default 4). */\n levels?: number;\n}\n\n/** Velocity-driven motion blur. Scalar shorthand sets `length`. */\nexport interface MotionBlurOptions extends EffectOptions {\n /** Shutter \"openness\" as a percent; 100 ≈ 360° (default 50). */\n length?: number;\n /** Shutter phase: `'behind'` | `'centered'` | `'ahead'` | −1…1 (default `'centered'`). */\n alignment?: MotionBlurAlignment;\n /** Renderer quality hint; higher switches to multi-tap accumulation (default 16). */\n samples?: number;\n /** Blur-length multiplier (default 1). */\n strength?: number;\n /** Per-axis velocity scale (default `'both'`). */\n axis?: EffectAxis;\n}\n\n/**\n * A custom shader. `mode` selects the path:\n *\n * - `'foreground'` (the default) — the shader generates colour and is composited\n * onto the node's layer with `blendMode`.\n * - `'backdrop'` — the shader receives `uniform shader u_backdrop` (a snapshot of\n * what is painted beneath the node) and resamples it. `blendMode` is unused.\n */\nexport interface ShaderEffectOptions extends EffectOptions {\n /**\n * SkSL source, or a registered **shader pack** — a program plus the editable\n * values it publishes.\n *\n * A pack resolves to plain uniforms here, so nothing below this builder\n * knows one exists; what survives into the document is the resolved record\n * plus a `shaderId` naming the pack, which is what lets a host reopen its\n * property panel from a saved scene.\n */\n source: string | EffectShader;\n /**\n * Property overrides, by property id, when {@link source} is a pack.\n *\n * Anything not named here takes the pack's own default. Ignored — with a\n * warning — for a bare source string, which has no properties to override.\n */\n values?: ShaderPropertyValues;\n /**\n * Uniform values by name — lerped between animation frames (default `{}`).\n *\n * The positional `[{ name, value }]` array still works; both are bound by\n * name now, so the array's order no longer means anything.\n */\n uniforms?: SkSLUniformRecord | SkSLUniform[];\n /** How a foreground shader composites onto the layer (default `'screen'`). */\n blendMode?: BlendMode;\n}\n\n/** Coloured band around the node's silhouette. Scalar shorthand sets `width`. */\nexport interface OutlineOptions extends EffectOptions {\n /** Band thickness in pixels (default 4). */\n width?: number;\n /** Band colour (default `'black'`). */\n color?: Color;\n /** Which side of the edge the band grows from (default `'outside'`). */\n position?: OutlinePosition;\n}\n\n/**\n * A shadow cast from the node's silhouette. Scalar shorthand sets `blur`, since\n * softness is the knob a shadow is usually reached for by.\n */\nexport interface DropShadowOptions extends EffectOptions {\n /** Horizontal displacement in pixels (default 0). */\n offsetX?: number;\n /** Vertical displacement in pixels, positive being upward (default -8). */\n offsetY?: number;\n /** Softness in pixels, on a `blur` effect's scale (default 16). */\n blur?: number;\n /** Grows the silhouette before blurring, in pixels (default 0). */\n spread?: number;\n /** Shadow colour (default `'black'`). */\n color?: Color;\n}\n\n/** Darkened edges / lens falloff. Scalar shorthand sets `amount`. */\nexport interface VignetteOptions extends EffectOptions {\n /** 0–1 tint strength at the edge (default 0.5). */\n amount?: number;\n /** 0–1 normalised radius where the falloff starts (default 0.75). */\n radius?: number;\n /** 0–1 ramp width; 0 is a hard ring (default 0.5). */\n softness?: number;\n /** Tint colour (default `'black'`). */\n color?: Color;\n}\n\n/** Film grain. Scalar shorthand sets `amount`. */\n/**\n * A 3D colour lookup table — see {@link LutEffect} for the table's layout and\n * why it is compared by reference.\n *\n * No scalar shorthand: the dominant argument is a whole cube, and a builder that\n * took `Effects.lut(table)` would still need the size beside it to read it.\n */\nexport interface LutOptions extends EffectOptions {\n /** The cube, flat RGB triples, red-fastest. */\n table: Float32Array;\n /** Entries per axis. */\n size: number;\n /** 0–1 mix against the ungraded colour (default 1 — the full look). */\n amount?: number;\n}\n\nexport interface GrainOptions extends EffectOptions {\n /** 0–1 noise amplitude (default 0.25). */\n amount?: number;\n /** Grain cell size in pixels (default 1). */\n size?: number;\n /** Random field offset — animate it for frame-locked shimmer (default 0). */\n seed?: number;\n /** Re-seed every frame from elapsed time (default false). */\n animated?: boolean;\n /** Per-channel colour speckle instead of luminance noise (default false). */\n colored?: boolean;\n}\n\n/** Unsharp-mask sharpen. Scalar shorthand sets `amount`. */\nexport interface SharpenOptions extends EffectOptions {\n /** Edge-contrast boost (default 1). */\n amount?: number;\n /** Radius of the blurred reference, in pixels (default 1). */\n radius?: number;\n}\n\n/** Edge detection. Scalar shorthand sets `strength`. */\nexport interface EdgesOptions extends EffectOptions {\n /** Multiplier on the detected gradient (default 1). */\n strength?: number;\n /** Which operator measures the gradient (default `'sobel'`). */\n kernel?: EdgeKernel;\n /** Detect per RGB channel instead of on luminance (default false). */\n colored?: boolean;\n}\n\n/** Two-tone luminance cut. Scalar shorthand sets `level`. */\nexport interface ThresholdOptions extends EffectOptions {\n /** 0–1 cut point (default 0.5). */\n level?: number;\n /** 0–1 ramp width around the cut (default 0.05 — just enough to anti-alias). */\n smoothness?: number;\n}\n\n/** Zoom / spin blur about a point. Scalar shorthand sets `amount`. */\nexport interface RadialBlurOptions extends EffectOptions {\n /** Smear length, 0–1 (default 0.5). */\n amount?: number;\n /** Radial rush (`'zoom'`) or rotational streak (`'spin'`) (default `'zoom'`). */\n style?: RadialBlurStyle;\n /** Blur centre in 0–1 layer coords (default middle). */\n center?: Vector2;\n /** Taps averaged per pixel (default 16, max 32). */\n samples?: number;\n}\n\n/** Halftone print screen. Scalar shorthand sets `size`. */\nexport interface HalftoneOptions extends EffectOptions {\n /** Cell pitch in pixels (default 8). */\n size?: number;\n /** Screen rotation in degrees (default 45). */\n angle?: number;\n /** Mark drawn per cell (default `'dot'`). */\n shape?: HalftoneShape;\n /** Plates to screen into (default `'mono'`). */\n separation?: HalftoneSeparation;\n}\n\n/** Ordered (Bayer) dithering. Scalar shorthand sets `levels`. */\nexport interface DitherOptions extends EffectOptions {\n /** Output tones per channel, ≥ 2 (default 2). */\n levels?: number;\n /**\n * Threshold pattern (default `'bayer'`).\n *\n * `'bayer'` is the classic ordered matrix — a visible crosshatch, which is\n * the retro look and also what can beat against the pixel grid at some\n * `scale`s. `'blue'` is a void-and-cluster blue-noise field: same tone\n * reproduction, no lattice, no moiré. Reach for `'blue'` when the dither\n * should read as texture rather than as pattern.\n */\n noise?: DitherNoise;\n /** Bayer matrix size (default 4). Ignored when `noise` is `'blue'`. */\n matrix?: DitherMatrix;\n /** Pattern cell size in pixels (default 1). */\n scale?: number;\n /** Dither luminance to black and white (default false). */\n monochrome?: boolean;\n}\n\n/** Two-colour luminance ramp. Scalar shorthand sets `amount`. */\nexport interface DuotoneOptions extends EffectOptions {\n /** 0–1 blend from the original colours to the full ramp (default 1). */\n amount?: number;\n /** Colour the darkest tones map to (default `'black'`). */\n shadows?: Color;\n /** Colour the brightest tones map to (default `'white'`). */\n highlights?: Color;\n}\n\n/** Tone curve through control points. */\nexport interface CurvesOptions extends EffectOptions {\n /** Curve control points as `[input, output]` pairs in 0–1. */\n points: [number, number][];\n /** Channel(s) the curve applies to (default `'rgb'`). */\n channel?: CurvesChannel;\n}\n\n/** Photographic grading. Every field is optional and defaults to neutral. */\nexport type ColorAdjustmentOptions = Omit<ColorAdjustmentEffect, 'type'> & EffectOptions;\n\n/**\n * Per-channel RGB offset. Scalar shorthand sets `amount`, which spreads red and\n * blue apart horizontally by that many pixels and leaves green put — the\n * everyday case. Name `red`/`green`/`blue` for full control.\n */\nexport interface RgbShiftOptions extends EffectOptions {\n /** Shorthand: ±px horizontal spread of red vs. blue (default 4). */\n amount?: number;\n /** Red plane offset in px. Overrides `amount` for this channel. */\n red?: Vector2;\n /** Green plane offset in px. */\n green?: Vector2;\n /** Blue plane offset in px. Overrides `amount` for this channel. */\n blue?: Vector2;\n}\n\n/** CRT scanlines. Scalar shorthand sets `darkness`. */\nexport interface ScanlinesOptions extends EffectOptions {\n /** 0–1 how far the bands darken (default 0.5). */\n darkness?: number;\n /** Distance between band centres in px (default 4). */\n spacing?: number;\n /** 0–1 share of each period the dark band covers (default 0.5). */\n thickness?: number;\n /** Band offset in px — animate to roll the pattern (default 0). */\n offset?: number;\n /** Band angle in degrees; 0 = horizontal (default 0). */\n angle?: number;\n}\n\n/** Datamosh-style band tearing. Scalar shorthand sets `amount`. */\nexport interface BlockDisplaceOptions extends EffectOptions {\n /** Maximum displacement in px (default 20). */\n amount?: number;\n /** Band thickness in px (default 16). */\n size?: number;\n /** 0–1 fraction of bands that move at all (default 0.3). */\n density?: number;\n /** Random field offset — step it to jump between glitch states (default 0). */\n seed?: number;\n /** Which way bands slide (default `'x'`). */\n axis?: EffectAxis;\n}\n\n/** ASCII art from a glyph grid. Scalar shorthand sets `size`. */\nexport interface AsciiOptions extends EffectOptions {\n /** Cell size in pixels — the width of one character (default 12). */\n size?: number;\n /** A named ramp, or a custom string ordered most-ink-first (default `'standard'`). */\n charset?: AsciiCharset | string;\n /** Family the glyphs are baked in; a monospace face reads best (default `'monospace'`). */\n fontFamily?: string;\n /** Glyph colour when `colored` is false (default `'white'`). */\n ink?: Color;\n /** Colour behind the glyphs (default `'black'`; use `'transparent'` to overlay). */\n background?: Color;\n /** Tint each glyph with its own cell's colour instead of using `ink` (default false). */\n colored?: boolean;\n}\n\n/** Anamorphic glare — a bright pass smeared along one axis. Scalar shorthand sets `intensity`. */\nexport interface StreakOptions extends EffectOptions {\n /** Additive multiplier for the streak pass (default 1). */\n intensity?: number;\n /** 0–1 luminance cutoff (default 0.7). */\n threshold?: number;\n /** Smear length in pixels (default 120). */\n length?: number;\n /** Smear axis in degrees; 0 = horizontal (default 0). */\n angle?: number;\n}\n\n/**\n * A glow — bright (or opaque) areas spread outward and composited back, with\n * optional recolouring. Scalar shorthand sets `intensity`.\n *\n * Unlike `bloom`, this spreads past the node's own box, chooses how the source\n * composites against it, and can be coloured through a ramp.\n */\nexport interface GlowOptions extends EffectOptions {\n /** Additive multiplier for the glow pass (default 1). */\n intensity?: number;\n /** What decides a pixel's glow strength (default `'luminance'`). */\n channel?: GlowChannel;\n /** 0-1 luminance cutoff; read only when `channel` is `'luminance'` (default 0.5). */\n threshold?: number;\n /** Spread distance in pixels (default 25). */\n radius?: number;\n /** Dilation applied before the blur, in pixels — gives the glow a solid core (default 0). */\n spread?: number;\n /** Which way the glow spreads; `'x'`/`'y'` give anamorphic streaks (default `'both'`). */\n axis?: EffectAxis;\n /** Where the source layer sits relative to the glow (default `'behind'`). */\n original?: GlowOriginal;\n /** How the glow merges with the layer (default `'screen'`). */\n blend?: BlendMode;\n /** What the glow is coloured with (default `'none'`). */\n tint?: GlowTint;\n /** The glow's colour when `tint` is `'solid'` (default `'white'`). */\n color?: Color;\n /** Ramp colours when `tint` is `'ramp'`, parallel to `stops`. */\n colors?: Color[];\n /** Each ramp colour's position, 0-1 ascending (default evenly spaced). */\n stops?: number[];\n /** How the ramp repeats past one pass (default `'mirror'`). */\n loopStyle?: GlowLoopStyle;\n /** Ramp traversals across the glow's strength range (default 1). */\n cycles?: number;\n /** Offset along the ramp in degrees of one cycle; animate to move colour (default 0). */\n phase?: number;\n}\n\n/** Light streaming from a point. Scalar shorthand sets `intensity`. */\nexport interface GodRaysOptions extends EffectOptions {\n /** Additive multiplier for the ray pass (default 1). */\n intensity?: number;\n /** 0–1 luminance cutoff (default 0.6). */\n threshold?: number;\n /** Ray reach as a fraction of the distance to `center` (default 0.6). */\n length?: number;\n /** Light source in 0–1 layer coords (default middle). */\n center?: Vector2;\n /** Per-step falloff; below 1 the rays fade with distance (default 0.96). */\n decay?: number;\n /** Taps marched per pixel, 4–48 (default 32). */\n samples?: number;\n}\n\n/** Image overlay for material looks. Scalar shorthand sets `amount`. */\nexport interface TextureOptions extends EffectOptions {\n /** Image path, resolved like an image fill's `src`. */\n src: string;\n /** 0–1 blend strength (default 1). */\n amount?: number;\n /** How it composites (default `'multiply'`). */\n blend?: BlendMode;\n /** 1 covers the node once; 2 tiles it at half size (default 1). */\n scale?: number;\n /** Rotation in degrees (default 0). */\n angle?: number;\n}\n\n/** Kuwahara brushwork. Scalar shorthand sets `radius`. */\nexport interface OilPaintOptions extends EffectOptions {\n /** Window radius in pixels — brush size, capped at 6 (default 3). */\n radius?: number;\n}\n\n/**\n * Displacement map. Scalar shorthand sets `amount` on both axes.\n *\n * `mode: 'backdrop'` displaces what is painted beneath the node instead — i.e.\n * refraction through the node's silhouette.\n */\nexport interface DisplaceOptions extends EffectOptions {\n /** Map image path, resolved like an image fill's `src`. */\n src: string;\n /** Displacement in px — a number for both axes, or per-axis via `{ x, y }` (default 20). */\n amount?: number | Vector2;\n /** Which channels of the map are read (default `'rg'`). */\n channel?: DisplaceChannel;\n /** The map value meaning \"don't move\" (default 0.5, what signed maps use). */\n midpoint?: number;\n /** 1 covers the node once; 2 tiles it at half size (default 1). */\n scale?: number;\n /** Map rotation in degrees (default 0). */\n angle?: number;\n}\n\n/** Sine warp. Scalar shorthand sets `amplitude` on the Y axis — the everyday ripple. */\nexport interface WaveOptions extends EffectOptions {\n /** Peak displacement in px — a number (Y only), or per-axis via `{ x, y }` (default 20). */\n amplitude?: number | Vector2;\n /** Distance between crests in px (default 120). */\n wavelength?: number;\n /** Phase in degrees; tween over 360 for one seamless loop (default 0). */\n phase?: number;\n /** Parallel bands or concentric rings (default `'linear'`). */\n shape?: WaveShape;\n /** Direction the crests advance along, in degrees (default 0). `'linear'` only. */\n angle?: number;\n /** Ring origin in 0–1 layer coords (default middle). `'radial'` only. */\n center?: Vector2;\n}\n\n/** Twirl / swirl vortex. Scalar shorthand sets `angle`. */\nexport interface TwirlOptions extends EffectOptions {\n /** Rotation at the centre in degrees (default 180). */\n angle?: number;\n /** 0–1 radius of influence (default 1 — the whole node). */\n radius?: number;\n /** Vortex centre in 0–1 layer coords (default middle). */\n center?: Vector2;\n}\n\n/**\n * Blur that ramps across the node. Scalar shorthand sets `radius`.\n *\n * `mode: 'backdrop'` gives the frosted panel whose blur fades out rather than\n * ending at a hard edge.\n */\nexport interface ProgressiveBlurOptions extends EffectOptions {\n /** Blur spread in px at the far end of the ramp (default 24). */\n radius?: number;\n /** Blur spread in px at the near end of the ramp (default 0, i.e. sharp). */\n startRadius?: number;\n /** Ramp layout (default `'linear'`). */\n shape?: ProgressiveBlurShape;\n /** 0–1 where the blur starts building (default 0). */\n start?: number;\n /** 0–1 where it reaches `radius` (default 1). */\n end?: number;\n /** Ramp direction in degrees; 0 = left-to-right (default 90, i.e. downward). */\n angle?: number;\n /** Ramp origin in 0–1 layer coords (default middle). `'radial'` only. */\n center?: Vector2;\n /** Taps averaged at full radius, 2–32 (default 20). */\n samples?: number;\n}\n\n/** Mirrored wedges around a point. Scalar shorthand sets `segments`. */\nexport interface KaleidoscopeOptions extends EffectOptions {\n /** Number of mirrored wedges; below 2 is a no-op (default 6). */\n segments?: number;\n /** Rotation of the pattern in degrees — animate to sweep the source (default 0). */\n angle?: number;\n /** Fold origin in 0–1 layer coords (default middle). */\n center?: Vector2;\n /** Radial offset of the sampled wedge (default 0). */\n offset?: number;\n /** 0–1 blend from the original to the folded pattern — the handle to ramp it on (default 1). */\n amount?: number;\n}\n\n/** Motion trails from past frames. Scalar shorthand sets `echoes`. */\nexport interface TrailsOptions extends EffectOptions {\n /** Past-frame taps drawn behind the current frame (default 6). */\n echoes?: number;\n /** Delay between taps in seconds (default 1 / 24). */\n delay?: number;\n /** Per-tap alpha multiplier (default 0.72). */\n decay?: number;\n /** How the taps composite (default `'screen'`). */\n blend?: BlendMode;\n}\n\n/**\n * Bevelled glass over the backdrop. Scalar shorthand sets `refraction`.\n *\n * Every amount is 0–100 rather than a pixel figure — the renderer scales each\n * against the node's own size, so the same numbers read the same on a chip and\n * on a full-bleed panel (see {@link GlassEffect}). All five default to 100 and\n * the light to `0°` at full intensity, matching Figma's own defaults, so a bare\n * `Effects.glass()` is the effect as a designer coming from Figma expects it.\n *\n * Defaults to `{ mode: 'backdrop' }`; there is nothing to refract in a node's\n * own paint, so the foreground is a no-op.\n */\nexport interface GlassOptions extends EffectOptions {\n /** Direction the light arrives from, in degrees clockwise from the right (default 0). */\n lightAngle?: number;\n /** 0–100 brightness of the specular rim (default 100). */\n lightIntensity?: number;\n /** 0–100 sideways pull along the edge normal (default 100). */\n refraction?: number;\n /** 0–100 how far inward the bevel reaches (default 100). */\n depth?: number;\n /** 0–100 spread between the R/G/B samples (default 100). */\n dispersion?: number;\n /** 0–100 blend toward a blurred backdrop (default 100). */\n frost?: number;\n /** 0–100 spread of the highlight — 0 a glint, 100 a rim wash (default 100). */\n splay?: number;\n}\n\n/** Colour-depth reduction. Scalar shorthand sets `bits`. */\nexport interface BitCrushOptions extends EffectOptions {\n /** Bits per channel when `palette` is `'none'`, 1–8 (default 3). */\n bits?: number;\n /** Fixed hardware palette to snap to (default `'none'`). */\n palette?: BitCrushPalette;\n /** 0–1 blend between original and crushed (default 1). */\n amount?: number;\n}\n\nconst CENTER: Vector2 = { x: 0.5, y: 0.5 };\n\n/**\n * The ramp a glow starts with: white at the core falling to a warm amber.\n *\n * Copied rather than handed out, because unlike {@link CENTER} these are arrays\n * — sharing one would let editing a single glow's ramp reach into every other\n * glow ever built from the defaults.\n */\nconst GLOW_RAMP_COLORS: readonly Color[] = [\"white\", \"#ffa640\"];\nconst GLOW_RAMP_STOPS: readonly number[] = [0, 1];\nconst ZERO: Vector2 = { x: 0, y: 0 };\n\n/** Normalise {@link PixelateOptions.blocks} to a per-axis count. */\nconst toBlocks = (blocks: number | Vector2): Vector2 =>\n typeof blocks === \"number\" ? { x: blocks, y: blocks } : blocks;\n\n/** Normalise a scalar-or-vector px option to both axes. */\nconst toBothAxes = (value: number | Vector2): Vector2 =>\n typeof value === \"number\" ? { x: value, y: value } : value;\n\n/**\n * Normalise {@link WaveOptions.amplitude}. A bare number means the Y axis only —\n * a wave that displaces along its own direction of travel just smears, so the\n * transverse case is the one worth spelling `20` for.\n */\nconst toAmplitude = (value: number | Vector2): Vector2 =>\n typeof value === \"number\" ? { x: 0, y: value } : value;\n\n/**\n * Immutable, chainable list of scene effects.\n *\n * Each builder method returns a new `EffectChain` with the effect appended,\n * so chains are safe to share and branch.\n *\n * @example\n * const fx = Effects.blur(4).grayscale(0.5);\n * node.effects = fx; // assign directly\n * node.effects = [...fx, { type: 'pixelate', ... }]; // spread into array\n */\nexport class EffectChain {\n constructor(public list: SceneEffect[] = []) { }\n\n private append(effect: SceneEffect): EffectChain {\n return new EffectChain([...this.list, effect]);\n }\n\n /**\n * Append a Gaussian blur. Pass `{ mode: \"backdrop\" }` to blur the content\n * beneath the node (clipped to its silhouette, Figma-style) instead of the\n * node's own content.\n */\n blur(options: number | BlurOptions) {\n const o = scalarOptions(options, \"radius\");\n return this.append(withEffectOptions({ type: \"blur\" as const, radius: o.radius ?? 0 }, o));\n }\n\n /**\n * Append a motion-blur-style directional (linear) blur, smearing the node's\n * own content along a single axis (or the backdrop, with `{ mode: \"backdrop\" }`).\n */\n directionalBlur(options: number | DirectionalBlurOptions) {\n const o = scalarOptions(options, \"radius\");\n return this.append(withEffectOptions(\n { type: \"directionalBlur\" as const, radius: o.radius ?? 0, angle: o.angle ?? 0 },\n o,\n ));\n }\n\n /**\n * Append an After Effects-style Mosaic / pixelate. `blocks` is the *number of\n * blocks* across the node (a count equal to the node's pixel size on that\n * axis is pristine; lower is coarser), not a pixel block size.\n */\n pixelate(options: number | PixelateOptions) {\n const o = scalarOptions(options, \"blocks\");\n return this.append(withEffectOptions(\n {\n type: \"pixelate\" as const,\n blocks: toBlocks(o.blocks ?? 1),\n sharpColors: o.sharpColors ?? true,\n },\n o,\n ));\n }\n\n /** Append a grayscale effect. `{ mode: \"backdrop\" }` desaturates the backdrop. */\n grayscale(options: number | GrayscaleOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions({ type: \"grayscale\" as const, amount: o.amount ?? 0 }, o));\n }\n\n /**\n * Append a bulge/pinch lens. A barrel distortion magnifies the centre and\n * pins the edges; a negative strength pinches the centre inward instead.\n * `mode: \"backdrop\"` points the same lens at what is painted beneath the\n * node, giving a glass dome over the layers below rather than a warp of the\n * node's own paint.\n */\n bulge(options: number | BulgeOptions) {\n const o = scalarOptions(options, \"strength\");\n return this.append(withEffectOptions(\n { type: \"bulge\" as const, strength: o.strength ?? 0, center: o.center ?? CENTER },\n o,\n ));\n }\n\n /**\n * Append a magnify lens that magnifies the backdrop beneath the node. The lens\n * fills the node's bounding box and is clipped to its silhouette, so whatever\n * is painted underneath shows through scaled about `center` — like a\n * magnifying glass shaped to the node.\n *\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\n */\n magnify(options?: number | MagnifyOptions) {\n const o = scalarOptions(options, \"scale\");\n return this.append(withEffectOptions(\n { type: \"magnify\" as const, scale: o.scale ?? 2, center: o.center ?? CENTER },\n { mode: o.mode ?? \"backdrop\" },\n ));\n }\n\n /**\n * Append a bloom (glow) effect. Bright areas bleed soft light outward via a\n * screen-blend of the blurred bright-pass onto the layer.\n */\n bloom(options?: number | BloomOptions) {\n const o = scalarOptions(options, \"intensity\");\n return this.append(withEffectOptions(\n {\n type: \"bloom\" as const,\n threshold: o.threshold ?? 0.7,\n radius: o.radius ?? 12,\n intensity: o.intensity ?? 1,\n },\n o,\n ));\n }\n\n /** Append a vintage / film-look colour grading effect. */\n vintage(options?: number | VintageOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n { type: \"vintage\" as const, amount: o.amount ?? 1, warmth: o.warmth ?? 0.2 },\n o,\n ));\n }\n\n /**\n * Append a chromatic aberration effect — red/blue colour fringing that mimics\n * lens dispersion.\n */\n chromaticAberration(options?: number | ChromaticAberrationOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n { type: \"chromaticAberration\" as const, amount: o.amount ?? 4, angle: o.angle ?? 0 },\n o,\n ));\n }\n\n /** Append a colour-invert effect. */\n invert(options?: number | InvertOptions) {\n const o = scalarOptions(options, \"strength\");\n return this.append(withEffectOptions(\n { type: \"invert\" as const, channel: o.channel ?? \"rgba\", strength: o.strength ?? 1 },\n o,\n ));\n }\n\n /**\n * Append a scatter effect — randomly jitters the node's own pixels, smearing\n * its content like After Effects' Scatter.\n */\n scatter(options?: number | ScatterOptions) {\n const o = scalarOptions(options, \"strength\");\n return this.append(withEffectOptions(\n { type: \"scatter\" as const, strength: o.strength ?? 10, axis: o.axis ?? \"both\" },\n o,\n ));\n }\n\n /**\n * Append an After Effects-style posterize effect — quantizes each colour\n * channel into `levels` evenly-spaced bands, flattening gradients into steps.\n */\n posterize(options?: number | PosterizeOptions) {\n const o = scalarOptions(options, \"levels\");\n return this.append(withEffectOptions({ type: \"posterize\" as const, levels: o.levels ?? 4 }, o));\n }\n\n /**\n * Append velocity-driven motion blur — smears the node's own content along its\n * actual per-frame motion (a static node stays sharp). Modelled on After\n * Effects' shutter angle (`length`) and shutter phase (`alignment`).\n */\n motionBlur(options?: number | MotionBlurOptions) {\n const o = scalarOptions(options, \"length\");\n return this.append(withEffectOptions(\n {\n type: \"motionBlur\" as const,\n length: o.length ?? 50,\n alignment: o.alignment ?? \"centered\",\n samples: o.samples ?? 16,\n strength: o.strength ?? 1,\n axis: o.axis ?? \"both\",\n },\n o,\n ));\n }\n\n /**\n * Append an outline — a coloured band traced around the node's silhouette,\n * including alpha silhouettes (text, an image's cutout, a whole subtree) that\n * a geometry `stroke` can't follow.\n */\n outline(options?: number | OutlineOptions) {\n const o = scalarOptions(options, \"width\");\n return this.append(withEffectOptions(\n {\n type: \"outline\" as const,\n width: o.width ?? 4,\n color: o.color ?? \"black\",\n position: o.position ?? \"outside\",\n },\n o,\n ));\n }\n\n /**\n * Append a drop shadow cast from the node's **silhouette** — including alpha\n * silhouettes (text, an image's cutout, a whole subtree) that a geometry\n * `shadow` can't follow, since that one fills the node's path.\n */\n dropShadow(options?: number | DropShadowOptions) {\n const o = scalarOptions(options, \"blur\");\n return this.append(withEffectOptions(\n {\n type: \"dropShadow\" as const,\n offsetX: o.offsetX ?? 0,\n offsetY: o.offsetY ?? -8,\n blur: o.blur ?? 16,\n spread: o.spread ?? 0,\n color: o.color ?? \"black\",\n },\n o,\n ));\n }\n\n /**\n * Append a vignette — a soft tint ramping in toward the node's corners. The\n * falloff follows the node's aspect ratio, so a wide node darkens along its\n * short edges the way a lens would.\n */\n vignette(options?: number | VignetteOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n {\n type: \"vignette\" as const,\n amount: o.amount ?? 0.5,\n radius: o.radius ?? 0.75,\n softness: o.softness ?? 0.5,\n color: o.color ?? \"black\",\n },\n o,\n ));\n }\n\n /**\n * Append film grain. Static grain reads as texture rather than film, so pass\n * `{ animated: true }` to re-seed it each frame — or tween `seed` when the\n * render has to stay deterministic.\n */\n /**\n * Apply a 3D colour lookup table.\n *\n * The whole point of a LUT is that it is *someone else's* colour science, so\n * there is nothing to default beyond how much of it to use: `amount` is the\n * mix and everything else is the file.\n *\n * @example\n * Effects.lut({ table, size: 33 }) // the full look\n * Effects.lut({ table, size: 33, amount: 0.6 })\n */\n lut(options: LutOptions) {\n return this.append(withEffectOptions(\n {\n type: \"lut\" as const,\n table: options.table,\n size: options.size,\n amount: options.amount ?? 1,\n },\n options,\n ));\n }\n\n grain(options?: number | GrainOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n {\n type: \"grain\" as const,\n amount: o.amount ?? 0.25,\n size: o.size ?? 1,\n seed: o.seed ?? 0,\n animated: o.animated ?? false,\n colored: o.colored ?? false,\n },\n o,\n ));\n }\n\n /** Append an unsharp-mask sharpen — local contrast boosted at `radius` scale. */\n sharpen(options?: number | SharpenOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n { type: \"sharpen\" as const, amount: o.amount ?? 1, radius: o.radius ?? 1 },\n o,\n ));\n }\n\n /**\n * Append edge detection — flat areas go black and boundaries light up with\n * the magnitude of the local gradient.\n */\n edges(options?: number | EdgesOptions) {\n const o = scalarOptions(options, \"strength\");\n return this.append(withEffectOptions(\n {\n type: \"edges\" as const,\n strength: o.strength ?? 1,\n kernel: o.kernel ?? \"sobel\",\n colored: o.colored ?? false,\n },\n o,\n ));\n }\n\n /**\n * Append a luminance threshold — a two-tone stencil cut at `level`, with\n * `smoothness` widening the cut into a ramp.\n */\n threshold(options?: number | ThresholdOptions) {\n const o = scalarOptions(options, \"level\");\n return this.append(withEffectOptions(\n { type: \"threshold\" as const, level: o.level ?? 0.5, smoothness: o.smoothness ?? 0.05 },\n o,\n ));\n }\n\n /**\n * Append a radial blur — samples smeared along the radius (`'zoom'`, the\n * default) or the tangent (`'spin'`) about `center`, leaving the centre sharp.\n */\n radialBlur(options?: number | RadialBlurOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n {\n type: \"radialBlur\" as const,\n amount: o.amount ?? 0.5,\n style: o.style ?? \"zoom\",\n center: o.center ?? CENTER,\n samples: o.samples ?? 16,\n },\n o,\n ));\n }\n\n /**\n * Append a halftone screen — the newsprint look, where tone becomes the size\n * of a mark on a rotated grid.\n */\n halftone(options?: number | HalftoneOptions) {\n const o = scalarOptions(options, \"size\");\n return this.append(withEffectOptions(\n {\n type: \"halftone\" as const,\n size: o.size ?? 8,\n angle: o.angle ?? 45,\n shape: o.shape ?? \"dot\",\n separation: o.separation ?? \"mono\",\n },\n o,\n ));\n }\n\n /**\n * Append ordered (Bayer) dithering — quantization to `levels` tones per\n * channel with the error traded for a retro crosshatch pattern.\n */\n dither(options?: number | DitherOptions) {\n const o = scalarOptions(options, \"levels\");\n return this.append(withEffectOptions(\n {\n type: \"dither\" as const,\n levels: o.levels ?? 2,\n matrix: o.matrix ?? 4,\n scale: o.scale ?? 1,\n monochrome: o.monochrome ?? false,\n noise: o.noise ?? \"bayer\",\n },\n o,\n ));\n }\n\n /**\n * Append a duotone / gradient map — the content's luminance remapped onto a\n * `shadows` → `highlights` ramp, discarding its original chroma.\n */\n duotone(options?: number | DuotoneOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n {\n type: \"duotone\" as const,\n amount: o.amount ?? 1,\n shadows: o.shadows ?? \"black\",\n highlights: o.highlights ?? \"white\",\n },\n o,\n ));\n }\n\n /**\n * Append a tone curve — the same adjustment `Adjustments.curves` applies to a\n * photo, on any node.\n */\n curves(options: CurvesOptions) {\n return this.append(withEffectOptions(\n { type: \"curves\" as const, points: options.points, channel: options.channel ?? \"rgb\" },\n options,\n ));\n }\n\n /**\n * Append photographic grading (brightness / contrast / saturation / vibrance /\n * shadows / highlights / temperature / tint) — `Adjustments.colorAdjustment`\n * on any node. For darkened edges use {@link EffectChain.vignette}.\n */\n colorAdjustment(options: ColorAdjustmentOptions) {\n // Destructure `mode` out rather than spreading it through: a caller who\n // writes `{ mode: undefined }` would otherwise plant the key on the\n // effect, and `equals()` compares `mode` directly. `withEffectOptions`\n // skips undefined, so handing it back there is safe.\n const { mode, ...fields } = options;\n return this.append(withEffectOptions({ type: \"colorAdjustment\" as const, ...fields }, { mode }));\n }\n\n /**\n * Append a per-channel RGB offset — the digital cousin of\n * {@link EffectChain.chromaticAberration}, where each plane goes where you\n * point it instead of following a lens model.\n */\n rgbShift(options?: number | RgbShiftOptions) {\n const o = scalarOptions(options, \"amount\");\n const spread = o.amount ?? 4;\n return this.append(withEffectOptions(\n {\n type: \"rgbShift\" as const,\n red: o.red ?? { x: spread, y: 0 },\n green: o.green ?? ZERO,\n blue: o.blue ?? { x: -spread, y: 0 },\n },\n o,\n ));\n }\n\n /**\n * Append CRT scanlines. Animate `offset` past `spacing` to roll the bands;\n * the pattern wraps, so a linear tween loops seamlessly.\n */\n scanlines(options?: number | ScanlinesOptions) {\n const o = scalarOptions(options, \"darkness\");\n return this.append(withEffectOptions(\n {\n type: \"scanlines\" as const,\n spacing: o.spacing ?? 4,\n thickness: o.thickness ?? 0.5,\n darkness: o.darkness ?? 0.5,\n offset: o.offset ?? 0,\n angle: o.angle ?? 0,\n },\n o,\n ));\n }\n\n /**\n * Append datamosh-style band tearing. Step `seed` in whole numbers to jump\n * between distinct glitch states rather than sliding between them.\n */\n blockDisplace(options?: number | BlockDisplaceOptions) {\n const o = scalarOptions(options, \"amount\");\n return this.append(withEffectOptions(\n {\n type: \"blockDisplace\" as const,\n amount: o.amount ?? 20,\n size: o.size ?? 16,\n density: o.density ?? 0.3,\n seed: o.seed ?? 0,\n axis: o.axis ?? \"x\",\n },\n o,\n ));\n }\n\n /**\n * Append colour-depth reduction — `bits` per channel, or a fixed hardware\n * palette. Pair with {@link EffectChain.dither} so gradients survive the cut.\n */\n bitCrush(options?: number | BitCrushOptions) {\n const o = scalarOptions(options, \"bits\");\n return this.append(withEffectOptions(\n {\n type: \"bitCrush\" as const,\n bits: o.bits ?? 3,\n palette: o.palette ?? \"none\",\n amount: o.amount ?? 1,\n },\n o,\n ));\n }\n\n /**\n * Append ASCII art — the content divided into a grid of cells, each cell's\n * tone replaced by the glyph that carries a matching amount of ink.\n *\n * Set `background: 'transparent'` to lay the glyphs over whatever is behind\n * the node instead of over a solid field.\n */\n ascii(options?: number | AsciiOptions) {\n const o = scalarOptions(options, \"size\");\n return this.append(withEffectOptions(\n {\n type: \"ascii\" as const,\n size: o.size ?? 12,\n charset: o.charset ?? \"standard\",\n fontFamily: o.fontFamily ?? \"monospace\",\n ink: o.ink ?? \"white\",\n background: o.background ?? \"black\",\n colored: o.colored ?? false,\n },\n o,\n ));\n }\n\n /**\n * Append an image overlay — paper grain, canvas weave, fabric. The image is\n * yours: drop it in the project's `public/` folder and name it the way an\n * image fill would.\n *\n * A missing or not-yet-loaded image makes the effect a no-op, so a wrong\n * path costs you the texture and nothing else.\n */\n texture(options: TextureOptions) {\n return this.append(withEffectOptions(\n {\n type: \"texture\" as const,\n src: options.src,\n amount: options.amount ?? 1,\n blend: options.blend ?? \"multiply\",\n scale: options.scale ?? 1,\n angle: options.angle ?? 0,\n },\n options,\n ));\n }\n\n /**\n * Append Kuwahara brushwork — averages within a region but never across an\n * edge, so flat areas smooth into strokes while boundaries stay crisp.\n * By some margin the most expensive effect in the set; keep `radius` small.\n */\n oilPaint(options?: number | OilPaintOptions) {\n const o = scalarOptions(options, \"radius\");\n return this.append(withEffectOptions({ type: \"oilPaint\" as const, radius: o.radius ?? 3 }, o));\n }\n\n /**\n * Append an anamorphic streak — a bright pass smeared along one axis and\n * screened back on. {@link EffectChain.bloom} spreads light in every\n * direction; this spreads it in one.\n */\n streak(options?: number | StreakOptions) {\n const o = scalarOptions(options, \"intensity\");\n return this.append(withEffectOptions(\n {\n type: \"streak\" as const,\n intensity: o.intensity ?? 1,\n threshold: o.threshold ?? 0.7,\n length: o.length ?? 120,\n angle: o.angle ?? 0,\n },\n o,\n ));\n }\n\n /**\n * Append a glow — the bright (or opaque) parts of the layer spread outward\n * and composited back, optionally recoloured through a ramp.\n *\n * `bloom` is the cheaper relative: it screens a blurred bright-pass back\n * within the node's own box. This one spreads past that box, lets the source\n * sit behind, in front of, or nowhere at all, and can map glow strength onto\n * `colors`/`stops` — which is what a heat, neon or aurora look needs.\n */\n glow(options?: number | GlowOptions) {\n const o = scalarOptions(options, \"intensity\");\n return this.append(withEffectOptions(\n {\n type: \"glow\" as const,\n channel: o.channel ?? \"luminance\",\n threshold: o.threshold ?? 0.5,\n radius: o.radius ?? 25,\n spread: o.spread ?? 0,\n intensity: o.intensity ?? 1,\n axis: o.axis ?? \"both\",\n original: o.original ?? \"behind\",\n blend: o.blend ?? \"screen\",\n tint: o.tint ?? \"none\",\n color: o.color ?? \"white\",\n colors: o.colors ?? [...GLOW_RAMP_COLORS],\n stops: o.stops ?? [...GLOW_RAMP_STOPS],\n loopStyle: o.loopStyle ?? \"mirror\",\n cycles: o.cycles ?? 1,\n phase: o.phase ?? 0,\n },\n o,\n ));\n }\n\n /**\n * Append god rays — bright areas streamed outward from `center` and screened\n * over the source, so light appears to pass whatever occludes it.\n */\n godRays(options?: number | GodRaysOptions) {\n const o = scalarOptions(options, \"intensity\");\n return this.append(withEffectOptions(\n {\n type: \"godRays\" as const,\n intensity: o.intensity ?? 1,\n threshold: o.threshold ?? 0.6,\n length: o.length ?? 0.6,\n center: o.center ?? CENTER,\n decay: o.decay ?? 0.96,\n samples: o.samples ?? 32,\n },\n o,\n ));\n }\n\n /**\n * Append a custom SkSL shader. `mode` picks the layer it runs on — a\n * foreground overlay blended with `blendMode`, or a backdrop shader that\n * resamples `uniform shader u_backdrop`.\n */\n shader(options: ShaderEffectOptions) {\n const pack = typeof options.source === \"string\" ? undefined : options.source;\n if (pack && pack.scope !== \"effect\") {\n throw new Error(\n `Effects.shader was given a \"${(pack as { scope: string }).scope}\" shader ` +\n `(\"${pack.name}\"). A fill shader has no backdrop to sample and is bound to a ` +\n `shape's box; use Fills.shader.`,\n );\n }\n // A pack that declares `u_backdrop` has to run on the backdrop path, so\n // it supplies the default — a caller may still say otherwise.\n const mode = options.mode ?? (pack?.backdrop ? \"backdrop\" : \"foreground\");\n const source = pack ? pack.source : (options.source as string);\n const uniforms = pack\n ? { ...resolveShaderProperties(pack, options.values), ...normalizeUniforms(options.uniforms ?? {}) }\n : (options.uniforms ?? {});\n const base = {\n type: \"shader\" as const,\n source,\n uniforms,\n ...(pack?.id !== undefined ? { shaderId: pack.id } : {}),\n };\n // blendMode only applies to the foreground overlay; leaving it undefined\n // for a backdrop shader keeps `equals()` comparing like with like.\n const effect: SceneEffect = mode === \"foreground\"\n ? { ...base, blendMode: options.blendMode ?? \"screen\" }\n : base;\n return this.append(withEffectOptions(effect, { mode }));\n }\n\n /**\n * @deprecated Use {@link EffectChain.shader}. `sksl` named the dialect; the\n * effect is named for the paint it is the sibling of. Takes the source in\n * `shader` rather than `source`, as it always did.\n */\n sksl(options: Omit<ShaderEffectOptions, \"source\"> & { shader: string }) {\n const { shader, ...rest } = options;\n return this.shader({ ...rest, source: shader });\n }\n\n /**\n * Append a displacement map — the content resampled at a position pushed\n * around by a second image, rather than recoloured.\n *\n * With `{ mode: 'backdrop' }` the displacement runs on what is painted\n * beneath the node and is clipped to its silhouette, which is refraction:\n * the scene bends through the shape while the shape's own edges stay sharp.\n */\n displace(options: DisplaceOptions) {\n const o = options;\n return this.append(withEffectOptions(\n {\n type: \"displace\" as const,\n src: o.src,\n amount: toBothAxes(o.amount ?? 20),\n channel: o.channel ?? \"rg\",\n midpoint: o.midpoint ?? 0.5,\n scale: o.scale ?? 1,\n angle: o.angle ?? 0,\n },\n o,\n ));\n }\n\n /**\n * Append a sine warp. Tween `phase` over 360 to make the wave travel — it\n * wraps, so a linear tween loops seamlessly.\n */\n wave(options?: number | WaveOptions) {\n const o = scalarOptions(options, \"amplitude\");\n return this.append(withEffectOptions(\n {\n type: \"wave\" as const,\n amplitude: toAmplitude(o.amplitude ?? 20),\n wavelength: o.wavelength ?? 120,\n phase: o.phase ?? 0,\n shape: o.shape ?? \"linear\",\n angle: o.angle ?? 0,\n center: o.center ?? CENTER,\n },\n o,\n ));\n }\n\n /**\n * Append a twirl / swirl vortex — a rotation about `center` that falls off\n * with distance, so the middle spins while the rim stays pinned.\n */\n twirl(options?: number | TwirlOptions) {\n const o = scalarOptions(options, \"angle\");\n return this.append(withEffectOptions(\n {\n type: \"twirl\" as const,\n angle: o.angle ?? 180,\n radius: o.radius ?? 1,\n center: o.center ?? CENTER,\n },\n o,\n ));\n }\n\n /**\n * Append a blur whose radius ramps across the node rather than being\n * uniform. With `{ mode: 'backdrop' }` this is the frosted panel whose blur\n * fades out instead of ending at a hard edge.\n */\n progressiveBlur(options?: number | ProgressiveBlurOptions) {\n const o = scalarOptions(options, \"radius\");\n return this.append(withEffectOptions(\n {\n type: \"progressiveBlur\" as const,\n radius: o.radius ?? 24,\n // Sharp at the near end unless asked otherwise — what this\n // effect did before the field existed.\n startRadius: o.startRadius ?? 0,\n shape: o.shape ?? \"linear\",\n start: o.start ?? 0,\n end: o.end ?? 1,\n angle: o.angle ?? 90,\n center: o.center ?? CENTER,\n samples: o.samples ?? 20,\n },\n o,\n ));\n }\n\n /**\n * Append a kaleidoscope fold. Animating `angle` sweeps fresh source material\n * through the sampled wedge while the pattern itself stays locked — which is\n * not what rotating the node does.\n */\n kaleidoscope(options?: number | KaleidoscopeOptions) {\n const o = scalarOptions(options, \"segments\");\n return this.append(withEffectOptions(\n {\n type: \"kaleidoscope\" as const,\n segments: Math.round(o.segments ?? 6),\n angle: o.angle ?? 0,\n center: o.center ?? CENTER,\n offset: o.offset ?? 0,\n amount: o.amount ?? 1,\n },\n o,\n ));\n }\n\n /**\n * Append motion trails — the node composited with a trail of its own past\n * frames. History-dependent, so it is exact under linear playback and export\n * and refills after a backwards scrub; see {@link TrailsEffect}.\n */\n trails(options?: number | TrailsOptions) {\n const o = scalarOptions(options, \"echoes\");\n return this.append(withEffectOptions(\n {\n type: \"trails\" as const,\n echoes: Math.round(o.echoes ?? 6),\n delay: o.delay ?? 1 / 24,\n decay: o.decay ?? 0.72,\n blend: o.blend ?? \"screen\",\n },\n o,\n ));\n }\n\n /**\n * Append bevelled glass — the backdrop refracted, dispersed and frosted\n * through the node's silhouette, with a specular rim along the bevel.\n *\n * Like `magnify`, this reads what is painted *beneath* the node and is\n * clipped to its outline, so the shape's own edges stay sharp. Unlike\n * `displace` it needs no map: the bevel is derived from the silhouette\n * itself, so it follows a rounded rect, an ellipse or a hand-drawn path\n * equally.\n *\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\n */\n glass(options?: number | GlassOptions) {\n const o = scalarOptions(options, \"refraction\");\n return this.append(withEffectOptions(\n {\n type: \"glass\" as const,\n lightAngle: o.lightAngle ?? 0,\n lightIntensity: o.lightIntensity ?? 100,\n refraction: o.refraction ?? 100,\n depth: o.depth ?? 100,\n dispersion: o.dispersion ?? 100,\n frost: o.frost ?? 100,\n splay: o.splay ?? 100,\n },\n { mode: o.mode ?? \"backdrop\" },\n ));\n }\n\n /** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */\n *[Symbol.iterator]() {\n yield* this.list;\n }\n\n /** Serializes to the raw effect array so frameworks that call `toJSON` get a plain value. */\n toJSON() {\n return this.list;\n }\n}\n\n/**\n * Accepted shapes for a node's `effects` prop.\n *\n * Mirrors {@link Fill}: a single {@link SceneEffect}, an `EffectChain` builder\n * result, or an array mixing effects and chains (each chain contributes all its\n * effects in place). Already-resolved effects are themselves `SceneEffect`s, so\n * a node's read-back `effects` can be assigned straight back.\n *\n * Effects.blur(8) // chain\n * { type: 'blur', radius: 8 } // single effect\n * [Effects.blur(8), { type: 'invert' }] // mixed array\n * [...Effects.blur(8), grayscaleEffect]\n */\nexport type Effect =\n | SceneEffect\n | EffectChain\n | (SceneEffect | EffectChain)[];\n\n/**\n * Entry point for building effect chains fluently.\n *\n * An empty {@link EffectChain}, so `Effects.blur(8)` *is* `new EffectChain().blur(8)`\n * — every builder's signature and documentation has exactly one definition, on\n * the class, which is also what an editor shows when you hover `Effects.blur`.\n * (A parallel object of arrow functions would need its own copy of all 41 docs,\n * and hovering it showed none of them.)\n *\n * The chain is immutable — every builder returns a *new* chain — so sharing one\n * empty instance as the entry point is safe.\n *\n * @example\n * node.effects = Effects.blur(8).grayscale(1);\n */\nexport const Effects = new EffectChain();\n\n/**\n * Normalises any {@link Effect} value to a plain `SceneEffect[]`.\n * Used internally when reading props before rendering or interpolation.\n *\n * Chains used as array elements are flattened so each contributes its effects\n * in place: `[Effects.blur(8), grayscaleEffect]` — as is the plain array a chain\n * serializes to, which is how that value reads back out of a stored document.\n */\nexport function resolveChainEffects(effects: Effect | undefined): SceneEffect[] {\n if (effects === undefined) return [];\n if (effects instanceof EffectChain) return resolveAll(effects.list);\n if (Array.isArray(effects)) {\n const out: SceneEffect[] = [];\n for (const item of effects) {\n if (item instanceof EffectChain) out.push(...resolveAll(item.list));\n else if (Array.isArray(item)) out.push(...resolveChainEffects(item as Effect));\n else out.push(resolveEffect(item));\n }\n return out;\n }\n return [resolveEffect(effects)];\n}\n\n/**\n * Resolve every effect in `list`, returning **the same array** when none of them\n * needed it — which is the overwhelming majority, since one effect type\n * registers a `resolve` at all.\n *\n * The identity is load-bearing, not a micro-optimisation: this runs on every\n * write of an `effects` prop, and `lerpEffectArray` short-circuits on\n * `from === to`. Copying unconditionally would defeat that for every node in\n * every scene to migrate one effect type.\n */\nfunction resolveAll(list: SceneEffect[]): SceneEffect[] {\n let out: SceneEffect[] | undefined;\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveEffect(list[i]);\n if (!out && resolved !== list[i]) out = list.slice(0, i);\n out?.push(resolved);\n }\n return out ?? list;\n}\n\n/** The effect-chain attribute's op set — the `effects` prop's resolve/lerp pair. */\nexport const effectsOps: AttributeOps<Effect, SceneEffect[]> = {\n resolve: (effects) => resolveChainEffects(effects),\n lerp: (from, to, t) => {\n if (from === to) return from;\n const maxLen = Math.max(from.length, to.length);\n const result: SceneEffect[] = [];\n for (let i = 0; i < maxLen; i++) {\n const a = from[i];\n const b = to[i];\n if (a && b) {\n result.push(lerpEffect(a, b, t));\n } else if (a) {\n result.push(a);\n } else if (b) {\n result.push(b);\n }\n }\n return result;\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/chain.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAA6B,MAAM,oBAAoB,CAAC;AAijBxF,MAAM,MAAM,GAAY,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAChE,MAAM,eAAe,GAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,MAAM,IAAI,GAAY,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAErC,oEAAoE;AACpE,MAAM,QAAQ,GAAG,CAAC,MAAwB,EAAW,EAAE,CACnD,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAA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CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\r\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { BlendMode } from \"../fill/blend\";\r\nimport type { Color } from \"../fill/color/parser\";\r\nimport type { EffectAxis, EffectOptions } from \"./effect-data\";\r\nimport { scalarOptions, withEffectOptions } from \"./effect-data\";\r\nimport { resolveEffect, lerpEffect } from \"./registry\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\nimport { normalizeUniforms } from \"../sksl-uniforms\";\r\nimport { resolveShaderProperties, type ShaderPropertyValues } from \"../shaders/resolve\";\r\nimport type { EffectShader } from \"../shaders/pack\";\r\nimport type { InvertChannel } from \"./implementations/invert\";\r\nimport type { MotionBlurAlignment } from \"./implementations/motion-blur\";\r\nimport type { SkSLUniform, SkSLUniformRecord } from \"./implementations/shader\";\r\nimport type { OutlinePosition } from \"./implementations/outline\";\r\nimport type { EdgeKernel } from \"./implementations/edges\";\r\nimport type { GlowChannel, GlowLoopStyle, GlowOriginal, GlowTint } from \"./implementations/glow\";\r\nimport type { RadialBlurStyle } from \"./implementations/radial-blur\";\r\nimport type { HalftoneShape, HalftoneSeparation } from \"./implementations/halftone\";\r\nimport type { DitherMatrix, DitherNoise } from \"./implementations/dither\";\r\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\r\nimport type { CurvesChannel } from \"../filters/implementations/curves\";\r\nimport type { BitCrushPalette } from \"./implementations/bit-crush\";\r\nimport type { AsciiCharset } from \"./implementations/ascii\";\r\nimport type { WaveShape } from \"./implementations/wave\";\r\nimport type { ProgressiveBlurShape } from \"./implementations/progressive-blur\";\r\n\r\n/**\r\n * Every effect builder takes **exactly one argument**: an options object\r\n * carrying all of that effect's data. Builders with one dominant animated\r\n * scalar also accept that scalar directly, so the common case stays terse:\r\n *\r\n * Effects.blur(8)\r\n * Effects.blur({ radius: 8, mode: 'backdrop' })\r\n *\r\n * Field names are shared vocabulary across every effect — `radius` is always a\r\n * pixel distance, `amount` always a 0–1 intensity, `angle` always degrees,\r\n * `center` always a 0–1 normalised point, `axis` always an {@link EffectAxis}.\r\n */\r\n\r\n/** Gaussian blur. Scalar shorthand sets `radius`. */\r\nexport interface BlurOptions extends EffectOptions {\r\n /** Blur spread in pixels. */\r\n radius: number;\r\n}\r\n\r\n/** Directional (linear) blur. Scalar shorthand sets `radius`. */\r\nexport interface DirectionalBlurOptions extends EffectOptions {\r\n /** Smear length in pixels along `angle`. */\r\n radius: number;\r\n /** Smear axis in degrees — 0 = horizontal, 90 = vertical (default 0). */\r\n angle?: number;\r\n}\r\n\r\n/** Desaturation. Scalar shorthand sets `amount`. */\r\nexport interface GrayscaleOptions extends EffectOptions {\r\n /** 0–1: 0 = original, 1 = fully desaturated. */\r\n amount: number;\r\n}\r\n\r\n/**\r\n * After Effects-style Mosaic. Scalar shorthand sets `blocks` on both axes.\r\n *\r\n * `blocks` is the *number of blocks* across the node, so a count equal to the\r\n * node's pixel size on that axis is pristine and lower counts are coarser.\r\n */\r\nexport interface PixelateOptions extends EffectOptions {\r\n /** Block count — a number for both axes, or per-axis via `{ x, y }`. */\r\n blocks: number | Vector2;\r\n /** AE \"Sharp Colors\": solid blocks (true, the default) vs. smoothly blended. */\r\n sharpColors?: boolean;\r\n}\r\n\r\n/** Bulge / pinch lens over the node's content, or the backdrop. Scalar shorthand sets `strength`. */\r\nexport interface BulgeOptions extends EffectOptions {\r\n /** Positive bulges (barrel), negative pinches (pincushion). Range ≈ −1…1. */\r\n strength: number;\r\n /** Lens centre in 0–1 layer coords (default middle). */\r\n center?: Vector2;\r\n}\r\n\r\n/** Magnifier lens over the backdrop. Scalar shorthand sets `scale`. */\r\nexport interface MagnifyOptions extends EffectOptions {\r\n /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out (default 2). */\r\n scale?: number;\r\n /** Magnify centre in 0–1 layer coords (default middle). */\r\n center?: Vector2;\r\n}\r\n\r\n/** Bloom (glow). Scalar shorthand sets `intensity`. */\r\nexport interface BloomOptions extends EffectOptions {\r\n /** Additive multiplier for the bloom pass (default 1). */\r\n intensity?: number;\r\n /** 0–1 luminance cutoff — only pixels brighter than this bloom (default 0.7). */\r\n threshold?: number;\r\n /** Spread in pixels (default 12). */\r\n radius?: number;\r\n}\r\n\r\n/** Vintage / film-look colour grading. Scalar shorthand sets `amount`. */\r\nexport interface VintageOptions extends EffectOptions {\r\n /** 0–1: 0 = original, 1 = full sepia + desaturate (default 1). */\r\n amount?: number;\r\n /** −1…1: negative = cool/cyan tint, positive = warm/amber (default 0.2). */\r\n warmth?: number;\r\n}\r\n\r\n/** Lens-dispersion colour fringing. Scalar shorthand sets `amount`. */\r\nexport interface ChromaticAberrationOptions extends EffectOptions {\r\n /** Pixel offset distance for the R/B fringe (default 4). */\r\n amount?: number;\r\n /** Fringe axis in degrees — 0 = horizontal, R right / B left (default 0). */\r\n angle?: number;\r\n}\r\n\r\n/** Colour invert. Scalar shorthand sets `strength`. */\r\nexport interface InvertOptions extends EffectOptions {\r\n /** 0–1: blend from original (0) to fully inverted (1) (default 1). */\r\n strength?: number;\r\n /** Which channel / colour component to invert (default `'rgba'`). */\r\n channel?: InvertChannel;\r\n}\r\n\r\n/** Per-pixel random jitter. Scalar shorthand sets `strength`. */\r\nexport interface ScatterOptions extends EffectOptions {\r\n /** Maximum random pixel displacement (default 10). */\r\n strength?: number;\r\n /** Axis pixels are scattered along (default `'both'`). */\r\n axis?: EffectAxis;\r\n}\r\n\r\n/** Colour banding. Scalar shorthand sets `levels`. */\r\nexport interface PosterizeOptions extends EffectOptions {\r\n /** Number of brightness levels per channel (≥ 2, default 4). */\r\n levels?: number;\r\n}\r\n\r\n/** Velocity-driven motion blur. Scalar shorthand sets `length`. */\r\nexport interface MotionBlurOptions extends EffectOptions {\r\n /** Shutter \"openness\" as a percent; 100 ≈ 360° (default 50). */\r\n length?: number;\r\n /** Shutter phase: `'behind'` | `'centered'` | `'ahead'` | −1…1 (default `'centered'`). */\r\n alignment?: MotionBlurAlignment;\r\n /** Renderer quality hint; higher switches to multi-tap accumulation (default 16). */\r\n samples?: number;\r\n /** Blur-length multiplier (default 1). */\r\n strength?: number;\r\n /** Per-axis velocity scale (default `'both'`). */\r\n axis?: EffectAxis;\r\n}\r\n\r\n/**\r\n * A custom shader. `mode` selects the path:\r\n *\r\n * - `'foreground'` (the default) — the shader generates colour and is composited\r\n * onto the node's layer with `blendMode`.\r\n * - `'backdrop'` — the shader receives `uniform shader u_backdrop` (a snapshot of\r\n * what is painted beneath the node) and resamples it. `blendMode` is unused.\r\n */\r\nexport interface ShaderEffectOptions extends EffectOptions {\r\n /**\r\n * SkSL source, or a registered **shader pack** — a program plus the editable\r\n * values it publishes.\r\n *\r\n * A pack resolves to plain uniforms here, so nothing below this builder\r\n * knows one exists; what survives into the document is the resolved record\r\n * plus a `shaderId` naming the pack, which is what lets a host reopen its\r\n * property panel from a saved scene.\r\n */\r\n source: string | EffectShader;\r\n /**\r\n * Property overrides, by property id, when {@link source} is a pack.\r\n *\r\n * Anything not named here takes the pack's own default. Ignored — with a\r\n * warning — for a bare source string, which has no properties to override.\r\n */\r\n values?: ShaderPropertyValues;\r\n /**\r\n * Uniform values by name — lerped between animation frames (default `{}`).\r\n *\r\n * The positional `[{ name, value }]` array still works; both are bound by\r\n * name now, so the array's order no longer means anything.\r\n */\r\n uniforms?: SkSLUniformRecord | SkSLUniform[];\r\n /** How a foreground shader composites onto the layer (default `'screen'`). */\r\n blendMode?: BlendMode;\r\n}\r\n\r\n/** Coloured band around the node's silhouette. Scalar shorthand sets `width`. */\r\nexport interface OutlineOptions extends EffectOptions {\r\n /** Band thickness in pixels (default 4). */\r\n width?: number;\r\n /** Band colour (default `'black'`). */\r\n color?: Color;\r\n /** Which side of the edge the band grows from (default `'outside'`). */\r\n position?: OutlinePosition;\r\n}\r\n\r\n/**\r\n * A shadow cast from the node's silhouette. Scalar shorthand sets `blur`, since\r\n * softness is the knob a shadow is usually reached for by.\r\n */\r\nexport interface DropShadowOptions extends EffectOptions {\r\n /** Horizontal displacement in pixels (default 0). */\r\n offsetX?: number;\r\n /** Vertical displacement in pixels, positive being upward (default -8). */\r\n offsetY?: number;\r\n /** Softness in pixels, on a `blur` effect's scale (default 16). */\r\n blur?: number;\r\n /** Grows the silhouette before blurring, in pixels (default 0). */\r\n spread?: number;\r\n /** Shadow colour (default `'black'`). */\r\n color?: Color;\r\n}\r\n\r\n/** Darkened edges / lens falloff. Scalar shorthand sets `amount`. */\r\nexport interface VignetteOptions extends EffectOptions {\r\n /** 0–1 tint strength at the edge (default 0.5). */\r\n amount?: number;\r\n /** 0–1 normalised radius where the falloff starts (default 0.75). */\r\n radius?: number;\r\n /** 0–1 ramp width; 0 is a hard ring (default 0.5). */\r\n softness?: number;\r\n /** Tint colour (default `'black'`). */\r\n color?: Color;\r\n}\r\n\r\n/** Film grain. Scalar shorthand sets `amount`. */\r\n/**\r\n * A 3D colour lookup table — see {@link LutEffect} for the table's layout and\r\n * why it is compared by reference.\r\n *\r\n * No scalar shorthand: the dominant argument is a whole cube, and a builder that\r\n * took `Effects.lut(table)` would still need the size beside it to read it.\r\n */\r\nexport interface LutOptions extends EffectOptions {\r\n /** The cube, flat RGB triples, red-fastest. */\r\n table: Float32Array;\r\n /** Entries per axis. */\r\n size: number;\r\n /** 0–1 mix against the ungraded colour (default 1 — the full look). */\r\n amount?: number;\r\n}\r\n\r\nexport interface GrainOptions extends EffectOptions {\r\n /** 0–1 noise amplitude (default 0.25). */\r\n amount?: number;\r\n /** Grain cell size in pixels (default 1). */\r\n size?: number;\r\n /** Random field offset — animate it for frame-locked shimmer (default 0). */\r\n seed?: number;\r\n /** Re-seed every frame from elapsed time (default false). */\r\n animated?: boolean;\r\n /** Per-channel colour speckle instead of luminance noise (default false). */\r\n colored?: boolean;\r\n}\r\n\r\n/** Unsharp-mask sharpen. Scalar shorthand sets `amount`. */\r\nexport interface SharpenOptions extends EffectOptions {\r\n /** Edge-contrast boost (default 1). */\r\n amount?: number;\r\n /** Radius of the blurred reference, in pixels (default 1). */\r\n radius?: number;\r\n}\r\n\r\n/** Edge detection. Scalar shorthand sets `strength`. */\r\nexport interface EdgesOptions extends EffectOptions {\r\n /** Multiplier on the detected gradient (default 1). */\r\n strength?: number;\r\n /** Which operator measures the gradient (default `'sobel'`). */\r\n kernel?: EdgeKernel;\r\n /** Detect per RGB channel instead of on luminance (default false). */\r\n colored?: boolean;\r\n}\r\n\r\n/** Two-tone luminance cut. Scalar shorthand sets `level`. */\r\nexport interface ThresholdOptions extends EffectOptions {\r\n /** 0–1 cut point (default 0.5). */\r\n level?: number;\r\n /** 0–1 ramp width around the cut (default 0.05 — just enough to anti-alias). */\r\n smoothness?: number;\r\n}\r\n\r\n/** Zoom / spin blur about a point. Scalar shorthand sets `amount`. */\r\nexport interface RadialBlurOptions extends EffectOptions {\r\n /** Smear length, 0–1 (default 0.5). */\r\n amount?: number;\r\n /** Radial rush (`'zoom'`) or rotational streak (`'spin'`) (default `'zoom'`). */\r\n style?: RadialBlurStyle;\r\n /** Blur centre in 0–1 layer coords (default middle). */\r\n center?: Vector2;\r\n /** Taps averaged per pixel (default 16, max 32). */\r\n samples?: number;\r\n}\r\n\r\n/** Halftone print screen. Scalar shorthand sets `size`. */\r\nexport interface HalftoneOptions extends EffectOptions {\r\n /** Cell pitch in pixels (default 8). */\r\n size?: number;\r\n /** Screen rotation in degrees (default 45). */\r\n angle?: number;\r\n /** Mark drawn per cell (default `'dot'`). */\r\n shape?: HalftoneShape;\r\n /** Plates to screen into (default `'mono'`). */\r\n separation?: HalftoneSeparation;\r\n}\r\n\r\n/** Ordered (Bayer) dithering. Scalar shorthand sets `levels`. */\r\nexport interface DitherOptions extends EffectOptions {\r\n /** Output tones per channel, ≥ 2 (default 2). */\r\n levels?: number;\r\n /**\r\n * Threshold pattern (default `'bayer'`).\r\n *\r\n * `'bayer'` is the classic ordered matrix — a visible crosshatch, which is\r\n * the retro look and also what can beat against the pixel grid at some\r\n * `scale`s. `'blue'` is a void-and-cluster blue-noise field: same tone\r\n * reproduction, no lattice, no moiré. Reach for `'blue'` when the dither\r\n * should read as texture rather than as pattern.\r\n */\r\n noise?: DitherNoise;\r\n /** Bayer matrix size (default 4). Ignored when `noise` is `'blue'`. */\r\n matrix?: DitherMatrix;\r\n /** Pattern cell size in pixels (default 1). */\r\n scale?: number;\r\n /** Dither luminance to black and white (default false). */\r\n monochrome?: boolean;\r\n}\r\n\r\n/** Two-colour luminance ramp. Scalar shorthand sets `amount`. */\r\nexport interface DuotoneOptions extends EffectOptions {\r\n /** 0–1 blend from the original colours to the full ramp (default 1). */\r\n amount?: number;\r\n /** Colour the darkest tones map to (default `'black'`). */\r\n shadows?: Color;\r\n /** Colour the brightest tones map to (default `'white'`). */\r\n highlights?: Color;\r\n}\r\n\r\n/** Tone curve through control points. */\r\nexport interface CurvesOptions extends EffectOptions {\r\n /** Curve control points as `[input, output]` pairs in 0–1. */\r\n points: [number, number][];\r\n /** Channel(s) the curve applies to (default `'rgb'`). */\r\n channel?: CurvesChannel;\r\n}\r\n\r\n/** Photographic grading. Every field is optional and defaults to neutral. */\r\nexport type ColorAdjustmentOptions = Omit<ColorAdjustmentEffect, 'type'> & EffectOptions;\r\n\r\n/**\r\n * Per-channel RGB offset. Scalar shorthand sets `amount`, which spreads red and\r\n * blue apart horizontally by that many pixels and leaves green put — the\r\n * everyday case. Name `red`/`green`/`blue` for full control.\r\n */\r\nexport interface RgbShiftOptions extends EffectOptions {\r\n /** Shorthand: ±px horizontal spread of red vs. blue (default 4). */\r\n amount?: number;\r\n /** Red plane offset in px. Overrides `amount` for this channel. */\r\n red?: Vector2;\r\n /** Green plane offset in px. */\r\n green?: Vector2;\r\n /** Blue plane offset in px. Overrides `amount` for this channel. */\r\n blue?: Vector2;\r\n}\r\n\r\n/** CRT scanlines. Scalar shorthand sets `darkness`. */\r\nexport interface ScanlinesOptions extends EffectOptions {\r\n /** 0–1 how far the bands darken (default 0.5). */\r\n darkness?: number;\r\n /** Distance between band centres in px (default 4). */\r\n spacing?: number;\r\n /** 0–1 share of each period the dark band covers (default 0.5). */\r\n thickness?: number;\r\n /** Band offset in px — animate to roll the pattern (default 0). */\r\n offset?: number;\r\n /** Band angle in degrees; 0 = horizontal (default 0). */\r\n angle?: number;\r\n}\r\n\r\n/** Datamosh-style band tearing. Scalar shorthand sets `amount`. */\r\nexport interface BlockDisplaceOptions extends EffectOptions {\r\n /** Maximum displacement in px (default 20). */\r\n amount?: number;\r\n /** Band thickness in px (default 16). */\r\n size?: number;\r\n /** 0–1 fraction of bands that move at all (default 0.3). */\r\n density?: number;\r\n /** Random field offset — step it to jump between glitch states (default 0). */\r\n seed?: number;\r\n /** Which way bands slide (default `'x'`). */\r\n axis?: EffectAxis;\r\n}\r\n\r\n/** ASCII art from a glyph grid. Scalar shorthand sets `size`. */\r\nexport interface AsciiOptions extends EffectOptions {\r\n /** Cell size in pixels — the width of one character (default 12). */\r\n size?: number;\r\n /** A named ramp, or a custom string ordered most-ink-first (default `'standard'`). */\r\n charset?: AsciiCharset | string;\r\n /** Family the glyphs are baked in; a monospace face reads best (default `'monospace'`). */\r\n fontFamily?: string;\r\n /** Glyph colour when `colored` is false (default `'white'`). */\r\n ink?: Color;\r\n /** Colour behind the glyphs (default `'black'`; use `'transparent'` to overlay). */\r\n background?: Color;\r\n /** Tint each glyph with its own cell's colour instead of using `ink` (default false). */\r\n colored?: boolean;\r\n}\r\n\r\n/** Anamorphic glare — a bright pass smeared along one axis. Scalar shorthand sets `intensity`. */\r\nexport interface StreakOptions extends EffectOptions {\r\n /** Additive multiplier for the streak pass (default 1). */\r\n intensity?: number;\r\n /** 0–1 luminance cutoff (default 0.7). */\r\n threshold?: number;\r\n /** Smear length in pixels (default 120). */\r\n length?: number;\r\n /** Smear axis in degrees; 0 = horizontal (default 0). */\r\n angle?: number;\r\n}\r\n\r\n/**\r\n * A glow — bright (or opaque) areas spread outward and composited back, with\r\n * optional recolouring. Scalar shorthand sets `intensity`.\r\n *\r\n * Unlike `bloom`, this spreads past the node's own box, chooses how the source\r\n * composites against it, and can be coloured through a ramp.\r\n */\r\nexport interface GlowOptions extends EffectOptions {\r\n /** Additive multiplier for the glow pass (default 1). */\r\n intensity?: number;\r\n /** What decides a pixel's glow strength (default `'luminance'`). */\r\n channel?: GlowChannel;\r\n /** 0-1 luminance cutoff; read only when `channel` is `'luminance'` (default 0.5). */\r\n threshold?: number;\r\n /** Spread distance in pixels (default 25). */\r\n radius?: number;\r\n /** Dilation applied before the blur, in pixels — gives the glow a solid core (default 0). */\r\n spread?: number;\r\n /** Which way the glow spreads; `'x'`/`'y'` give anamorphic streaks (default `'both'`). */\r\n axis?: EffectAxis;\r\n /** Where the source layer sits relative to the glow (default `'behind'`). */\r\n original?: GlowOriginal;\r\n /** How the glow merges with the layer (default `'screen'`). */\r\n blend?: BlendMode;\r\n /** What the glow is coloured with (default `'none'`). */\r\n tint?: GlowTint;\r\n /** The glow's colour when `tint` is `'solid'` (default `'white'`). */\r\n color?: Color;\r\n /** Ramp colours when `tint` is `'ramp'`, parallel to `stops`. */\r\n colors?: Color[];\r\n /** Each ramp colour's position, 0-1 ascending (default evenly spaced). */\r\n stops?: number[];\r\n /** How the ramp repeats past one pass (default `'mirror'`). */\r\n loopStyle?: GlowLoopStyle;\r\n /** Ramp traversals across the glow's strength range (default 1). */\r\n cycles?: number;\r\n /** Offset along the ramp in degrees of one cycle; animate to move colour (default 0). */\r\n phase?: number;\r\n}\r\n\r\n/** Kuwahara brushwork. Scalar shorthand sets `radius`. */\r\nexport interface OilPaintOptions extends EffectOptions {\r\n /** Window radius in pixels — brush size, capped at 6 (default 3). */\r\n radius?: number;\r\n}\r\n\r\n/** Sine warp. Scalar shorthand sets `amplitude` on the Y axis — the everyday ripple. */\r\nexport interface WaveOptions extends EffectOptions {\r\n /** Peak displacement in px — a number (Y only), or per-axis via `{ x, y }` (default 20). */\r\n amplitude?: number | Vector2;\r\n /** Distance between crests in px (default 120). */\r\n wavelength?: number;\r\n /** Phase in degrees; tween over 360 for one seamless loop (default 0). */\r\n phase?: number;\r\n /** Parallel bands or concentric rings (default `'linear'`). */\r\n shape?: WaveShape;\r\n /** Direction the crests advance along, in degrees (default 0). `'linear'` only. */\r\n angle?: number;\r\n /** Ring origin in 0–1 layer coords (default middle). `'radial'` only. */\r\n center?: Vector2;\r\n}\r\n\r\n/** Twirl / swirl vortex. Scalar shorthand sets `angle`. */\r\nexport interface TwirlOptions extends EffectOptions {\r\n /** Rotation at the centre in degrees (default 180). */\r\n angle?: number;\r\n /** 0–1 radius of influence (default 1 — the whole node). */\r\n radius?: number;\r\n /** Vortex centre in 0–1 layer coords (default middle). */\r\n center?: Vector2;\r\n}\r\n\r\n/**\r\n * Blur that ramps across the node. Scalar shorthand sets `radius`.\r\n *\r\n * `mode: 'backdrop'` gives the frosted panel whose blur fades out rather than\r\n * ending at a hard edge.\r\n */\r\nexport interface ProgressiveBlurOptions extends EffectOptions {\r\n /** Blur spread in px at the far end of the ramp (default 24). */\r\n radius?: number;\r\n /** Blur spread in px at the near end of the ramp (default 0, i.e. sharp). */\r\n startRadius?: number;\r\n /** Ramp layout (default `'linear'`). */\r\n shape?: ProgressiveBlurShape;\r\n /** 0–1 where the blur starts building (default 0). */\r\n start?: number;\r\n /** 0–1 where it reaches `radius` (default 1). */\r\n end?: number;\r\n /** Ramp direction in degrees; 0 = left-to-right (default 90, i.e. downward). */\r\n angle?: number;\r\n /** Ramp origin in 0–1 layer coords (default middle). `'radial'` only. */\r\n center?: Vector2;\r\n /** Taps averaged at full radius, 2–32 (default 20). */\r\n samples?: number;\r\n}\r\n\r\n/** Mirrored wedges around a point. Scalar shorthand sets `segments`. */\r\nexport interface KaleidoscopeOptions extends EffectOptions {\r\n /** Number of mirrored wedges; below 2 is a no-op (default 6). */\r\n segments?: number;\r\n /** Rotation of the pattern in degrees — animate to sweep the source (default 0). */\r\n angle?: number;\r\n /** Fold origin in 0–1 layer coords (default middle). */\r\n center?: Vector2;\r\n /** Radial offset of the sampled wedge (default 0). */\r\n offset?: number;\r\n /** 0–1 blend from the original to the folded pattern — the handle to ramp it on (default 1). */\r\n amount?: number;\r\n}\r\n\r\n/**\r\n * Figma's Glass over the backdrop. Scalar shorthand sets `refraction`.\r\n *\r\n * Figma's fields, units and defaults (light `-45°` at 80, refraction 80, depth\r\n * 20 px, dispersion 50, frost 4, splay 0), so a bare `Effects.glass()` is the\r\n * glass Figma adds and values copied from a Figma file render the same.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; there is nothing to refract in a node's\r\n * own paint, so the foreground is a no-op.\r\n */\r\nexport interface GlassOptions extends EffectOptions {\r\n /** Where the light comes from, in degrees clockwise from the top (default -45, top left). */\r\n lightAngle?: number;\r\n /** 0–100 brightness of the light (default 80). */\r\n lightIntensity?: number;\r\n /** 0–100 how strongly the curved edge bends the backdrop (default 80). */\r\n refraction?: number;\r\n /** How far the curved edge reaches in from the outline, px (default 20). */\r\n depth?: number;\r\n /** 0–100 spectral split along the curved edge (default 50). */\r\n dispersion?: number;\r\n /** Backdrop blur radius, px (default 4). */\r\n frost?: number;\r\n /** 0–100 how far the projected light spreads in from the rim (default 0). */\r\n splay?: number;\r\n}\r\n\r\n/** Colour-depth reduction. Scalar shorthand sets `bits`. */\r\nexport interface BitCrushOptions extends EffectOptions {\r\n /** Bits per channel when `palette` is `'none'`, 1–8 (default 3). */\r\n bits?: number;\r\n /** Fixed hardware palette to snap to (default `'none'`). */\r\n palette?: BitCrushPalette;\r\n /** 0–1 blend between original and crushed (default 1). */\r\n amount?: number;\r\n}\r\n\r\nconst CENTER: Vector2 = { x: 0.5, y: 0.5 };\r\n\r\n/**\r\n * The ramp a glow starts with: white at the core falling to a warm amber.\r\n *\r\n * Copied rather than handed out, because unlike {@link CENTER} these are arrays\r\n * — sharing one would let editing a single glow's ramp reach into every other\r\n * glow ever built from the defaults.\r\n */\r\nconst GLOW_RAMP_COLORS: readonly Color[] = [\"white\", \"#ffa640\"];\r\nconst GLOW_RAMP_STOPS: readonly number[] = [0, 1];\r\nconst ZERO: Vector2 = { x: 0, y: 0 };\r\n\r\n/** Normalise {@link PixelateOptions.blocks} to a per-axis count. */\r\nconst toBlocks = (blocks: number | Vector2): Vector2 =>\r\n typeof blocks === \"number\" ? { x: blocks, y: blocks } : blocks;\r\n\r\n/**\r\n * Normalise {@link WaveOptions.amplitude}. A bare number means the Y axis only —\r\n * a wave that displaces along its own direction of travel just smears, so the\r\n * transverse case is the one worth spelling `20` for.\r\n */\r\nconst toAmplitude = (value: number | Vector2): Vector2 =>\r\n typeof value === \"number\" ? { x: 0, y: value } : value;\r\n\r\n/**\r\n * Immutable, chainable list of node effects.\r\n *\r\n * Each builder method returns a new `EffectChain` with the effect appended,\r\n * so chains are safe to share and branch.\r\n *\r\n * @example\r\n * const fx = Effects.blur(4).grayscale(0.5);\r\n * node.effects = fx; // assign directly\r\n * node.effects = [...fx, { type: 'pixelate', ... }]; // spread into array\r\n */\r\nexport class EffectChain {\r\n constructor(public list: NodeEffect[] = []) { }\r\n\r\n private append(effect: NodeEffect): EffectChain {\r\n return new EffectChain([...this.list, effect]);\r\n }\r\n\r\n /**\r\n * Append a Gaussian blur. Pass `{ mode: \"backdrop\" }` to blur the content\r\n * beneath the node (clipped to its silhouette, Figma-style) instead of the\r\n * node's own content.\r\n */\r\n blur(options: number | BlurOptions) {\r\n const o = scalarOptions(options, \"radius\");\r\n return this.append(withEffectOptions({ type: \"blur\" as const, radius: o.radius ?? 0 }, o));\r\n }\r\n\r\n /**\r\n * Append a motion-blur-style directional (linear) blur, smearing the node's\r\n * own content along a single axis (or the backdrop, with `{ mode: \"backdrop\" }`).\r\n */\r\n directionalBlur(options: number | DirectionalBlurOptions) {\r\n const o = scalarOptions(options, \"radius\");\r\n return this.append(withEffectOptions(\r\n { type: \"directionalBlur\" as const, radius: o.radius ?? 0, angle: o.angle ?? 0 },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append an After Effects-style Mosaic / pixelate. `blocks` is the *number of\r\n * blocks* across the node (a count equal to the node's pixel size on that\r\n * axis is pristine; lower is coarser), not a pixel block size.\r\n */\r\n pixelate(options: number | PixelateOptions) {\r\n const o = scalarOptions(options, \"blocks\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"pixelate\" as const,\r\n blocks: toBlocks(o.blocks ?? 1),\r\n sharpColors: o.sharpColors ?? true,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /** Append a grayscale effect. `{ mode: \"backdrop\" }` desaturates the backdrop. */\r\n grayscale(options: number | GrayscaleOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions({ type: \"grayscale\" as const, amount: o.amount ?? 0 }, o));\r\n }\r\n\r\n /**\r\n * Append a bulge/pinch lens. A barrel distortion magnifies the centre and\r\n * pins the edges; a negative strength pinches the centre inward instead.\r\n * `mode: \"backdrop\"` points the same lens at what is painted beneath the\r\n * node, giving a glass dome over the layers below rather than a warp of the\r\n * node's own paint.\r\n */\r\n bulge(options: number | BulgeOptions) {\r\n const o = scalarOptions(options, \"strength\");\r\n return this.append(withEffectOptions(\r\n { type: \"bulge\" as const, strength: o.strength ?? 0, center: o.center ?? CENTER },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a magnify lens that magnifies the backdrop beneath the node. The lens\r\n * fills the node's bounding box and is clipped to its silhouette, so whatever\r\n * is painted underneath shows through scaled about `center` — like a\r\n * magnifying glass shaped to the node.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\r\n */\r\n magnify(options?: number | MagnifyOptions) {\r\n const o = scalarOptions(options, \"scale\");\r\n return this.append(withEffectOptions(\r\n { type: \"magnify\" as const, scale: o.scale ?? 2, center: o.center ?? CENTER },\r\n { ...o, mode: o.mode ?? \"backdrop\" },\r\n ));\r\n }\r\n\r\n /**\r\n * Append a bloom (glow) effect. Bright areas bleed soft light outward via a\r\n * screen-blend of the blurred bright-pass onto the layer.\r\n */\r\n bloom(options?: number | BloomOptions) {\r\n const o = scalarOptions(options, \"intensity\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"bloom\" as const,\r\n threshold: o.threshold ?? 0.7,\r\n radius: o.radius ?? 12,\r\n intensity: o.intensity ?? 1,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /** Append a vintage / film-look colour grading effect. */\r\n vintage(options?: number | VintageOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n { type: \"vintage\" as const, amount: o.amount ?? 1, warmth: o.warmth ?? 0.2 },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a chromatic aberration effect — red/blue colour fringing that mimics\r\n * lens dispersion.\r\n */\r\n chromaticAberration(options?: number | ChromaticAberrationOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n { type: \"chromaticAberration\" as const, amount: o.amount ?? 4, angle: o.angle ?? 0 },\r\n o,\r\n ));\r\n }\r\n\r\n /** Append a colour-invert effect. */\r\n invert(options?: number | InvertOptions) {\r\n const o = scalarOptions(options, \"strength\");\r\n return this.append(withEffectOptions(\r\n { type: \"invert\" as const, channel: o.channel ?? \"rgba\", strength: o.strength ?? 1 },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a scatter effect — randomly jitters the node's own pixels, smearing\r\n * its content like After Effects' Scatter.\r\n */\r\n scatter(options?: number | ScatterOptions) {\r\n const o = scalarOptions(options, \"strength\");\r\n return this.append(withEffectOptions(\r\n { type: \"scatter\" as const, strength: o.strength ?? 10, axis: o.axis ?? \"both\" },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append an After Effects-style posterize effect — quantizes each colour\r\n * channel into `levels` evenly-spaced bands, flattening gradients into steps.\r\n */\r\n posterize(options?: number | PosterizeOptions) {\r\n const o = scalarOptions(options, \"levels\");\r\n return this.append(withEffectOptions({ type: \"posterize\" as const, levels: o.levels ?? 4 }, o));\r\n }\r\n\r\n /**\r\n * Append velocity-driven motion blur — smears the node's own content along its\r\n * actual per-frame motion (a static node stays sharp). Modelled on After\r\n * Effects' shutter angle (`length`) and shutter phase (`alignment`).\r\n */\r\n motionBlur(options?: number | MotionBlurOptions) {\r\n const o = scalarOptions(options, \"length\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"motionBlur\" as const,\r\n length: o.length ?? 50,\r\n alignment: o.alignment ?? \"centered\",\r\n samples: o.samples ?? 16,\r\n strength: o.strength ?? 1,\r\n axis: o.axis ?? \"both\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append an outline — a coloured band traced around the node's silhouette,\r\n * including alpha silhouettes (text, an image's cutout, a whole subtree) that\r\n * a geometry `stroke` can't follow.\r\n */\r\n outline(options?: number | OutlineOptions) {\r\n const o = scalarOptions(options, \"width\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"outline\" as const,\r\n width: o.width ?? 4,\r\n color: o.color ?? \"black\",\r\n position: o.position ?? \"outside\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a drop shadow cast from the node's **silhouette** — including alpha\r\n * silhouettes (text, an image's cutout, a whole subtree) that a geometry\r\n * `shadow` can't follow, since that one fills the node's path.\r\n */\r\n dropShadow(options?: number | DropShadowOptions) {\r\n const o = scalarOptions(options, \"blur\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"dropShadow\" as const,\r\n offsetX: o.offsetX ?? 0,\r\n offsetY: o.offsetY ?? -8,\r\n blur: o.blur ?? 16,\r\n spread: o.spread ?? 0,\r\n color: o.color ?? \"black\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a vignette — a soft tint ramping in toward the node's corners. The\r\n * falloff follows the node's aspect ratio, so a wide node darkens along its\r\n * short edges the way a lens would.\r\n */\r\n vignette(options?: number | VignetteOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"vignette\" as const,\r\n amount: o.amount ?? 0.5,\r\n radius: o.radius ?? 0.75,\r\n softness: o.softness ?? 0.5,\r\n color: o.color ?? \"black\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append film grain. Static grain reads as texture rather than film, so pass\r\n * `{ animated: true }` to re-seed it each frame — or tween `seed` when the\r\n * render has to stay deterministic.\r\n */\r\n /**\r\n * Apply a 3D colour lookup table.\r\n *\r\n * The whole point of a LUT is that it is *someone else's* colour science, so\r\n * there is nothing to default beyond how much of it to use: `amount` is the\r\n * mix and everything else is the file.\r\n *\r\n * @example\r\n * Effects.lut({ table, size: 33 }) // the full look\r\n * Effects.lut({ table, size: 33, amount: 0.6 })\r\n */\r\n lut(options: LutOptions) {\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"lut\" as const,\r\n table: options.table,\r\n size: options.size,\r\n amount: options.amount ?? 1,\r\n },\r\n options,\r\n ));\r\n }\r\n\r\n grain(options?: number | GrainOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"grain\" as const,\r\n amount: o.amount ?? 0.25,\r\n size: o.size ?? 1,\r\n seed: o.seed ?? 0,\r\n animated: o.animated ?? false,\r\n colored: o.colored ?? false,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /** Append an unsharp-mask sharpen — local contrast boosted at `radius` scale. */\r\n sharpen(options?: number | SharpenOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n { type: \"sharpen\" as const, amount: o.amount ?? 1, radius: o.radius ?? 1 },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append edge detection — flat areas go black and boundaries light up with\r\n * the magnitude of the local gradient.\r\n */\r\n edges(options?: number | EdgesOptions) {\r\n const o = scalarOptions(options, \"strength\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"edges\" as const,\r\n strength: o.strength ?? 1,\r\n kernel: o.kernel ?? \"sobel\",\r\n colored: o.colored ?? false,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a luminance threshold — a two-tone stencil cut at `level`, with\r\n * `smoothness` widening the cut into a ramp.\r\n */\r\n threshold(options?: number | ThresholdOptions) {\r\n const o = scalarOptions(options, \"level\");\r\n return this.append(withEffectOptions(\r\n { type: \"threshold\" as const, level: o.level ?? 0.5, smoothness: o.smoothness ?? 0.05 },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a radial blur — samples smeared along the radius (`'zoom'`, the\r\n * default) or the tangent (`'spin'`) about `center`, leaving the centre sharp.\r\n */\r\n radialBlur(options?: number | RadialBlurOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"radialBlur\" as const,\r\n amount: o.amount ?? 0.5,\r\n style: o.style ?? \"zoom\",\r\n center: o.center ?? CENTER,\r\n samples: o.samples ?? 16,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a halftone screen — the newsprint look, where tone becomes the size\r\n * of a mark on a rotated grid.\r\n */\r\n halftone(options?: number | HalftoneOptions) {\r\n const o = scalarOptions(options, \"size\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"halftone\" as const,\r\n size: o.size ?? 8,\r\n angle: o.angle ?? 45,\r\n shape: o.shape ?? \"dot\",\r\n separation: o.separation ?? \"mono\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append ordered (Bayer) dithering — quantization to `levels` tones per\r\n * channel with the error traded for a retro crosshatch pattern.\r\n */\r\n dither(options?: number | DitherOptions) {\r\n const o = scalarOptions(options, \"levels\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"dither\" as const,\r\n levels: o.levels ?? 2,\r\n matrix: o.matrix ?? 4,\r\n scale: o.scale ?? 1,\r\n monochrome: o.monochrome ?? false,\r\n noise: o.noise ?? \"bayer\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a duotone / gradient map — the content's luminance remapped onto a\r\n * `shadows` → `highlights` ramp, discarding its original chroma.\r\n */\r\n duotone(options?: number | DuotoneOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"duotone\" as const,\r\n amount: o.amount ?? 1,\r\n shadows: o.shadows ?? \"black\",\r\n highlights: o.highlights ?? \"white\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a tone curve — the same adjustment `Adjustments.curves` applies to a\r\n * photo, on any node.\r\n */\r\n curves(options: CurvesOptions) {\r\n return this.append(withEffectOptions(\r\n { type: \"curves\" as const, points: options.points, channel: options.channel ?? \"rgb\" },\r\n options,\r\n ));\r\n }\r\n\r\n /**\r\n * Append photographic grading (brightness / contrast / saturation / vibrance /\r\n * shadows / highlights / temperature / tint) — `Adjustments.colorAdjustment`\r\n * on any node. For darkened edges use {@link EffectChain.vignette}.\r\n */\r\n colorAdjustment(options: ColorAdjustmentOptions) {\r\n // Destructure `mode` out rather than spreading it through: a caller who\r\n // writes `{ mode: undefined }` would otherwise plant the key on the\r\n // effect, and `equals()` compares `mode` directly. `withEffectOptions`\r\n // skips undefined, so handing it back there is safe.\r\n const { mode, ...fields } = options;\r\n return this.append(withEffectOptions({ type: \"colorAdjustment\" as const, ...fields }, { mode }));\r\n }\r\n\r\n /**\r\n * Append a per-channel RGB offset — the digital cousin of\r\n * {@link EffectChain.chromaticAberration}, where each plane goes where you\r\n * point it instead of following a lens model.\r\n */\r\n rgbShift(options?: number | RgbShiftOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n const spread = o.amount ?? 4;\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"rgbShift\" as const,\r\n red: o.red ?? { x: spread, y: 0 },\r\n green: o.green ?? ZERO,\r\n blue: o.blue ?? { x: -spread, y: 0 },\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append CRT scanlines. Animate `offset` past `spacing` to roll the bands;\r\n * the pattern wraps, so a linear tween loops seamlessly.\r\n */\r\n scanlines(options?: number | ScanlinesOptions) {\r\n const o = scalarOptions(options, \"darkness\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"scanlines\" as const,\r\n spacing: o.spacing ?? 4,\r\n thickness: o.thickness ?? 0.5,\r\n darkness: o.darkness ?? 0.5,\r\n offset: o.offset ?? 0,\r\n angle: o.angle ?? 0,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append datamosh-style band tearing. Step `seed` in whole numbers to jump\r\n * between distinct glitch states rather than sliding between them.\r\n */\r\n blockDisplace(options?: number | BlockDisplaceOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"blockDisplace\" as const,\r\n amount: o.amount ?? 20,\r\n size: o.size ?? 16,\r\n density: o.density ?? 0.3,\r\n seed: o.seed ?? 0,\r\n axis: o.axis ?? \"x\",\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append colour-depth reduction — `bits` per channel, or a fixed hardware\r\n * palette. Pair with {@link EffectChain.dither} so gradients survive the cut.\r\n */\r\n bitCrush(options?: number | BitCrushOptions) {\r\n const o = scalarOptions(options, \"bits\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"bitCrush\" as const,\r\n bits: o.bits ?? 3,\r\n palette: o.palette ?? \"none\",\r\n amount: o.amount ?? 1,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append ASCII art — the content divided into a grid of cells, each cell's\r\n * tone replaced by the glyph that carries a matching amount of ink.\r\n *\r\n * Set `background: 'transparent'` to lay the glyphs over whatever is behind\r\n * the node instead of over a solid field.\r\n */\r\n ascii(options?: number | AsciiOptions) {\r\n const o = scalarOptions(options, \"size\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"ascii\" as const,\r\n size: o.size ?? 12,\r\n charset: o.charset ?? \"standard\",\r\n fontFamily: o.fontFamily ?? \"monospace\",\r\n ink: o.ink ?? \"white\",\r\n background: o.background ?? \"black\",\r\n colored: o.colored ?? false,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append Kuwahara brushwork — averages within a region but never across an\r\n * edge, so flat areas smooth into strokes while boundaries stay crisp.\r\n * By some margin the most expensive effect in the set; keep `radius` small.\r\n */\r\n oilPaint(options?: number | OilPaintOptions) {\r\n const o = scalarOptions(options, \"radius\");\r\n return this.append(withEffectOptions({ type: \"oilPaint\" as const, radius: o.radius ?? 3 }, o));\r\n }\r\n\r\n /**\r\n * Append an anamorphic streak — a bright pass smeared along one axis and\r\n * screened back on. {@link EffectChain.bloom} spreads light in every\r\n * direction; this spreads it in one.\r\n */\r\n streak(options?: number | StreakOptions) {\r\n const o = scalarOptions(options, \"intensity\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"streak\" as const,\r\n intensity: o.intensity ?? 1,\r\n threshold: o.threshold ?? 0.7,\r\n length: o.length ?? 120,\r\n angle: o.angle ?? 0,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a glow — the bright (or opaque) parts of the layer spread outward\r\n * and composited back, optionally recoloured through a ramp.\r\n *\r\n * `bloom` is the cheaper relative: it screens a blurred bright-pass back\r\n * within the node's own box. This one spreads past that box, lets the source\r\n * sit behind, in front of, or nowhere at all, and can map glow strength onto\r\n * `colors`/`stops` — which is what a heat, neon or aurora look needs.\r\n */\r\n glow(options?: number | GlowOptions) {\r\n const o = scalarOptions(options, \"intensity\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"glow\" as const,\r\n channel: o.channel ?? \"luminance\",\r\n threshold: o.threshold ?? 0.5,\r\n radius: o.radius ?? 25,\r\n spread: o.spread ?? 0,\r\n intensity: o.intensity ?? 1,\r\n axis: o.axis ?? \"both\",\r\n original: o.original ?? \"behind\",\r\n blend: o.blend ?? \"screen\",\r\n tint: o.tint ?? \"none\",\r\n color: o.color ?? \"white\",\r\n colors: o.colors ?? [...GLOW_RAMP_COLORS],\r\n stops: o.stops ?? [...GLOW_RAMP_STOPS],\r\n loopStyle: o.loopStyle ?? \"mirror\",\r\n cycles: o.cycles ?? 1,\r\n phase: o.phase ?? 0,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a custom SkSL shader. `mode` picks the layer it runs on — a\r\n * foreground overlay blended with `blendMode`, or a backdrop shader that\r\n * resamples `uniform shader u_backdrop`.\r\n */\r\n shader(options: ShaderEffectOptions) {\r\n const pack = typeof options.source === \"string\" ? undefined : options.source;\r\n if (pack && pack.scope !== \"effect\") {\r\n throw new Error(\r\n `Effects.shader was given a \"${(pack as { scope: string }).scope}\" shader ` +\r\n `(\"${pack.name}\"). A fill shader has no backdrop to sample and is bound to a ` +\r\n `shape's box; use Fills.shader.`,\r\n );\r\n }\r\n // A pack that declares `u_backdrop` has to run on the backdrop path, so\r\n // it supplies the default — a caller may still say otherwise.\r\n const mode = options.mode ?? (pack?.backdrop ? \"backdrop\" : \"foreground\");\r\n const source = pack ? pack.source : (options.source as string);\r\n const uniforms = pack\r\n ? { ...resolveShaderProperties(pack, options.values), ...normalizeUniforms(options.uniforms ?? {}) }\r\n : (options.uniforms ?? {});\r\n const base = {\r\n type: \"shader\" as const,\r\n source,\r\n uniforms,\r\n ...(pack?.id !== undefined ? { shaderId: pack.id } : {}),\r\n };\r\n // blendMode only applies to the foreground overlay; leaving it undefined\r\n // for a backdrop shader keeps `equals()` comparing like with like.\r\n const effect: NodeEffect = mode === \"foreground\"\r\n ? { ...base, blendMode: options.blendMode ?? \"screen\" }\r\n : base;\r\n return this.append(withEffectOptions(effect, { mode }));\r\n }\r\n\r\n /**\r\n * @deprecated Use {@link EffectChain.shader}. `sksl` named the dialect; the\r\n * effect is named for the paint it is the sibling of. Takes the source in\r\n * `shader` rather than `source`, as it always did.\r\n */\r\n sksl(options: Omit<ShaderEffectOptions, \"source\"> & { shader: string }) {\r\n const { shader, ...rest } = options;\r\n return this.shader({ ...rest, source: shader });\r\n }\r\n\r\n /**\r\n * Append a sine warp. Tween `phase` over 360 to make the wave travel — it\r\n * wraps, so a linear tween loops seamlessly.\r\n */\r\n wave(options?: number | WaveOptions) {\r\n const o = scalarOptions(options, \"amplitude\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"wave\" as const,\r\n amplitude: toAmplitude(o.amplitude ?? 20),\r\n wavelength: o.wavelength ?? 120,\r\n phase: o.phase ?? 0,\r\n shape: o.shape ?? \"linear\",\r\n angle: o.angle ?? 0,\r\n center: o.center ?? CENTER,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a twirl / swirl vortex — a rotation about `center` that falls off\r\n * with distance, so the middle spins while the rim stays pinned.\r\n */\r\n twirl(options?: number | TwirlOptions) {\r\n const o = scalarOptions(options, \"angle\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"twirl\" as const,\r\n angle: o.angle ?? 180,\r\n radius: o.radius ?? 1,\r\n center: o.center ?? CENTER,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a blur whose radius ramps across the node rather than being\r\n * uniform. With `{ mode: 'backdrop' }` this is the frosted panel whose blur\r\n * fades out instead of ending at a hard edge.\r\n */\r\n progressiveBlur(options?: number | ProgressiveBlurOptions) {\r\n const o = scalarOptions(options, \"radius\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"progressiveBlur\" as const,\r\n radius: o.radius ?? 24,\r\n // Sharp at the near end unless asked otherwise — what this\r\n // effect did before the field existed.\r\n startRadius: o.startRadius ?? 0,\r\n shape: o.shape ?? \"linear\",\r\n start: o.start ?? 0,\r\n end: o.end ?? 1,\r\n angle: o.angle ?? 90,\r\n center: o.center ?? CENTER,\r\n samples: o.samples ?? 20,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append a kaleidoscope fold. Animating `angle` sweeps fresh source material\r\n * through the sampled wedge while the pattern itself stays locked — which is\r\n * not what rotating the node does.\r\n */\r\n kaleidoscope(options?: number | KaleidoscopeOptions) {\r\n const o = scalarOptions(options, \"segments\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"kaleidoscope\" as const,\r\n segments: Math.round(o.segments ?? 6),\r\n angle: o.angle ?? 0,\r\n center: o.center ?? CENTER,\r\n offset: o.offset ?? 0,\r\n amount: o.amount ?? 1,\r\n },\r\n o,\r\n ));\r\n }\r\n\r\n /**\r\n * Append Figma's Glass — the backdrop refracted, dispersed and frosted\r\n * through a curved edge on the node's outline, with a rim of light.\r\n *\r\n * Like `magnify`, this reads what is painted *beneath* the node and is\r\n * clipped to its outline, so the shape's own edges stay sharp. It needs no\r\n * map: the curve is derived from the outline itself, so it follows a\r\n * rounded rect, an ellipse, a hand-drawn path or text equally.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\r\n */\r\n glass(options?: number | GlassOptions) {\r\n const o = scalarOptions(options, \"refraction\");\r\n return this.append(withEffectOptions(\r\n {\r\n type: \"glass\" as const,\r\n lightAngle: o.lightAngle ?? -45,\r\n lightIntensity: o.lightIntensity ?? 80,\r\n refraction: o.refraction ?? 80,\r\n depth: o.depth ?? 20,\r\n dispersion: o.dispersion ?? 50,\r\n frost: o.frost ?? 4,\r\n splay: o.splay ?? 0,\r\n },\r\n { ...o, mode: o.mode ?? \"backdrop\" },\r\n ));\r\n }\r\n\r\n /** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */\r\n *[Symbol.iterator]() {\r\n yield* this.list;\r\n }\r\n\r\n /** Serializes to the raw effect 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 * Accepted shapes for a node's `effects` prop.\r\n *\r\n * Mirrors {@link Fill}: a single {@link NodeEffect}, an `EffectChain` builder\r\n * result, or an array mixing effects and chains (each chain contributes all its\r\n * effects in place). Already-resolved effects are themselves `NodeEffect`s, so\r\n * a node's read-back `effects` can be assigned straight back.\r\n *\r\n * Effects.blur(8) // chain\r\n * { type: 'blur', radius: 8 } // single effect\r\n * [Effects.blur(8), { type: 'invert' }] // mixed array\r\n * [...Effects.blur(8), grayscaleEffect]\r\n */\r\nexport type Effect =\r\n | NodeEffect\r\n | EffectChain\r\n | (NodeEffect | EffectChain)[];\r\n\r\n/**\r\n * Entry point for building effect chains fluently.\r\n *\r\n * An empty {@link EffectChain}, so `Effects.blur(8)` *is* `new EffectChain().blur(8)`\r\n * — every builder's signature and documentation has exactly one definition, on\r\n * the class, which is also what an editor shows when you hover `Effects.blur`.\r\n * (A parallel object of arrow functions would need its own copy of all 41 docs,\r\n * and hovering it showed none of them.)\r\n *\r\n * The chain is immutable — every builder returns a *new* chain — so sharing one\r\n * empty instance as the entry point is safe.\r\n *\r\n * @example\r\n * node.effects = Effects.blur(8).grayscale(1);\r\n */\r\nexport const Effects = new EffectChain();\r\n\r\n/**\r\n * Normalises any {@link Effect} value to a plain `NodeEffect[]`.\r\n * Used internally when reading props before rendering or interpolation.\r\n *\r\n * Chains used as array elements are flattened so each contributes its effects\r\n * in place: `[Effects.blur(8), grayscaleEffect]` — as is the plain array a chain\r\n * serializes to, which is how that value reads back out of a stored document.\r\n */\r\nexport function resolveChainEffects(effects: Effect | undefined): NodeEffect[] {\r\n if (effects === undefined) return [];\r\n if (effects instanceof EffectChain) return resolveAll(effects.list);\r\n if (Array.isArray(effects)) {\r\n const out: NodeEffect[] = [];\r\n for (const item of effects) {\r\n if (item instanceof EffectChain) out.push(...resolveAll(item.list));\r\n else if (Array.isArray(item)) out.push(...resolveChainEffects(item as Effect));\r\n else out.push(resolveEffect(item));\r\n }\r\n return out;\r\n }\r\n return [resolveEffect(effects)];\r\n}\r\n\r\n/**\r\n * Resolve every effect in `list`, returning **the same array** when none of them\r\n * needed it — which is the overwhelming majority, since one effect type\r\n * registers a `resolve` at all.\r\n *\r\n * The identity is load-bearing, not a micro-optimisation: this runs on every\r\n * write of an `effects` prop, and `lerpEffectArray` short-circuits on\r\n * `from === to`. Copying unconditionally would defeat that for every node in\r\n * every scene to migrate one effect type.\r\n */\r\nfunction resolveAll(list: NodeEffect[]): NodeEffect[] {\r\n let out: NodeEffect[] | undefined;\r\n for (let i = 0; i < list.length; i++) {\r\n const resolved = resolveEffect(list[i]);\r\n if (!out && resolved !== list[i]) out = list.slice(0, i);\r\n out?.push(resolved);\r\n }\r\n return out ?? list;\r\n}\r\n\r\n/** The effect-chain attribute's op set — the `effects` prop's resolve/lerp pair. */\r\nexport const effectsOps: AttributeOps<Effect, NodeEffect[]> = {\r\n resolve: (effects) => resolveChainEffects(effects),\r\n lerp: (from, to, t) => {\r\n if (from === to) return from;\r\n const maxLen = Math.max(from.length, to.length);\r\n const result: NodeEffect[] = [];\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(lerpEffect(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};\r\n"]}
|