@motionscript/core 0.1.0 → 0.1.1-alpha.0
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 +10 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.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 +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- 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 +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- 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 +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- 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 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
2
|
import { type EffectFields } from "../spec.js";
|
|
3
|
-
/**
|
|
4
|
-
* Darkened corners — the lens falloff every photo grade reaches for.
|
|
5
|
-
*
|
|
6
|
-
* The node box is normalised to a unit ellipse, so the falloff follows the
|
|
7
|
-
* node's aspect ratio rather than an off-centre circle. Everything inside
|
|
8
|
-
* `radius` is untouched; from there to `radius + softness` the tint ramps in
|
|
9
|
-
* with a smoothstep, reaching `amount` at the corners.
|
|
10
|
-
*/
|
|
3
|
+
/** Darkened corners (lens falloff). The node box is normalised to a unit ellipse, so the falloff follows its aspect ratio. Untouched inside `radius`; from there to `radius + softness` the tint ramps in with a smoothstep, reaching `amount` at the corners. */
|
|
11
4
|
export interface VignetteEffect extends ModedEffect, EffectFields<typeof vignetteSpec.params> {
|
|
12
5
|
type: "vignette";
|
|
13
6
|
}
|
|
14
|
-
/** The {@link VignetteEffect} spec: its parameters, defaults and ranges. */
|
|
15
7
|
export declare const vignetteSpec: import("../spec.js").EffectSpec<"vignette", {
|
|
16
8
|
/** 0–1 tint strength at the very edge. 0 = off. */
|
|
17
9
|
readonly amount: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E,kQAAkQ;AAClQ,MAAM,WAAW,cAAe,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC;IACzF,IAAI,EAAE,UAAU,CAAC;CACpB;AAED,eAAO,MAAM,YAAY;IAQjB,mDAAmD;;;;;;;;;;IAEnD,4EAA4E;;;;;;;;;IAE5E,kEAAkE;;;;;;;;;IAElE,iFAAiF;;;;;;;EAGvF,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,cAAc,CAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vignette.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"vignette.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAO/E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,OAAO;IACd,0EAA0E;IAC1E,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,mDAAmD;QACnD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACvF,4EAA4E;QAC5E,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC1E,kEAAkE;QAClE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC3E,iFAAiF;QACjF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;KAC1D;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAA+B,YAAY,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\n/** Darkened corners (lens falloff). The node box is normalised to a unit ellipse, so the falloff follows its aspect ratio. Untouched inside `radius`; from there to `radius + softness` the tint ramps in with a smoothstep, reaching `amount` at the corners. */\nexport interface VignetteEffect extends ModedEffect, EffectFields<typeof vignetteSpec.params> {\n type: \"vignette\";\n}\n\nexport const vignetteSpec = defineEffect({\n type: \"vignette\",\n group: \"light\",\n // Needs each pixel's position within the node box to compute its falloff.\n surface: \"shader\",\n scalar: \"amount\",\n neutral: { amount: 0 },\n params: {\n /** 0–1 tint strength at the very edge. 0 = off. */\n amount: param.number({ default: 0.5, min: 0, max: 1, control: \"slider\", inline: true }),\n /** 0–1 normalised radius where the falloff starts (1 ≈ the box corners). */\n radius: param.number({ default: 0.75, min: 0, max: 1, control: \"slider\" }),\n /** 0–1 width of the ramp; 0 is a hard ring, 1 a long gradient. */\n softness: param.number({ default: 0.5, min: 0, max: 1, control: \"slider\" }),\n /** Tint colour — black darkens (the classic look), white blows the edges out. */\n color: param.color({ default: \"black\", label: \"tint\" }),\n },\n});\n\nexport const vignetteEffect: EffectData<VignetteEffect> = effectDataOf(vignetteSpec);\n"]}
|
|
@@ -3,7 +3,6 @@ import { type EffectFields } from "../spec.js";
|
|
|
3
3
|
export interface VintageEffect extends ModedEffect, EffectFields<typeof vintageSpec.params> {
|
|
4
4
|
type: "vintage";
|
|
5
5
|
}
|
|
6
|
-
/** The {@link VintageEffect} spec: its parameters, defaults and ranges. */
|
|
7
6
|
export declare const vintageSpec: import("../spec.js").EffectSpec<"vintage", {
|
|
8
7
|
/** 0–1: 0 = original, 1 = full sepia + desaturate. */
|
|
9
8
|
readonly amount: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vintage.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,
|
|
1
|
+
{"version":3,"file":"vintage.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,WAAW;IAMhB,sDAAsD;;;;;;;;;;IAEtD,8DAA8D;;;;;;;;;EAGpE,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vintage.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,
|
|
1
|
+
{"version":3,"file":"vintage.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;IACjC,MAAM,EAAE;QACJ,sDAAsD;QACtD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACrF,8DAA8D;QAC9D,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;KAC7E;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAA8B,YAAY,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\nexport interface VintageEffect extends ModedEffect, EffectFields<typeof vintageSpec.params> {\n type: \"vintage\";\n}\n\nexport const vintageSpec = defineEffect({\n type: \"vintage\",\n group: \"color\",\n scalar: \"amount\",\n neutral: { amount: 0, warmth: 0 },\n params: {\n /** 0–1: 0 = original, 1 = full sepia + desaturate. */\n amount: param.number({ default: 1, min: 0, max: 1, control: \"slider\", inline: true }),\n /** −1…1: negative = cool/cyan tint, positive = warm/amber. */\n warmth: param.number({ default: 0.2, min: -1, max: 1, control: \"slider\" }),\n },\n});\n\nexport const vintageEffect: EffectData<VintageEffect> = effectDataOf(vintageSpec);\n"]}
|
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
2
|
import { type EffectFields } from "../spec.js";
|
|
3
|
-
/**
|
|
4
|
-
* How the wave's crests are laid out.
|
|
5
|
-
*
|
|
6
|
-
* - `"linear"` — parallel crests running across the node, travelling along
|
|
7
|
-
* `angle`. Flags, banners, wobbling type, heat shimmer.
|
|
8
|
-
* - `"radial"` — concentric rings expanding from `center`. The pond-ripple /
|
|
9
|
-
* drop-impact look, and the one that reads as *something happened here*.
|
|
10
|
-
*/
|
|
3
|
+
/** How the wave's crests are laid out: `"linear"` (parallel crests travelling along `angle`: flags, heat shimmer) or `"radial"` (concentric rings from `center`: pond ripples, drop impacts). */
|
|
11
4
|
export type WaveShape = "linear" | "radial";
|
|
12
|
-
/**
|
|
13
|
-
* Sine displacement — the procedural warp that needs no asset.
|
|
14
|
-
*
|
|
15
|
-
* Pixels are resampled at a position offset by a sine of their own coordinate,
|
|
16
|
-
* so the content ripples without anything being generated or loaded. For an
|
|
17
|
-
* arbitrary warp driven by an image, see `displace`.
|
|
18
|
-
*
|
|
19
|
-
* `phase` is in degrees and the sine wraps, so a **linear tween of `phase` over
|
|
20
|
-
* 360 loops seamlessly** — that is how you make the wave travel. Animating it is
|
|
21
|
-
* the whole point; a static wave reads as a distortion rather than as motion.
|
|
22
|
-
*/
|
|
5
|
+
/** Sine displacement, the procedural warp that needs no asset: pixels are resampled at an offset by a sine of their own coordinate (see `displace` for an image-driven warp). `phase` is in degrees and wraps, so a **linear tween of `phase` over 360 loops seamlessly**: how the wave travels. */
|
|
23
6
|
export interface WaveEffect extends ModedEffect, EffectFields<typeof waveSpec.params> {
|
|
24
7
|
type: "wave";
|
|
25
8
|
}
|
|
26
|
-
/** The {@link WaveEffect} spec: its parameters, defaults and ranges. */
|
|
27
9
|
export declare const waveSpec: import("../spec.js").EffectSpec<"wave", {
|
|
28
|
-
/**
|
|
29
|
-
* Peak displacement in px per axis. A bare number means the Y axis only:
|
|
30
|
-
* a wave that displaces along its own direction of travel just smears.
|
|
31
|
-
*/
|
|
10
|
+
/** Peak displacement in px per axis. A bare number means Y only: displacing along the direction of travel just smears. */
|
|
32
11
|
readonly amplitude: import("../spec.js").EffectParamDef<import("../../../index.js").Vector2, number | import("../../../index.js").Vector2> & NoInfer<{
|
|
33
12
|
readonly default: 20;
|
|
34
13
|
readonly fromNumber: "y";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvF
|
|
1
|
+
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvF,iMAAiM;AACjM,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C,oSAAoS;AACpS,MAAM,WAAW,UAAW,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC;IACjF,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ;IAQb,0HAA0H;;;;;;;;IAE1H,qCAAqC;;;;;;;;;IAErC,8DAA8D;;;;;;;;IAE9D,0CAA0C;;;;;;;;;IAE1C,uEAAuE;;;;;;;;IAEvE,wDAAwD;;;;;;;;;;;EAG9D,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,UAAU,CAA0B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CENTER, defineEffect, effectDataOf, param } from "../spec.js";
|
|
2
|
-
/** The {@link WaveEffect} spec: its parameters, defaults and ranges. */
|
|
3
2
|
export const waveSpec = defineEffect({
|
|
4
3
|
type: "wave",
|
|
5
4
|
group: "distort",
|
|
@@ -8,10 +7,7 @@ export const waveSpec = defineEffect({
|
|
|
8
7
|
scalar: "amplitude",
|
|
9
8
|
neutral: { amplitude: 0 },
|
|
10
9
|
params: {
|
|
11
|
-
/**
|
|
12
|
-
* Peak displacement in px per axis. A bare number means the Y axis only:
|
|
13
|
-
* a wave that displaces along its own direction of travel just smears.
|
|
14
|
-
*/
|
|
10
|
+
/** Peak displacement in px per axis. A bare number means Y only: displacing along the direction of travel just smears. */
|
|
15
11
|
amplitude: param.vec2({ default: 20, fromNumber: "y", unit: "px" }),
|
|
16
12
|
/** Distance between crests in px. */
|
|
17
13
|
wavelength: param.number({ default: 120, min: 1, unit: "px", inline: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"wave.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAUvF,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;IACjC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,8CAA8C;IA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\";\nimport { CENTER, defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\n/** How the wave's crests are laid out: `\"linear\"` (parallel crests travelling along `angle`: flags, heat shimmer) or `\"radial\"` (concentric rings from `center`: pond ripples, drop impacts). */\nexport type WaveShape = \"linear\" | \"radial\";\n\n/** Sine displacement, the procedural warp that needs no asset: pixels are resampled at an offset by a sine of their own coordinate (see `displace` for an image-driven warp). `phase` is in degrees and wraps, so a **linear tween of `phase` over 360 loops seamlessly**: how the wave travels. */\nexport interface WaveEffect extends ModedEffect, EffectFields<typeof waveSpec.params> {\n type: \"wave\";\n}\n\nexport const waveSpec = defineEffect({\n type: \"wave\",\n group: \"distort\",\n // Resamples the source at an offset position.\n surface: \"shader\",\n scalar: \"amplitude\",\n neutral: { amplitude: 0 },\n params: {\n /** Peak displacement in px per axis. A bare number means Y only: displacing along the direction of travel just smears. */\n amplitude: param.vec2({ default: 20, fromNumber: \"y\", unit: \"px\" }),\n /** Distance between crests in px. */\n wavelength: param.number({ default: 120, min: 1, unit: \"px\", inline: true }),\n /** Phase in degrees; tween over 360 for one seamless loop. */\n phase: param.number({ default: 0, step: 1, unit: \"deg\" }),\n /** Parallel bands or concentric rings. */\n shape: param.choice([\"linear\", \"radial\"] satisfies WaveShape[], { default: \"linear\", label: \"crestShape\", optionsLabel: \"waveShape\" }),\n /** Direction the crests advance along, in degrees. `'linear'` only. */\n angle: param.number({ default: 0, unit: \"deg\", control: \"angle\" }),\n /** Ring origin in 0–1 layer coords. `'radial'` only. */\n center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: \"normalized\", label: \"ringCenter\" }),\n },\n});\n\nexport const waveEffect: EffectData<WaveEffect> = effectDataOf(waveSpec);\n"]}
|
|
@@ -2,55 +2,20 @@ import { NodeEffect } from "./union.js";
|
|
|
2
2
|
import { EffectSurface } from "./effect-data.js";
|
|
3
3
|
import { type EffectDescriptor, type EffectSpec } from "./spec.js";
|
|
4
4
|
import type { AssetScope } from "../../../assets/scope.js";
|
|
5
|
-
/**
|
|
6
|
-
* Normalise one authored effect — see {@link EffectData.resolve}.
|
|
7
|
-
*
|
|
8
|
-
* Returns the effect untouched when its type registers no `resolve`, which is
|
|
9
|
-
* every effect but one.
|
|
10
|
-
*/
|
|
5
|
+
/** Normalises one authored effect (see {@link EffectData.resolve}); returned untouched when its type registers no `resolve`, which is every effect but one. */
|
|
11
6
|
export declare function resolveEffect(effect: NodeEffect): NodeEffect;
|
|
12
|
-
/**
|
|
13
|
-
* Every registered effect type, in registration order.
|
|
14
|
-
*
|
|
15
|
-
* The roster itself, so a contract test can sweep the whole set rather than a
|
|
16
|
-
* hand-kept list that silently misses whatever was added last.
|
|
17
|
-
*/
|
|
7
|
+
/** Every registered effect type, in registration order: the roster itself, so a contract test sweeps the whole set rather than a hand-kept list. */
|
|
18
8
|
export declare const effectTypes: () => string[];
|
|
19
|
-
/** The spec of a built-in effect type, or `undefined`. */
|
|
20
9
|
export declare function effectSpec(type: string): EffectSpec | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* A built-in effect type described for a host — its fields' kinds, defaults,
|
|
23
|
-
* ranges and inspector hints, as plain JSON (see {@link EffectDescriptor}).
|
|
24
|
-
* `undefined` for a type core does not know.
|
|
25
|
-
*/
|
|
10
|
+
/** A built-in effect type described for a host as plain JSON (see {@link EffectDescriptor}); `undefined` for a type core does not know. */
|
|
26
11
|
export declare function describeEffect(type: string): EffectDescriptor | undefined;
|
|
27
|
-
/** {@link describeEffect} for every built-in effect, in registration order. */
|
|
28
12
|
export declare function effectDescriptors(): EffectDescriptor[];
|
|
29
|
-
/** True when `type` has a registered `EffectData` handler. */
|
|
30
13
|
export declare function hasEffect(type: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* How a backend must realise `effect` — see {@link EffectSurface}. Unknown types
|
|
33
|
-
* fall back to `"filter"`, the composable default.
|
|
34
|
-
*/
|
|
14
|
+
/** How a backend must realise `effect` (see {@link EffectSurface}); unknown types fall back to `"filter"`. */
|
|
35
15
|
export declare function effectSurface(effect: NodeEffect): EffectSurface;
|
|
36
16
|
export declare function declareEffect(effect: NodeEffect, assets: AssetScope): void;
|
|
37
|
-
/**
|
|
38
|
-
* Interpolates two effects of the same type.
|
|
39
|
-
*
|
|
40
|
-
* The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here
|
|
41
|
-
* for every kind, switching at the midpoint like any non-interpolable value, so
|
|
42
|
-
* an effect's own `lerp` only has to describe its parameters and a new option
|
|
43
|
-
* cannot be dropped by one of 45 hand-written copies.
|
|
44
|
-
*
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
17
|
+
/** Interpolates two effects of the same type. The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here for every kind (switching at the midpoint), so an effect's own `lerp` only describes its parameters and a new option cannot be dropped by a hand-written copy. @internal */
|
|
47
18
|
export declare function lerpEffect(from: NodeEffect, to: NodeEffect, t: number): NodeEffect;
|
|
48
|
-
/**
|
|
49
|
-
* Do two effects describe the same look? The effect's own `equals` compares its
|
|
50
|
-
* parameters; the type and the cross-cutting {@link EFFECT_OPTION_KEYS} are
|
|
51
|
-
* compared here for every kind.
|
|
52
|
-
*
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
19
|
+
/** Whether two effects describe the same look: the effect's own `equals` compares its parameters; the type and {@link EFFECT_OPTION_KEYS} are compared here for every kind. @internal */
|
|
55
20
|
export declare function equalsEffect(a: NodeEffect, b: NodeEffect): boolean;
|
|
56
21
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA2CrC,OAAO,EAAc,aAAa,EAAsB,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAgB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAA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|
@@ -41,10 +41,7 @@ import { glassEffect, glassSpec } from "./implementations/glass.js";
|
|
|
41
41
|
import { lutEffect, lutSpec } from "./implementations/lut.js";
|
|
42
42
|
import { EFFECT_OPTION_KEYS } from "./effect-data.js";
|
|
43
43
|
import { describeSpec } from "./spec.js";
|
|
44
|
-
/**
|
|
45
|
-
* Every built-in effect: its spec (the parameters a host and the renderers
|
|
46
|
-
* read) and the `EffectData` derived from it, in registration order.
|
|
47
|
-
*/
|
|
44
|
+
/** Every built-in effect: its spec and the `EffectData` derived from it, in registration order. */
|
|
48
45
|
const BUILT_INS = [
|
|
49
46
|
[blurSpec, blurEffect],
|
|
50
47
|
[directionalBlurSpec, directionalBlurEffect],
|
|
@@ -93,33 +90,18 @@ const SPECS = new Map(BUILT_INS.map(([spec]) => [spec.type, spec]));
|
|
|
93
90
|
function dataFor(type) {
|
|
94
91
|
return EFFECTS.get(type);
|
|
95
92
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Normalise one authored effect — see {@link EffectData.resolve}.
|
|
98
|
-
*
|
|
99
|
-
* Returns the effect untouched when its type registers no `resolve`, which is
|
|
100
|
-
* every effect but one.
|
|
101
|
-
*/
|
|
93
|
+
/** Normalises one authored effect (see {@link EffectData.resolve}); returned untouched when its type registers no `resolve`, which is every effect but one. */
|
|
102
94
|
export function resolveEffect(effect) {
|
|
103
95
|
const data = dataFor(effect.type);
|
|
104
96
|
return data?.resolve ? data.resolve(effect) : effect;
|
|
105
97
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Every registered effect type, in registration order.
|
|
108
|
-
*
|
|
109
|
-
* The roster itself, so a contract test can sweep the whole set rather than a
|
|
110
|
-
* hand-kept list that silently misses whatever was added last.
|
|
111
|
-
*/
|
|
98
|
+
/** Every registered effect type, in registration order: the roster itself, so a contract test sweeps the whole set rather than a hand-kept list. */
|
|
112
99
|
export const effectTypes = () => [...EFFECTS.keys()];
|
|
113
|
-
/** The spec of a built-in effect type, or `undefined`. */
|
|
114
100
|
export function effectSpec(type) {
|
|
115
101
|
return SPECS.get(type);
|
|
116
102
|
}
|
|
117
103
|
const descriptors = new Map();
|
|
118
|
-
/**
|
|
119
|
-
* A built-in effect type described for a host — its fields' kinds, defaults,
|
|
120
|
-
* ranges and inspector hints, as plain JSON (see {@link EffectDescriptor}).
|
|
121
|
-
* `undefined` for a type core does not know.
|
|
122
|
-
*/
|
|
104
|
+
/** A built-in effect type described for a host as plain JSON (see {@link EffectDescriptor}); `undefined` for a type core does not know. */
|
|
123
105
|
export function describeEffect(type) {
|
|
124
106
|
const spec = effectSpec(type);
|
|
125
107
|
if (!spec)
|
|
@@ -129,18 +111,13 @@ export function describeEffect(type) {
|
|
|
129
111
|
descriptors.set(spec.type, (out = describeSpec(spec)));
|
|
130
112
|
return structuredClone(out);
|
|
131
113
|
}
|
|
132
|
-
/** {@link describeEffect} for every built-in effect, in registration order. */
|
|
133
114
|
export function effectDescriptors() {
|
|
134
115
|
return [...SPECS.keys()].map((type) => describeEffect(type));
|
|
135
116
|
}
|
|
136
|
-
/** True when `type` has a registered `EffectData` handler. */
|
|
137
117
|
export function hasEffect(type) {
|
|
138
118
|
return dataFor(type) !== undefined;
|
|
139
119
|
}
|
|
140
|
-
/**
|
|
141
|
-
* How a backend must realise `effect` — see {@link EffectSurface}. Unknown types
|
|
142
|
-
* fall back to `"filter"`, the composable default.
|
|
143
|
-
*/
|
|
120
|
+
/** How a backend must realise `effect` (see {@link EffectSurface}); unknown types fall back to `"filter"`. */
|
|
144
121
|
export function effectSurface(effect) {
|
|
145
122
|
const surface = dataFor(effect.type)?.surface;
|
|
146
123
|
if (surface === undefined)
|
|
@@ -150,16 +127,7 @@ export function effectSurface(effect) {
|
|
|
150
127
|
export function declareEffect(effect, assets) {
|
|
151
128
|
dataFor(effect.type)?.declare?.(effect, assets);
|
|
152
129
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Interpolates two effects of the same type.
|
|
155
|
-
*
|
|
156
|
-
* The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here
|
|
157
|
-
* for every kind, switching at the midpoint like any non-interpolable value, so
|
|
158
|
-
* an effect's own `lerp` only has to describe its parameters and a new option
|
|
159
|
-
* cannot be dropped by one of 45 hand-written copies.
|
|
160
|
-
*
|
|
161
|
-
* @internal
|
|
162
|
-
*/
|
|
130
|
+
/** Interpolates two effects of the same type. The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here for every kind (switching at the midpoint), so an effect's own `lerp` only describes its parameters and a new option cannot be dropped by a hand-written copy. @internal */
|
|
163
131
|
export function lerpEffect(from, to, t) {
|
|
164
132
|
if (from.type !== to.type)
|
|
165
133
|
return t < 0.5 ? from : to;
|
|
@@ -183,13 +151,7 @@ export function lerpEffect(from, to, t) {
|
|
|
183
151
|
}
|
|
184
152
|
return out ?? lerped;
|
|
185
153
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Do two effects describe the same look? The effect's own `equals` compares its
|
|
188
|
-
* parameters; the type and the cross-cutting {@link EFFECT_OPTION_KEYS} are
|
|
189
|
-
* compared here for every kind.
|
|
190
|
-
*
|
|
191
|
-
* @internal
|
|
192
|
-
*/
|
|
154
|
+
/** Whether two effects describe the same look: the effect's own `equals` compares its parameters; the type and {@link EFFECT_OPTION_KEYS} are compared here for every kind. @internal */
|
|
193
155
|
export function equalsEffect(a, b) {
|
|
194
156
|
if (a.type !== b.type)
|
|
195
157
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,M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a;IACrD,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\n\nimport { blurEffect, blurSpec } from \"./implementations/blur\";\nimport { directionalBlurEffect, directionalBlurSpec } from \"./implementations/directional-blur\";\nimport { grayscaleEffect, grayscaleSpec } from \"./implementations/grayscale\";\nimport { pixelateEffect, pixelateSpec } from \"./implementations/pixelate\";\nimport { bulgeEffect, bulgeSpec } from \"./implementations/bulge\";\nimport { magnifyEffect, magnifySpec } from \"./implementations/magnify\";\nimport { bloomEffect, bloomSpec } from \"./implementations/bloom\";\nimport { vintageEffect, vintageSpec } from \"./implementations/vintage\";\nimport { chromaticAberrationEffect, chromaticAberrationSpec } from \"./implementations/chromatic-aberration\";\nimport { invertEffect, invertSpec } from \"./implementations/invert\";\nimport { scatterEffect, scatterSpec } from \"./implementations/scatter\";\nimport { posterizeEffect, posterizeSpec } from \"./implementations/posterize\";\nimport { motionBlurEffect, motionBlurSpec } from \"./implementations/motion-blur\";\nimport { shaderEffect, shaderSpec } from \"./implementations/shader\";\nimport { outlineEffect, outlineSpec } from \"./implementations/outline\";\nimport { dropShadowEffect, dropShadowSpec } from \"./implementations/drop-shadow\";\nimport { vignetteEffect, vignetteSpec } from \"./implementations/vignette\";\nimport { grainEffect, grainSpec } from \"./implementations/grain\";\nimport { sharpenEffect, sharpenSpec } from \"./implementations/sharpen\";\nimport { edgesEffect, edgesSpec } from \"./implementations/edges\";\nimport { thresholdEffect, thresholdSpec } from \"./implementations/threshold\";\nimport { radialBlurEffect, radialBlurSpec } from \"./implementations/radial-blur\";\nimport { halftoneEffect, halftoneSpec } from \"./implementations/halftone\";\nimport { ditherEffect, ditherSpec } from \"./implementations/dither\";\nimport { duotoneEffect, duotoneSpec } from \"./implementations/duotone\";\nimport { curvesEffect, curvesSpec } from \"./implementations/curves\";\nimport { colorAdjustmentEffect, colorAdjustmentSpec } from \"./implementations/color-adjustment\";\nimport { rgbShiftEffect, rgbShiftSpec } from \"./implementations/rgb-shift\";\nimport { scanlinesEffect, scanlinesSpec } from \"./implementations/scanlines\";\nimport { blockDisplaceEffect, blockDisplaceSpec } from \"./implementations/block-displace\";\nimport { bitCrushEffect, bitCrushSpec } from \"./implementations/bit-crush\";\nimport { asciiEffect, asciiSpec } from \"./implementations/ascii\";\nimport { streakEffect, streakSpec } from \"./implementations/streak\";\nimport { glowEffect, glowSpec } from \"./implementations/glow\";\nimport { oilPaintEffect, oilPaintSpec } from \"./implementations/oil-paint\";\nimport { waveEffect, waveSpec } from \"./implementations/wave\";\nimport { twirlEffect, twirlSpec } from \"./implementations/twirl\";\nimport { progressiveBlurEffect, progressiveBlurSpec } from \"./implementations/progressive-blur\";\nimport { kaleidoscopeEffect, kaleidoscopeSpec } from \"./implementations/kaleidoscope\";\nimport { glassEffect, glassSpec } from \"./implementations/glass\";\nimport { lutEffect, lutSpec } from \"./implementations/lut\";\nimport { EffectData, EffectSurface, EFFECT_OPTION_KEYS } from \"./effect-data\";\nimport { describeSpec, type EffectDescriptor, type EffectSpec } from \"./spec\";\nimport type { AssetScope } from \"@/assets/scope\";\n\n\n/**\n * Every built-in effect: its spec (the parameters a host and the renderers\n * read) and the `EffectData` derived from it, in registration order.\n */\nconst BUILT_INS: readonly (readonly [EffectSpec, EffectData<any>])[] = [\n [blurSpec, blurEffect],\n [directionalBlurSpec, directionalBlurEffect],\n [grayscaleSpec, grayscaleEffect],\n [pixelateSpec, pixelateEffect],\n [bulgeSpec, bulgeEffect],\n [magnifySpec, magnifyEffect],\n [bloomSpec, bloomEffect],\n [vintageSpec, vintageEffect],\n [chromaticAberrationSpec, chromaticAberrationEffect],\n [invertSpec, invertEffect],\n [scatterSpec, scatterEffect],\n [posterizeSpec, posterizeEffect],\n [motionBlurSpec, motionBlurEffect],\n [shaderSpec, shaderEffect],\n [outlineSpec, outlineEffect],\n [dropShadowSpec, dropShadowEffect],\n [vignetteSpec, vignetteEffect],\n [grainSpec, grainEffect],\n [sharpenSpec, sharpenEffect],\n [edgesSpec, edgesEffect],\n [thresholdSpec, thresholdEffect],\n [radialBlurSpec, radialBlurEffect],\n [halftoneSpec, halftoneEffect],\n [ditherSpec, ditherEffect],\n [duotoneSpec, duotoneEffect],\n [curvesSpec, curvesEffect],\n [colorAdjustmentSpec, colorAdjustmentEffect],\n [rgbShiftSpec, rgbShiftEffect],\n [scanlinesSpec, scanlinesEffect],\n [blockDisplaceSpec, blockDisplaceEffect],\n [bitCrushSpec, bitCrushEffect],\n [asciiSpec, asciiEffect],\n [streakSpec, streakEffect],\n [glowSpec, glowEffect],\n [oilPaintSpec, oilPaintEffect],\n [waveSpec, waveEffect],\n [twirlSpec, twirlEffect],\n [progressiveBlurSpec, progressiveBlurEffect],\n [kaleidoscopeSpec, kaleidoscopeEffect],\n [glassSpec, glassEffect],\n [lutSpec, lutEffect],\n];\n\nconst EFFECTS = new Map<string, EffectData<NodeEffect>>(BUILT_INS.map(([spec, data]) => [spec.type, data]));\nconst SPECS = new Map<string, EffectSpec>(BUILT_INS.map(([spec]) => [spec.type, spec]));\n\nfunction dataFor(type: string): EffectData<NodeEffect> | undefined {\n return EFFECTS.get(type);\n}\n\n/**\n * Normalise one authored effect — see {@link EffectData.resolve}.\n *\n * Returns the effect untouched when its type registers no `resolve`, which is\n * every effect but one.\n */\nexport function resolveEffect(effect: NodeEffect): NodeEffect {\n const data = dataFor(effect.type);\n return data?.resolve ? data.resolve(effect) : effect;\n}\n\n/**\n * Every registered effect type, in registration order.\n *\n * The roster itself, so a contract test can sweep the whole set rather than a\n * hand-kept list that silently misses whatever was added last.\n */\nexport const effectTypes = (): string[] => [...EFFECTS.keys()];\n\n/** The spec of a built-in effect type, or `undefined`. */\nexport function effectSpec(type: string): EffectSpec | undefined {\n return SPECS.get(type);\n}\n\nconst descriptors = new Map<string, EffectDescriptor>();\n\n/**\n * A built-in effect type described for a host — its fields' kinds, defaults,\n * ranges and inspector hints, as plain JSON (see {@link EffectDescriptor}).\n * `undefined` for a type core does not know.\n */\nexport function describeEffect(type: string): EffectDescriptor | undefined {\n const spec = effectSpec(type);\n if (!spec) return undefined;\n let out = descriptors.get(spec.type);\n if (!out) descriptors.set(spec.type, (out = describeSpec(spec)));\n return structuredClone(out);\n}\n\n/** {@link describeEffect} for every built-in effect, in registration order. */\nexport function effectDescriptors(): EffectDescriptor[] {\n return [...SPECS.keys()].map((type) => describeEffect(type)!);\n}\n\n/** True when `type` has a registered `EffectData` handler. */\nexport function hasEffect(type: string): boolean {\n return dataFor(type) !== undefined;\n}\n\n/**\n * How a backend must realise `effect` — see {@link EffectSurface}. Unknown types\n * fall back to `\"filter\"`, the composable default.\n */\nexport function effectSurface(effect: NodeEffect): EffectSurface {\n const surface = dataFor(effect.type)?.surface;\n if (surface === undefined) return \"filter\";\n return typeof surface === \"function\" ? surface(effect) : surface;\n}\n\nexport function declareEffect(effect: NodeEffect, assets: AssetScope): void {\n dataFor(effect.type)?.declare?.(effect, assets);\n}\n\n/**\n * Interpolates two effects of the same type.\n *\n * The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here\n * for every kind, switching at the midpoint like any non-interpolable value, so\n * an effect's own `lerp` only has to describe its parameters and a new option\n * cannot be dropped by one of 45 hand-written copies.\n *\n * @internal\n */\nexport function lerpEffect(from: NodeEffect, to: NodeEffect, t: number): NodeEffect {\n if (from.type !== to.type) return t < 0.5 ? from : to;\n const data = dataFor(from.type);\n if (!data) return t < 0.5 ? from : to;\n const lerped = data.lerp(from, to, t);\n const source = t < 0.5 ? from : to;\n let out: NodeEffect | undefined;\n for (const key of EFFECT_OPTION_KEYS) {\n if (lerped[key] === source[key]) continue;\n // Copy lazily, and omit rather than write `undefined`: the equality\n // checks compare these fields directly.\n out ??= { ...lerped } as NodeEffect;\n const target = out as unknown as Record<string, unknown>;\n if (source[key] === undefined) delete target[key];\n else target[key] = source[key];\n }\n return out ?? lerped;\n}\n\n/**\n * Do two effects describe the same look? The effect's own `equals` compares its\n * parameters; the type and the cross-cutting {@link EFFECT_OPTION_KEYS} are\n * compared here for every kind.\n *\n * @internal\n */\nexport function equalsEffect(a: NodeEffect, b: NodeEffect): boolean {\n if (a.type !== b.type) return false;\n if (EFFECT_OPTION_KEYS.some((key) => a[key] !== b[key])) return false;\n const data = dataFor(a.type);\n return data ? data.equals(a, b) : a === b;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,E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CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\n\nimport { blurEffect, blurSpec } from \"./implementations/blur\";\nimport { directionalBlurEffect, directionalBlurSpec } from \"./implementations/directional-blur\";\nimport { grayscaleEffect, grayscaleSpec } from \"./implementations/grayscale\";\nimport { pixelateEffect, pixelateSpec } from \"./implementations/pixelate\";\nimport { bulgeEffect, bulgeSpec } from \"./implementations/bulge\";\nimport { magnifyEffect, magnifySpec } from \"./implementations/magnify\";\nimport { bloomEffect, bloomSpec } from \"./implementations/bloom\";\nimport { vintageEffect, vintageSpec } from \"./implementations/vintage\";\nimport { chromaticAberrationEffect, chromaticAberrationSpec } from \"./implementations/chromatic-aberration\";\nimport { invertEffect, invertSpec } from \"./implementations/invert\";\nimport { scatterEffect, scatterSpec } from \"./implementations/scatter\";\nimport { posterizeEffect, posterizeSpec } from \"./implementations/posterize\";\nimport { motionBlurEffect, motionBlurSpec } from \"./implementations/motion-blur\";\nimport { shaderEffect, shaderSpec } from \"./implementations/shader\";\nimport { outlineEffect, outlineSpec } from \"./implementations/outline\";\nimport { dropShadowEffect, dropShadowSpec } from \"./implementations/drop-shadow\";\nimport { vignetteEffect, vignetteSpec } from \"./implementations/vignette\";\nimport { grainEffect, grainSpec } from \"./implementations/grain\";\nimport { sharpenEffect, sharpenSpec } from \"./implementations/sharpen\";\nimport { edgesEffect, edgesSpec } from \"./implementations/edges\";\nimport { thresholdEffect, thresholdSpec } from \"./implementations/threshold\";\nimport { radialBlurEffect, radialBlurSpec } from \"./implementations/radial-blur\";\nimport { halftoneEffect, halftoneSpec } from \"./implementations/halftone\";\nimport { ditherEffect, ditherSpec } from \"./implementations/dither\";\nimport { duotoneEffect, duotoneSpec } from \"./implementations/duotone\";\nimport { curvesEffect, curvesSpec } from \"./implementations/curves\";\nimport { colorAdjustmentEffect, colorAdjustmentSpec } from \"./implementations/color-adjustment\";\nimport { rgbShiftEffect, rgbShiftSpec } from \"./implementations/rgb-shift\";\nimport { scanlinesEffect, scanlinesSpec } from \"./implementations/scanlines\";\nimport { blockDisplaceEffect, blockDisplaceSpec } from \"./implementations/block-displace\";\nimport { bitCrushEffect, bitCrushSpec } from \"./implementations/bit-crush\";\nimport { asciiEffect, asciiSpec } from \"./implementations/ascii\";\nimport { streakEffect, streakSpec } from \"./implementations/streak\";\nimport { glowEffect, glowSpec } from \"./implementations/glow\";\nimport { oilPaintEffect, oilPaintSpec } from \"./implementations/oil-paint\";\nimport { waveEffect, waveSpec } from \"./implementations/wave\";\nimport { twirlEffect, twirlSpec } from \"./implementations/twirl\";\nimport { progressiveBlurEffect, progressiveBlurSpec } from \"./implementations/progressive-blur\";\nimport { kaleidoscopeEffect, kaleidoscopeSpec } from \"./implementations/kaleidoscope\";\nimport { glassEffect, glassSpec } from \"./implementations/glass\";\nimport { lutEffect, lutSpec } from \"./implementations/lut\";\nimport { EffectData, EffectSurface, EFFECT_OPTION_KEYS } from \"./effect-data\";\nimport { describeSpec, type EffectDescriptor, type EffectSpec } from \"./spec\";\nimport type { AssetScope } from \"@/assets/scope\";\n\n\n/** Every built-in effect: its spec and the `EffectData` derived from it, in registration order. */\nconst BUILT_INS: readonly (readonly [EffectSpec, EffectData<any>])[] = [\n [blurSpec, blurEffect],\n [directionalBlurSpec, directionalBlurEffect],\n [grayscaleSpec, grayscaleEffect],\n [pixelateSpec, pixelateEffect],\n [bulgeSpec, bulgeEffect],\n [magnifySpec, magnifyEffect],\n [bloomSpec, bloomEffect],\n [vintageSpec, vintageEffect],\n [chromaticAberrationSpec, chromaticAberrationEffect],\n [invertSpec, invertEffect],\n [scatterSpec, scatterEffect],\n [posterizeSpec, posterizeEffect],\n [motionBlurSpec, motionBlurEffect],\n [shaderSpec, shaderEffect],\n [outlineSpec, outlineEffect],\n [dropShadowSpec, dropShadowEffect],\n [vignetteSpec, vignetteEffect],\n [grainSpec, grainEffect],\n [sharpenSpec, sharpenEffect],\n [edgesSpec, edgesEffect],\n [thresholdSpec, thresholdEffect],\n [radialBlurSpec, radialBlurEffect],\n [halftoneSpec, halftoneEffect],\n [ditherSpec, ditherEffect],\n [duotoneSpec, duotoneEffect],\n [curvesSpec, curvesEffect],\n [colorAdjustmentSpec, colorAdjustmentEffect],\n [rgbShiftSpec, rgbShiftEffect],\n [scanlinesSpec, scanlinesEffect],\n [blockDisplaceSpec, blockDisplaceEffect],\n [bitCrushSpec, bitCrushEffect],\n [asciiSpec, asciiEffect],\n [streakSpec, streakEffect],\n [glowSpec, glowEffect],\n [oilPaintSpec, oilPaintEffect],\n [waveSpec, waveEffect],\n [twirlSpec, twirlEffect],\n [progressiveBlurSpec, progressiveBlurEffect],\n [kaleidoscopeSpec, kaleidoscopeEffect],\n [glassSpec, glassEffect],\n [lutSpec, lutEffect],\n];\n\nconst EFFECTS = new Map<string, EffectData<NodeEffect>>(BUILT_INS.map(([spec, data]) => [spec.type, data]));\nconst SPECS = new Map<string, EffectSpec>(BUILT_INS.map(([spec]) => [spec.type, spec]));\n\nfunction dataFor(type: string): EffectData<NodeEffect> | undefined {\n return EFFECTS.get(type);\n}\n\n/** Normalises one authored effect (see {@link EffectData.resolve}); returned untouched when its type registers no `resolve`, which is every effect but one. */\nexport function resolveEffect(effect: NodeEffect): NodeEffect {\n const data = dataFor(effect.type);\n return data?.resolve ? data.resolve(effect) : effect;\n}\n\n/** Every registered effect type, in registration order: the roster itself, so a contract test sweeps the whole set rather than a hand-kept list. */\nexport const effectTypes = (): string[] => [...EFFECTS.keys()];\n\nexport function effectSpec(type: string): EffectSpec | undefined {\n return SPECS.get(type);\n}\n\nconst descriptors = new Map<string, EffectDescriptor>();\n\n/** A built-in effect type described for a host as plain JSON (see {@link EffectDescriptor}); `undefined` for a type core does not know. */\nexport function describeEffect(type: string): EffectDescriptor | undefined {\n const spec = effectSpec(type);\n if (!spec) return undefined;\n let out = descriptors.get(spec.type);\n if (!out) descriptors.set(spec.type, (out = describeSpec(spec)));\n return structuredClone(out);\n}\n\nexport function effectDescriptors(): EffectDescriptor[] {\n return [...SPECS.keys()].map((type) => describeEffect(type)!);\n}\n\nexport function hasEffect(type: string): boolean {\n return dataFor(type) !== undefined;\n}\n\n/** How a backend must realise `effect` (see {@link EffectSurface}); unknown types fall back to `\"filter\"`. */\nexport function effectSurface(effect: NodeEffect): EffectSurface {\n const surface = dataFor(effect.type)?.surface;\n if (surface === undefined) return \"filter\";\n return typeof surface === \"function\" ? surface(effect) : surface;\n}\n\nexport function declareEffect(effect: NodeEffect, assets: AssetScope): void {\n dataFor(effect.type)?.declare?.(effect, assets);\n}\n\n/** Interpolates two effects of the same type. The cross-cutting {@link EFFECT_OPTION_KEYS} (`mode`, `clip`) are carried here for every kind (switching at the midpoint), so an effect's own `lerp` only describes its parameters and a new option cannot be dropped by a hand-written copy. @internal */\nexport function lerpEffect(from: NodeEffect, to: NodeEffect, t: number): NodeEffect {\n if (from.type !== to.type) return t < 0.5 ? from : to;\n const data = dataFor(from.type);\n if (!data) return t < 0.5 ? from : to;\n const lerped = data.lerp(from, to, t);\n const source = t < 0.5 ? from : to;\n let out: NodeEffect | undefined;\n for (const key of EFFECT_OPTION_KEYS) {\n if (lerped[key] === source[key]) continue;\n // Copy lazily, and omit rather than write `undefined`: the equality\n // checks compare these fields directly.\n out ??= { ...lerped } as NodeEffect;\n const target = out as unknown as Record<string, unknown>;\n if (source[key] === undefined) delete target[key];\n else target[key] = source[key];\n }\n return out ?? lerped;\n}\n\n/** Whether two effects describe the same look: the effect's own `equals` compares its parameters; the type and {@link EFFECT_OPTION_KEYS} are compared here for every kind. @internal */\nexport function equalsEffect(a: NodeEffect, b: NodeEffect): boolean {\n if (a.type !== b.type) return false;\n if (EFFECT_OPTION_KEYS.some((key) => a[key] !== b[key])) return false;\n const data = dataFor(a.type);\n return data ? data.equals(a, b) : a === b;\n}\n"]}
|
|
@@ -2,10 +2,7 @@ import { type Vector2 } from "../../../attributes/layout/vector2.js";
|
|
|
2
2
|
import type { Color } from "../../../attributes/shape/fill/color/parser.js";
|
|
3
3
|
import type { AssetScope } from "../../../assets/scope.js";
|
|
4
4
|
import type { EffectAxis, EffectData, EffectMode, EffectOptions, EffectSurface, ModedEffect } from "./effect-data.js";
|
|
5
|
-
/**
|
|
6
|
-
* How a parameter's value is shaped, which decides its default interpolation,
|
|
7
|
-
* equality and how a renderer encodes it into a uniform.
|
|
8
|
-
*/
|
|
5
|
+
/** How a parameter's value is shaped: its default interpolation, equality and uniform encoding. */
|
|
9
6
|
export type EffectParamKind = "number" | "color" | "vec2" | "enum" | "boolean" | "axis" | "text" | "colors" | "numbers" | "points" | "table" | "uniforms";
|
|
10
7
|
/** What a number measures, for a host's units and a renderer's scaling. */
|
|
11
8
|
export type EffectParamUnit = "px" | "deg" | "percent" | "factor" | "normalized";
|
|
@@ -33,13 +30,7 @@ export interface EffectParamHints {
|
|
|
33
30
|
}
|
|
34
31
|
/** Interpolates one parameter. `from`/`to` are the whole effects, for parameters that depend on a sibling. */
|
|
35
32
|
export type EffectParamLerp<T> = (a: T, b: T, t: number, from: Record<string, unknown>, to: Record<string, unknown>) => T;
|
|
36
|
-
/**
|
|
37
|
-
* One parameter of a built-in effect: a stored field of the effect object.
|
|
38
|
-
*
|
|
39
|
-
* `T` is the stored type, `In` what a builder accepts for it (`normalize` maps
|
|
40
|
-
* one to the other: a bare number for a per-axis count, say). Only the
|
|
41
|
-
* serialisable fields reach {@link EffectDescriptor}.
|
|
42
|
-
*/
|
|
33
|
+
/** One parameter of a built-in effect: a stored field. `T` is the stored type, `In` what a builder accepts (`normalize` maps one to the other); only the serialisable fields reach {@link EffectDescriptor}. */
|
|
43
34
|
export interface EffectParamDef<T = unknown, In = T> extends EffectParamHints {
|
|
44
35
|
readonly kind: EffectParamKind;
|
|
45
36
|
/** What the builder writes when the option is omitted (an input, before `normalize`). */
|
|
@@ -63,13 +54,7 @@ export interface EffectParamDef<T = unknown, In = T> extends EffectParamHints {
|
|
|
63
54
|
}
|
|
64
55
|
/** An effect's parameters, by stored field name, in builder (and stored-key) order. */
|
|
65
56
|
export type EffectParamTable = Readonly<Record<string, EffectParamDef<any, any>>>;
|
|
66
|
-
/**
|
|
67
|
-
* The declarative definition of a built-in effect: its parameters (types,
|
|
68
|
-
* defaults, ranges, inspector hints) plus the behaviour that has to stay code.
|
|
69
|
-
* Core's types, builder defaults, `lerp`/`equals` and the host-facing
|
|
70
|
-
* {@link EffectDescriptor} are derived from it, and the renderers bind their
|
|
71
|
-
* shader uniforms to its parameter names.
|
|
72
|
-
*/
|
|
57
|
+
/** The declarative definition of a built-in effect: its parameters plus the behaviour that has to stay code. Core's types, builder defaults, `lerp`/`equals` and the host-facing {@link EffectDescriptor} derive from it, and renderers bind shader uniforms to its parameter names. */
|
|
73
58
|
export interface EffectSpec<T extends string = string, P extends EffectParamTable = EffectParamTable> {
|
|
74
59
|
readonly type: T;
|
|
75
60
|
readonly params: P;
|
|
@@ -117,9 +102,8 @@ export type EffectOptionsOf<P extends EffectParamTable> = {
|
|
|
117
102
|
export type EffectOf<S extends EffectSpec> = {
|
|
118
103
|
type: S["type"];
|
|
119
104
|
} & ModedEffect & EffectFields<S["params"]>;
|
|
120
|
-
/** Declares a built-in effect; see {@link EffectSpec}. */
|
|
121
105
|
export declare function defineEffect<const T extends string, const P extends EffectParamTable>(spec: EffectSpec<T, P>): EffectSpec<T, P>;
|
|
122
|
-
/** The middle of the layer, every centre option's default.
|
|
106
|
+
/** The middle of the layer, every centre option's default. */
|
|
123
107
|
export declare const CENTER: Vector2;
|
|
124
108
|
type Options<T, In = T> = Omit<EffectParamDef<T, In>, "kind" | "__type" | "options" | "normalize" | "lerp" | "equals">;
|
|
125
109
|
type Behaviour<T> = Pick<EffectParamDef<T>, "lerp" | "equals">;
|
|
@@ -154,11 +138,7 @@ export declare const param: {
|
|
|
154
138
|
text<V extends string = string, const O extends Options<V> = Options<V, V>>(o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & {
|
|
155
139
|
kind: "text";
|
|
156
140
|
};
|
|
157
|
-
/**
|
|
158
|
-
* A parameter of stored type `T` that no generic kind covers, curried so
|
|
159
|
-
* `T` is given and the options inferred: `param.of<Color[]>()({ kind: "colors", … })`.
|
|
160
|
-
* It steps and compares by `===` unless given `lerp`/`equals`.
|
|
161
|
-
*/
|
|
141
|
+
/** A parameter of stored type `T` no generic kind covers, curried so `T` is given and options inferred: `param.of<Color[]>()({ kind: "colors", … })`. Steps and compares by `===` unless given `lerp`/`equals`. */
|
|
162
142
|
of<T>(): <const O extends Options<T> & {
|
|
163
143
|
kind: EffectParamKind;
|
|
164
144
|
}>(o: O & Behaviour<T>) => EffectParamDef<T> & NoInfer<O>;
|
|
@@ -203,11 +183,7 @@ export interface EffectParamDescriptor {
|
|
|
203
183
|
hidden?: boolean;
|
|
204
184
|
initial?: EffectJson;
|
|
205
185
|
}
|
|
206
|
-
/**
|
|
207
|
-
* A built-in effect, described for a host: what its fields are, their kinds,
|
|
208
|
-
* defaults and ranges, and how an inspector should lay them out. Plain JSON, so
|
|
209
|
-
* it can be shipped to a UI as is.
|
|
210
|
-
*/
|
|
186
|
+
/** A built-in effect described for a host (fields, kinds, defaults, ranges, inspector layout) as plain JSON, shippable to a UI as is. */
|
|
211
187
|
export interface EffectDescriptor {
|
|
212
188
|
type: string;
|
|
213
189
|
group: EffectGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/spec.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGn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WAAW,CAAC;IACnB,qEAAqE;IACrE,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,qGAAqG;IACrG,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9C,gEAAgE;IAChE,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACnC;AAKD,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,gBAAgB,CA6C/D"}
|
|
@@ -2,11 +2,10 @@ import { lerpNumber } from "../../../tween/lerp.js";
|
|
|
2
2
|
import { lerpVector2 } from "../../../attributes/layout/vector2.js";
|
|
3
3
|
import { lerpColor } from "../../../attributes/shape/fill/lerp.js";
|
|
4
4
|
import { resolveEffectColor, sameEffectAxis, sameEffectColor, scalarOptions, withEffectOptions } from "./effect-data.js";
|
|
5
|
-
/** Declares a built-in effect; see {@link EffectSpec}. */
|
|
6
5
|
export function defineEffect(spec) {
|
|
7
6
|
return spec;
|
|
8
7
|
}
|
|
9
|
-
/** The middle of the layer, every centre option's default.
|
|
8
|
+
/** The middle of the layer, every centre option's default. */
|
|
10
9
|
export const CENTER = { x: 0.5, y: 0.5 };
|
|
11
10
|
/** Parameter constructors for {@link defineEffect}. */
|
|
12
11
|
export const param = {
|
|
@@ -37,11 +36,7 @@ export const param = {
|
|
|
37
36
|
text(o) {
|
|
38
37
|
return { kind: "text", lerp: "step", ...o };
|
|
39
38
|
},
|
|
40
|
-
/**
|
|
41
|
-
* A parameter of stored type `T` that no generic kind covers, curried so
|
|
42
|
-
* `T` is given and the options inferred: `param.of<Color[]>()({ kind: "colors", … })`.
|
|
43
|
-
* It steps and compares by `===` unless given `lerp`/`equals`.
|
|
44
|
-
*/
|
|
39
|
+
/** A parameter of stored type `T` no generic kind covers, curried so `T` is given and options inferred: `param.of<Color[]>()({ kind: "colors", … })`. Steps and compares by `===` unless given `lerp`/`equals`. */
|
|
45
40
|
of() {
|
|
46
41
|
return (o) => ({ lerp: "step", ...o });
|
|
47
42
|
},
|
|
@@ -102,8 +97,7 @@ export function effectDataOf(spec) {
|
|
|
102
97
|
data.declare = spec.declare;
|
|
103
98
|
return data;
|
|
104
99
|
}
|
|
105
|
-
// Arrays are copied so editing one effect's list never reaches another's;
|
|
106
|
-
// objects (a centre point) are shared, as they always were.
|
|
100
|
+
// Arrays are copied so editing one effect's list never reaches another's; objects (a centre point) are shared.
|
|
107
101
|
const copyDefault = (value) => (Array.isArray(value) ? [...value] : value);
|
|
108
102
|
/**
|
|
109
103
|
* Builds an effect from builder input: the scalar shorthand, then each
|