@motionscript/core 0.1.0-alpha.0 → 0.1.0-alpha.10
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 +356 -0
- package/NOTICE +49 -0
- package/README.md +29 -10
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +7 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +99 -15
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/scope.d.ts +4 -4
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +52 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +10 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +26 -24
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +51 -30
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +18 -13
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +13 -11
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +8 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +7 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +1 -1
- package/dist/attributes/layout/size.js +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +56 -12
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +59 -19
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +27 -141
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +24 -106
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +117 -522
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +102 -364
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +98 -28
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +21 -7
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +82 -34
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +57 -34
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +6 -8
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +34 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +157 -112
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +102 -50
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +2 -2
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +9 -1
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +12 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +7 -17
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +3 -19
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +3 -3
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +6 -6
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +12 -13
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +1 -2
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/shaders/index.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- package/dist/attributes/shape/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js +2 -0
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js +3 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +5 -5
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -19
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -19
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.d.ts +5 -5
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.js +4 -15
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.d.ts +1 -1
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.js +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.d.ts +10 -12
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.js +10 -12
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.d.ts +2 -2
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.js +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +453 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.d.ts +4 -4
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.js +3 -4
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.d.ts +2 -2
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.js +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.d.ts +3 -3
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.js +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-render.js +10 -23
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.d.ts +3 -3
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.js +4 -4
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.d.ts +2 -2
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.js +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.d.ts +206 -185
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.js +296 -324
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.d.ts +25 -15
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.js +30 -35
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.d.ts +9 -10
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.js +16 -13
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.d.ts +3 -3
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.js +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.d.ts +1 -1
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.js +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node.d.ts +46 -82
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node.js +89 -114
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.d.ts +16 -15
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.js +40 -85
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.d.ts +65 -25
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.js +78 -76
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +18 -42
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +23 -5
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +72 -10
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +2 -2
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +10 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +6 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-decorator.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +32 -3
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +71 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +4 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +71 -44
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +94 -35
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +57 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +264 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +145 -20
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +478 -80
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +30 -44
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +20 -8
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +195 -52
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +82 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +34 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +26 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +6 -1
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +29 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +84 -0
- package/dist/props/layout.js.map +1 -0
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +19 -3
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +20 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -9
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +11 -5
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/render-context2d.d.ts +8 -8
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- package/dist/render/surface.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +21 -23
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +85 -34
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/resources.d.ts +2 -2
- package/dist/render3d/resources.js +2 -2
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +12 -1
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +40 -7
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +11 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +20 -3
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +29 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -19
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +13 -6
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +34 -12
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +20 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +132 -27
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +13 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +6 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +45 -4
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +127 -13
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +14 -6
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +32 -3
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +78 -11
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +16 -10
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +23 -8
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +6 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +70 -38
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +71 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +21 -8
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +12 -23
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +13 -1
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +17 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +41 -0
- package/dist/tween/ease/describe.js.map +1 -0
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/index.d.ts +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +8 -10
- package/dist/attributes/audio/filters/chain.d.ts +0 -113
- package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/chain.js +0 -104
- package/dist/attributes/audio/filters/chain.js.map +0 -1
- package/dist/attributes/audio/filters/curve.d.ts +0 -152
- package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
- package/dist/attributes/audio/filters/curve.js +0 -249
- package/dist/attributes/audio/filters/curve.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
- package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
- package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
- package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.js +0 -6
- package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
- package/dist/attributes/audio/filters/index.d.ts +0 -22
- package/dist/attributes/audio/filters/index.d.ts.map +0 -1
- package/dist/attributes/audio/filters/index.js +0 -8
- package/dist/attributes/audio/filters/index.js.map +0 -1
- package/dist/attributes/audio/filters/registry.d.ts +0 -36
- package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
- package/dist/attributes/audio/filters/registry.js +0 -82
- package/dist/attributes/audio/filters/registry.js.map +0 -1
- package/dist/attributes/audio/filters/union.d.ts +0 -18
- package/dist/attributes/audio/filters/union.d.ts.map +0 -1
- package/dist/attributes/audio/filters/union.js +0 -28
- package/dist/attributes/audio/filters/union.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
- package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.js +0 -0
- package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-P3XQCHDW.js +0 -16
- package/dist/browser/chunks/chunk-P3XQCHDW.js.map +0 -7
- package/dist/browser/chunks/chunk-VJQMKHGQ.js +0 -3
- package/dist/browser/chunks/chunk-VJQMKHGQ.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -19
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -16
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js.map +0 -1
- package/dist/nodes/2d/node-render.d.ts +0 -44
- package/dist/nodes/2d/node-render.d.ts.map +0 -1
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -115
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -190
- package/dist/nodes/2d/paint-node.js.map +0 -1
- package/dist/nodes/audio/audio-bus.d.ts +0 -28
- package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
- package/dist/nodes/audio/audio-bus.js +0 -33
- package/dist/nodes/audio/audio-bus.js.map +0 -1
- package/dist/nodes/audio/index.d.ts +0 -4
- package/dist/nodes/audio/index.d.ts.map +0 -1
- package/dist/nodes/audio/index.js +0 -4
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -40
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -68
- package/dist/nodes/audio/sound-node.js.map +0 -1
- package/dist/nodes/geometry/boolean-node.d.ts +0 -28
- package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
- package/dist/nodes/geometry/boolean-node.js +0 -81
- package/dist/nodes/geometry/boolean-node.js.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
- package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.js +0 -181
- package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
- package/dist/nodes/geometry/box-path-node.d.ts +0 -89
- package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/box-path-node.js +0 -116
- package/dist/nodes/geometry/box-path-node.js.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
- package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
- package/dist/nodes/geometry/ellipse-node.js +0 -45
- package/dist/nodes/geometry/ellipse-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/mask-node.d.ts +0 -33
- package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
- package/dist/nodes/geometry/mask-node.js +0 -66
- package/dist/nodes/geometry/mask-node.js.map +0 -1
- package/dist/nodes/geometry/path-node.d.ts +0 -26
- package/dist/nodes/geometry/path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/path-node.js +0 -52
- package/dist/nodes/geometry/path-node.js.map +0 -1
- package/dist/nodes/geometry/polygon-node.d.ts +0 -26
- package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygon-node.js +0 -47
- package/dist/nodes/geometry/polygon-node.js.map +0 -1
- package/dist/nodes/geometry/polygram-node.d.ts +0 -33
- package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygram-node.js +0 -52
- package/dist/nodes/geometry/polygram-node.js.map +0 -1
- package/dist/nodes/geometry/rect-node.d.ts +0 -38
- package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
- package/dist/nodes/geometry/rect-node.js +0 -56
- package/dist/nodes/geometry/rect-node.js.map +0 -1
- package/dist/nodes/geometry/shape-node.d.ts +0 -71
- package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-node.js +0 -140
- package/dist/nodes/geometry/shape-node.js.map +0 -1
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -46
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -54
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -71
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -118
- package/dist/nodes/layout/camera-node.js.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
- package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.js +0 -118
- package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
- package/dist/nodes/layout/rotated-box.d.ts +0 -20
- package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
- package/dist/nodes/layout/rotated-box.js +0 -76
- package/dist/nodes/layout/rotated-box.js.map +0 -1
- package/dist/nodes/media/video-node.d.ts +0 -229
- package/dist/nodes/media/video-node.d.ts.map +0 -1
- package/dist/nodes/media/video-node.js +0 -348
- package/dist/nodes/media/video-node.js.map +0 -1
- package/dist/nodes/node/declare-paints.d.ts +0 -19
- package/dist/nodes/node/declare-paints.d.ts.map +0 -1
- package/dist/nodes/node/declare-paints.js +0 -27
- package/dist/nodes/node/declare-paints.js.map +0 -1
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts +0 -47
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js +0 -63
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts +0 -29
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js +0 -43
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -100
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -140
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js.map +0 -1
- package/dist/nodes/text/number-node.d.ts +0 -94
- package/dist/nodes/text/number-node.d.ts.map +0 -1
- package/dist/nodes/text/number-node.js +0 -86
- package/dist/nodes/text/number-node.js.map +0 -1
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -73
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -144
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -135
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -504
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-node.d.ts +0 -84
- package/dist/nodes/text/text-node.d.ts.map +0 -1
- package/dist/nodes/text/text-node.js +0 -188
- package/dist/nodes/text/text-node.js.map +0 -1
- package/dist/nodes/text/text-selection.d.ts +0 -125
- package/dist/nodes/text/text-selection.d.ts.map +0 -1
- package/dist/nodes/text/text-selection.js +0 -209
- package/dist/nodes/text/text-selection.js.map +0 -1
- package/dist/nodes/three/camera-nodes.d.ts +0 -91
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -71
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -270
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -438
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -159
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -254
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -100
- package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
- package/dist/nodes/three/environment-nodes.js +0 -134
- package/dist/nodes/three/environment-nodes.js.map +0 -1
- package/dist/nodes/three/geometry-nodes.d.ts +0 -197
- package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
- package/dist/nodes/three/geometry-nodes.js +0 -322
- package/dist/nodes/three/geometry-nodes.js.map +0 -1
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js.map +0 -1
- package/dist/nodes/three/group3d.d.ts +0 -23
- package/dist/nodes/three/group3d.d.ts.map +0 -1
- package/dist/nodes/three/group3d.js +0 -21
- package/dist/nodes/three/group3d.js.map +0 -1
- package/dist/nodes/three/light-nodes.d.ts +0 -120
- package/dist/nodes/three/light-nodes.d.ts.map +0 -1
- package/dist/nodes/three/light-nodes.js +0 -173
- package/dist/nodes/three/light-nodes.js.map +0 -1
- package/dist/nodes/three/mesh3d.d.ts +0 -117
- package/dist/nodes/three/mesh3d.d.ts.map +0 -1
- package/dist/nodes/three/mesh3d.js +0 -147
- package/dist/nodes/three/mesh3d.js.map +0 -1
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js.map +0 -1
- package/dist/render/descriptors/latex.d.ts +0 -6
- package/dist/render/descriptors/latex.d.ts.map +0 -1
- package/dist/render/descriptors/latex.js +0 -2
- package/dist/render/descriptors/latex.js.map +0 -1
- package/dist/tween/seekable.d.ts +0 -70
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -122
- package/dist/tween/seekable.js.map +0 -1
- /package/dist/{nodes → components/builtins}/text/number-pattern.d.ts +0 -0
- /package/dist/{nodes → components/builtins}/text/number-pattern.js +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.d.ts +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.js +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { type Vector2 } from "../../../attributes/layout/vector2.js";
|
|
2
|
+
import type { Color } from "../../../attributes/shape/fill/color/parser.js";
|
|
3
|
+
import type { AssetScope } from "../../../assets/scope.js";
|
|
4
|
+
import type { EffectAxis, EffectData, EffectMode, EffectOptions, EffectSurface, ModedEffect } from "./effect-data.js";
|
|
5
|
+
/**
|
|
6
|
+
* How a parameter's value is shaped, which decides its default interpolation,
|
|
7
|
+
* equality and how a renderer encodes it into a uniform.
|
|
8
|
+
*/
|
|
9
|
+
export type EffectParamKind = "number" | "color" | "vec2" | "enum" | "boolean" | "axis" | "text" | "colors" | "numbers" | "points" | "table" | "uniforms";
|
|
10
|
+
/** What a number measures, for a host's units and a renderer's scaling. */
|
|
11
|
+
export type EffectParamUnit = "px" | "deg" | "percent" | "factor" | "normalized";
|
|
12
|
+
/** The picker family an effect is listed under. */
|
|
13
|
+
export type EffectGroup = "blur" | "light" | "color" | "stylize" | "distort" | "glitch";
|
|
14
|
+
/** The control an inspector should draw for a parameter. */
|
|
15
|
+
export type EffectParamControl = "number" | "slider" | "angle" | "hue" | "segmented" | "select" | "text" | "color" | "point" | "toggle";
|
|
16
|
+
/** Per-parameter inspector hints. None of them changes what the effect does. */
|
|
17
|
+
export interface EffectParamHints {
|
|
18
|
+
/** i18n leaf for the field's label; defaults to the parameter name. */
|
|
19
|
+
readonly label?: string;
|
|
20
|
+
readonly control?: EffectParamControl;
|
|
21
|
+
/** Shown on the effect's row beside its name (one per effect). */
|
|
22
|
+
readonly inline?: boolean;
|
|
23
|
+
/** Inspector position; defaults to the declaration order. */
|
|
24
|
+
readonly order?: number;
|
|
25
|
+
/** For an angle: where 0° points (the bearing turns clockwise). Defaults to `"right"`. */
|
|
26
|
+
readonly zero?: "right" | "top";
|
|
27
|
+
/** i18n group for an enum's option labels. */
|
|
28
|
+
readonly optionsLabel?: string;
|
|
29
|
+
/** Not offered as a field: the value a fresh effect carries is kept as is. */
|
|
30
|
+
readonly hidden?: boolean;
|
|
31
|
+
/** Where a freshly inserted effect starts, when the builder default would show nothing. */
|
|
32
|
+
readonly initial?: unknown;
|
|
33
|
+
}
|
|
34
|
+
/** Interpolates one parameter. `from`/`to` are the whole effects, for parameters that depend on a sibling. */
|
|
35
|
+
export type EffectParamLerp<T> = (a: T, b: T, t: number, from: Record<string, unknown>, to: Record<string, unknown>) => T;
|
|
36
|
+
/**
|
|
37
|
+
* One parameter of a built-in effect: a stored field of the effect object.
|
|
38
|
+
*
|
|
39
|
+
* `T` is the stored type, `In` what a builder accepts for it (`normalize` maps
|
|
40
|
+
* one to the other: a bare number for a per-axis count, say). Only the
|
|
41
|
+
* serialisable fields reach {@link EffectDescriptor}.
|
|
42
|
+
*/
|
|
43
|
+
export interface EffectParamDef<T = unknown, In = T> extends EffectParamHints {
|
|
44
|
+
readonly kind: EffectParamKind;
|
|
45
|
+
/** What the builder writes when the option is omitted (an input, before `normalize`). */
|
|
46
|
+
readonly default?: In;
|
|
47
|
+
/** The stored field may be absent (`colorAdjustment`'s fields, `curves.channel`). */
|
|
48
|
+
readonly optional?: boolean;
|
|
49
|
+
/** The builder's options type requires it. */
|
|
50
|
+
readonly required?: boolean;
|
|
51
|
+
readonly min?: number;
|
|
52
|
+
readonly max?: number;
|
|
53
|
+
readonly step?: number;
|
|
54
|
+
readonly unit?: EffectParamUnit;
|
|
55
|
+
/** An enum's values, in the order a renderer indexes them. */
|
|
56
|
+
readonly options?: readonly (string | number)[];
|
|
57
|
+
readonly normalize?: (input: In) => T;
|
|
58
|
+
/** `"step"` switches at the midpoint; omitted uses the kind's interpolation. */
|
|
59
|
+
readonly lerp?: "step" | EffectParamLerp<T>;
|
|
60
|
+
readonly equals?: (a: T, b: T) => boolean;
|
|
61
|
+
/** Type carrier only; never set. */
|
|
62
|
+
readonly __type?: [T, In];
|
|
63
|
+
}
|
|
64
|
+
/** An effect's parameters, by stored field name, in builder (and stored-key) order. */
|
|
65
|
+
export type EffectParamTable = Readonly<Record<string, EffectParamDef<any, any>>>;
|
|
66
|
+
/**
|
|
67
|
+
* The declarative definition of a built-in effect: its parameters (types,
|
|
68
|
+
* defaults, ranges, inspector hints) plus the behaviour that has to stay code.
|
|
69
|
+
* Core's types, builder defaults, `lerp`/`equals` and the host-facing
|
|
70
|
+
* {@link EffectDescriptor} are derived from it, and the renderers bind their
|
|
71
|
+
* shader uniforms to its parameter names.
|
|
72
|
+
*/
|
|
73
|
+
export interface EffectSpec<T extends string = string, P extends EffectParamTable = EffectParamTable> {
|
|
74
|
+
readonly type: T;
|
|
75
|
+
readonly params: P;
|
|
76
|
+
readonly group: EffectGroup;
|
|
77
|
+
/** The option a bare number passed to the builder sets. */
|
|
78
|
+
readonly scalar?: string;
|
|
79
|
+
/** The builder's `mode` when none is given. */
|
|
80
|
+
readonly defaultMode?: EffectMode;
|
|
81
|
+
/** The one layer the effect does anything on. */
|
|
82
|
+
readonly onlyOn?: EffectMode;
|
|
83
|
+
/** Builder options at which the effect draws nothing, or `null` when it has none. */
|
|
84
|
+
readonly neutral: Readonly<Record<string, unknown>> | null;
|
|
85
|
+
readonly surface?: EffectData<any>["surface"];
|
|
86
|
+
readonly resolve?: (effect: any) => any;
|
|
87
|
+
readonly declare?: (effect: any, assets: AssetScope) => void;
|
|
88
|
+
/** Wraps or replaces the derived interpolation, which it is handed as `derived`. */
|
|
89
|
+
readonly lerp?: (from: any, to: any, t: number, derived: (from: any, to: any, t: number) => any) => any;
|
|
90
|
+
readonly equals?: (a: any, b: any) => boolean;
|
|
91
|
+
}
|
|
92
|
+
type ParamValue<D> = D extends {
|
|
93
|
+
readonly __type?: [infer T, unknown];
|
|
94
|
+
} ? T : never;
|
|
95
|
+
type ParamInput<D> = D extends {
|
|
96
|
+
readonly __type?: [unknown, infer I];
|
|
97
|
+
} ? I : never;
|
|
98
|
+
type IsOptional<D> = D extends {
|
|
99
|
+
readonly optional: true;
|
|
100
|
+
} ? true : false;
|
|
101
|
+
type IsRequired<D> = D extends {
|
|
102
|
+
readonly required: true;
|
|
103
|
+
} ? true : false;
|
|
104
|
+
/** The stored fields an effect's parameters describe. */
|
|
105
|
+
export type EffectFields<P extends EffectParamTable> = {
|
|
106
|
+
-readonly [K in keyof P as IsOptional<P[K]> extends true ? never : K]: ParamValue<P[K]>;
|
|
107
|
+
} & {
|
|
108
|
+
-readonly [K in keyof P as IsOptional<P[K]> extends true ? K : never]?: ParamValue<P[K]>;
|
|
109
|
+
};
|
|
110
|
+
/** A builder's options for an effect: every parameter as input, plus `mode`/`clip`. */
|
|
111
|
+
export type EffectOptionsOf<P extends EffectParamTable> = {
|
|
112
|
+
-readonly [K in keyof P as IsRequired<P[K]> extends true ? K : never]: ParamInput<P[K]>;
|
|
113
|
+
} & {
|
|
114
|
+
-readonly [K in keyof P as IsRequired<P[K]> extends true ? never : K]?: ParamInput<P[K]>;
|
|
115
|
+
} & EffectOptions;
|
|
116
|
+
/** The effect object a spec describes. */
|
|
117
|
+
export type EffectOf<S extends EffectSpec> = {
|
|
118
|
+
type: S["type"];
|
|
119
|
+
} & ModedEffect & EffectFields<S["params"]>;
|
|
120
|
+
/** Declares a built-in effect; see {@link EffectSpec}. */
|
|
121
|
+
export declare function defineEffect<const T extends string, const P extends EffectParamTable>(spec: EffectSpec<T, P>): EffectSpec<T, P>;
|
|
122
|
+
/** The middle of the layer, every centre option's default. Shared, as it always was. */
|
|
123
|
+
export declare const CENTER: Vector2;
|
|
124
|
+
type Options<T, In = T> = Omit<EffectParamDef<T, In>, "kind" | "__type" | "options" | "normalize" | "lerp" | "equals">;
|
|
125
|
+
type Behaviour<T> = Pick<EffectParamDef<T>, "lerp" | "equals">;
|
|
126
|
+
/** Parameter constructors for {@link defineEffect}. */
|
|
127
|
+
export declare const param: {
|
|
128
|
+
number<const O extends Options<number>>(o: O & Behaviour<number> & {
|
|
129
|
+
normalize?: (input: number) => number;
|
|
130
|
+
}): EffectParamDef<number> & NoInfer<O> & {
|
|
131
|
+
kind: "number";
|
|
132
|
+
};
|
|
133
|
+
color<const O extends Options<Color>>(o: O & Behaviour<Color>): EffectParamDef<Color> & NoInfer<O> & {
|
|
134
|
+
kind: "color";
|
|
135
|
+
};
|
|
136
|
+
/** A point or per-axis pair. `fromNumber` lets the builder take a bare number for it. */
|
|
137
|
+
vec2<const O extends Options<Vector2, number | Vector2> & {
|
|
138
|
+
fromNumber?: "both" | "y";
|
|
139
|
+
}>(o: O & Behaviour<Vector2>): EffectParamDef<Vector2, O extends {
|
|
140
|
+
fromNumber: string;
|
|
141
|
+
} ? number | Vector2 : Vector2> & NoInfer<O> & {
|
|
142
|
+
kind: "vec2";
|
|
143
|
+
};
|
|
144
|
+
choice<const V extends string | number, const O extends Options<V>>(options: readonly V[], o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & {
|
|
145
|
+
kind: "enum";
|
|
146
|
+
options: readonly V[];
|
|
147
|
+
};
|
|
148
|
+
boolean<const O extends Options<boolean>>(o: O & Behaviour<boolean>): EffectParamDef<boolean> & NoInfer<O> & {
|
|
149
|
+
kind: "boolean";
|
|
150
|
+
};
|
|
151
|
+
axis<const O extends Options<EffectAxis>>(o: O & Behaviour<EffectAxis>): EffectParamDef<EffectAxis> & NoInfer<O> & {
|
|
152
|
+
kind: "axis";
|
|
153
|
+
};
|
|
154
|
+
text<V extends string = string, const O extends Options<V> = Options<V, V>>(o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & {
|
|
155
|
+
kind: "text";
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* A parameter of stored type `T` that no generic kind covers, curried so
|
|
159
|
+
* `T` is given and the options inferred: `param.of<Color[]>()({ kind: "colors", … })`.
|
|
160
|
+
* It steps and compares by `===` unless given `lerp`/`equals`.
|
|
161
|
+
*/
|
|
162
|
+
of<T>(): <const O extends Options<T> & {
|
|
163
|
+
kind: EffectParamKind;
|
|
164
|
+
}>(o: O & Behaviour<T>) => EffectParamDef<T> & NoInfer<O>;
|
|
165
|
+
};
|
|
166
|
+
/** The derived `EffectData` of a spec: generic per-kind `lerp`/`equals` unless the spec gives its own. */
|
|
167
|
+
export declare function effectDataOf<S extends EffectSpec>(spec: S): EffectData<EffectOf<S>>;
|
|
168
|
+
/**
|
|
169
|
+
* Builds an effect from builder input: the scalar shorthand, then each
|
|
170
|
+
* parameter's option or default (normalised), then `mode`/`clip`.
|
|
171
|
+
*/
|
|
172
|
+
export declare function buildEffect<S extends EffectSpec>(spec: S, arg: number | EffectOptionsOf<S["params"]> | undefined): EffectOf<S>;
|
|
173
|
+
/** A JSON value — what every field of an {@link EffectDescriptor} is made of. */
|
|
174
|
+
export type EffectJson = string | number | boolean | null | EffectJson[] | {
|
|
175
|
+
[key: string]: EffectJson;
|
|
176
|
+
};
|
|
177
|
+
/** One parameter of an {@link EffectDescriptor}. */
|
|
178
|
+
export interface EffectParamDescriptor {
|
|
179
|
+
/** The stored field it writes. */
|
|
180
|
+
name: string;
|
|
181
|
+
kind: EffectParamKind;
|
|
182
|
+
/** What the builder writes when it is omitted, as stored (colours as authored). */
|
|
183
|
+
default?: EffectJson;
|
|
184
|
+
/** The builder's options require it. */
|
|
185
|
+
required?: boolean;
|
|
186
|
+
/** The stored field may be absent. */
|
|
187
|
+
optional?: boolean;
|
|
188
|
+
min?: number;
|
|
189
|
+
max?: number;
|
|
190
|
+
step?: number;
|
|
191
|
+
unit?: EffectParamUnit;
|
|
192
|
+
options?: (string | number)[];
|
|
193
|
+
/** Tweens continuously (false: switches at the midpoint). */
|
|
194
|
+
animatable: boolean;
|
|
195
|
+
/** i18n leaf for the label; the name unless the spec says otherwise. */
|
|
196
|
+
label: string;
|
|
197
|
+
control?: EffectParamControl;
|
|
198
|
+
inline?: boolean;
|
|
199
|
+
/** Inspector position. */
|
|
200
|
+
order: number;
|
|
201
|
+
zero?: "right" | "top";
|
|
202
|
+
optionsLabel?: string;
|
|
203
|
+
hidden?: boolean;
|
|
204
|
+
initial?: EffectJson;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A built-in effect, described for a host: what its fields are, their kinds,
|
|
208
|
+
* defaults and ranges, and how an inspector should lay them out. Plain JSON, so
|
|
209
|
+
* it can be shipped to a UI as is.
|
|
210
|
+
*/
|
|
211
|
+
export interface EffectDescriptor {
|
|
212
|
+
type: string;
|
|
213
|
+
group: EffectGroup;
|
|
214
|
+
/** `"dynamic"`: depends on the effect's `mode` (the user shader). */
|
|
215
|
+
surface: EffectSurface | "dynamic";
|
|
216
|
+
scalar?: string;
|
|
217
|
+
defaultMode?: EffectMode;
|
|
218
|
+
onlyOn?: EffectMode;
|
|
219
|
+
/** Stored fields at which it draws nothing (the rest at their defaults); `null` when it has none. */
|
|
220
|
+
neutral: {
|
|
221
|
+
[key: string]: EffectJson;
|
|
222
|
+
} | null;
|
|
223
|
+
/** In stored-key order; sort by `order` for the inspector's. */
|
|
224
|
+
params: EffectParamDescriptor[];
|
|
225
|
+
}
|
|
226
|
+
/** The serialisable {@link EffectDescriptor} of a spec. */
|
|
227
|
+
export declare function describeSpec(spec: EffectSpec): EffectDescriptor;
|
|
228
|
+
export {};
|
|
229
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/spec.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGnH;;;GAGG;AACH,MAAM,MAAM,eAAe,GACrB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,CAAC;AAEjB,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEjF,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExF,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExI,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,KAA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,KAAK,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,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"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { lerpNumber } from "../../../tween/lerp.js";
|
|
2
|
+
import { lerpVector2 } from "../../../attributes/layout/vector2.js";
|
|
3
|
+
import { lerpColor } from "../../../attributes/shape/fill/lerp.js";
|
|
4
|
+
import { resolveEffectColor, sameEffectAxis, sameEffectColor, scalarOptions, withEffectOptions } from "./effect-data.js";
|
|
5
|
+
/** Declares a built-in effect; see {@link EffectSpec}. */
|
|
6
|
+
export function defineEffect(spec) {
|
|
7
|
+
return spec;
|
|
8
|
+
}
|
|
9
|
+
/** The middle of the layer, every centre option's default. Shared, as it always was. */
|
|
10
|
+
export const CENTER = { x: 0.5, y: 0.5 };
|
|
11
|
+
/** Parameter constructors for {@link defineEffect}. */
|
|
12
|
+
export const param = {
|
|
13
|
+
number(o) {
|
|
14
|
+
return { kind: "number", ...o };
|
|
15
|
+
},
|
|
16
|
+
color(o) {
|
|
17
|
+
return { kind: "color", ...o };
|
|
18
|
+
},
|
|
19
|
+
/** A point or per-axis pair. `fromNumber` lets the builder take a bare number for it. */
|
|
20
|
+
vec2(o) {
|
|
21
|
+
const normalize = o.fromNumber === undefined
|
|
22
|
+
? undefined
|
|
23
|
+
: o.fromNumber === "both"
|
|
24
|
+
? (v) => (typeof v === "number" ? { x: v, y: v } : v)
|
|
25
|
+
: (v) => (typeof v === "number" ? { x: 0, y: v } : v);
|
|
26
|
+
return { kind: "vec2", ...(normalize ? { normalize } : {}), ...o };
|
|
27
|
+
},
|
|
28
|
+
choice(options, o) {
|
|
29
|
+
return { kind: "enum", options, lerp: "step", ...o };
|
|
30
|
+
},
|
|
31
|
+
boolean(o) {
|
|
32
|
+
return { kind: "boolean", lerp: "step", ...o };
|
|
33
|
+
},
|
|
34
|
+
axis(o) {
|
|
35
|
+
return { kind: "axis", lerp: "step", ...o };
|
|
36
|
+
},
|
|
37
|
+
text(o) {
|
|
38
|
+
return { kind: "text", lerp: "step", ...o };
|
|
39
|
+
},
|
|
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
|
+
*/
|
|
45
|
+
of() {
|
|
46
|
+
return (o) => ({ lerp: "step", ...o });
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const step = (a, b, t) => (t < 0.5 ? a : b);
|
|
50
|
+
const same = (a, b) => a === b;
|
|
51
|
+
const sameVector = (a, b) => a.x === b.x && a.y === b.y;
|
|
52
|
+
const KIND_LERP = {
|
|
53
|
+
number: lerpNumber,
|
|
54
|
+
color: (a, b, t) => lerpColor(resolveEffectColor(a), resolveEffectColor(b), t),
|
|
55
|
+
vec2: lerpVector2,
|
|
56
|
+
};
|
|
57
|
+
const KIND_EQUALS = {
|
|
58
|
+
color: sameEffectColor,
|
|
59
|
+
vec2: sameVector,
|
|
60
|
+
axis: sameEffectAxis,
|
|
61
|
+
};
|
|
62
|
+
function paramLerp(def) {
|
|
63
|
+
if (typeof def.lerp === "function")
|
|
64
|
+
return def.lerp;
|
|
65
|
+
const kind = def.lerp === "step" ? undefined : KIND_LERP[def.kind];
|
|
66
|
+
if (!kind)
|
|
67
|
+
return step;
|
|
68
|
+
// An absent optional field tweens from what it means when absent.
|
|
69
|
+
if (def.optional && def.default !== undefined) {
|
|
70
|
+
const fallback = def.default;
|
|
71
|
+
return (a, b, t, from, to) => kind(a ?? fallback, b ?? fallback, t, from, to);
|
|
72
|
+
}
|
|
73
|
+
return kind;
|
|
74
|
+
}
|
|
75
|
+
/** The derived `EffectData` of a spec: generic per-kind `lerp`/`equals` unless the spec gives its own. */
|
|
76
|
+
export function effectDataOf(spec) {
|
|
77
|
+
const entries = Object.entries(spec.params);
|
|
78
|
+
const lerps = entries.map(([name, def]) => [name, paramLerp(def)]);
|
|
79
|
+
const equals = entries.map(([name, def]) => [name, def.equals ?? KIND_EQUALS[def.kind] ?? same]);
|
|
80
|
+
const derived = (from, to, t) => {
|
|
81
|
+
const out = { type: spec.type };
|
|
82
|
+
const f = from;
|
|
83
|
+
const g = to;
|
|
84
|
+
for (const [name, lerp] of lerps)
|
|
85
|
+
out[name] = lerp(f[name], g[name], t, f, g);
|
|
86
|
+
return out;
|
|
87
|
+
};
|
|
88
|
+
const custom = spec.lerp;
|
|
89
|
+
const data = {
|
|
90
|
+
lerp: custom ? (from, to, t) => custom(from, to, t, derived) : derived,
|
|
91
|
+
equals: spec.equals ?? ((a, b) => {
|
|
92
|
+
const x = a;
|
|
93
|
+
const y = b;
|
|
94
|
+
return equals.every(([name, eq]) => eq(x[name], y[name]));
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
if (spec.surface !== undefined)
|
|
98
|
+
data.surface = spec.surface;
|
|
99
|
+
if (spec.resolve)
|
|
100
|
+
data.resolve = spec.resolve;
|
|
101
|
+
if (spec.declare)
|
|
102
|
+
data.declare = spec.declare;
|
|
103
|
+
return data;
|
|
104
|
+
}
|
|
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.
|
|
107
|
+
const copyDefault = (value) => (Array.isArray(value) ? [...value] : value);
|
|
108
|
+
/**
|
|
109
|
+
* Builds an effect from builder input: the scalar shorthand, then each
|
|
110
|
+
* parameter's option or default (normalised), then `mode`/`clip`.
|
|
111
|
+
*/
|
|
112
|
+
export function buildEffect(spec, arg) {
|
|
113
|
+
const o = (spec.scalar
|
|
114
|
+
? scalarOptions(arg, spec.scalar)
|
|
115
|
+
: (arg ?? {}));
|
|
116
|
+
const out = { type: spec.type };
|
|
117
|
+
for (const [name, def] of Object.entries(spec.params)) {
|
|
118
|
+
const value = o[name] ?? copyDefault(def.default);
|
|
119
|
+
if (value === undefined)
|
|
120
|
+
continue;
|
|
121
|
+
out[name] = def.normalize ? def.normalize(value) : value;
|
|
122
|
+
}
|
|
123
|
+
const options = spec.defaultMode && o.mode === undefined ? { ...o, mode: spec.defaultMode } : o;
|
|
124
|
+
return withEffectOptions(out, options);
|
|
125
|
+
}
|
|
126
|
+
const json = (value) => value === undefined ? undefined : JSON.parse(JSON.stringify(value));
|
|
127
|
+
/** The serialisable {@link EffectDescriptor} of a spec. */
|
|
128
|
+
export function describeSpec(spec) {
|
|
129
|
+
const params = Object.entries(spec.params).map(([name, def], index) => {
|
|
130
|
+
const stored = def.default !== undefined && def.normalize ? def.normalize(def.default) : def.default;
|
|
131
|
+
const out = {
|
|
132
|
+
name,
|
|
133
|
+
kind: def.kind,
|
|
134
|
+
animatable: def.lerp !== "step",
|
|
135
|
+
label: def.label ?? name,
|
|
136
|
+
order: def.order ?? index,
|
|
137
|
+
};
|
|
138
|
+
const optional = {
|
|
139
|
+
default: json(stored),
|
|
140
|
+
required: def.required,
|
|
141
|
+
optional: def.optional,
|
|
142
|
+
min: def.min,
|
|
143
|
+
max: def.max,
|
|
144
|
+
step: def.step,
|
|
145
|
+
unit: def.unit,
|
|
146
|
+
options: def.options ? [...def.options] : undefined,
|
|
147
|
+
control: def.control,
|
|
148
|
+
inline: def.inline,
|
|
149
|
+
zero: def.zero,
|
|
150
|
+
optionsLabel: def.optionsLabel,
|
|
151
|
+
hidden: def.hidden,
|
|
152
|
+
initial: json(def.initial),
|
|
153
|
+
};
|
|
154
|
+
for (const [key, value] of Object.entries(optional)) {
|
|
155
|
+
if (value !== undefined)
|
|
156
|
+
out[key] = value;
|
|
157
|
+
}
|
|
158
|
+
return out;
|
|
159
|
+
});
|
|
160
|
+
const out = {
|
|
161
|
+
type: spec.type,
|
|
162
|
+
group: spec.group,
|
|
163
|
+
surface: typeof spec.surface === "function" ? "dynamic" : (spec.surface ?? "filter"),
|
|
164
|
+
neutral: spec.neutral === null ? null : json(Object.fromEntries(Object.entries(spec.neutral).map(([name, value]) => {
|
|
165
|
+
const normalize = spec.params[name]?.normalize;
|
|
166
|
+
return [name, normalize ? normalize(value) : value];
|
|
167
|
+
}))),
|
|
168
|
+
params,
|
|
169
|
+
};
|
|
170
|
+
if (spec.scalar)
|
|
171
|
+
out.scalar = spec.scalar;
|
|
172
|
+
if (spec.defaultMode)
|
|
173
|
+
out.defaultMode = spec.defaultMode;
|
|
174
|
+
if (spec.onlyOn)
|
|
175
|
+
out.onlyOn = spec.onlyOn;
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,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AE;YAChH,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;YAC/C,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC,CAAmC;QACtC,MAAM;KACT,CAAC;IACF,IAAI,IAAI,CAAC,MAAM;QAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1C,IAAI,IAAI,CAAC,WAAW;QAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACzD,IAAI,IAAI,CAAC,MAAM;QAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1C,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { AssetScope } from \"@/assets/scope\";\nimport type { EffectAxis, EffectData, EffectMode, EffectOptions, EffectSurface, ModedEffect } from \"./effect-data\";\nimport { resolveEffectColor, sameEffectAxis, sameEffectColor, scalarOptions, withEffectOptions } from \"./effect-data\";\n\n/**\n * How a parameter's value is shaped, which decides its default interpolation,\n * equality and how a renderer encodes it into a uniform.\n */\nexport type EffectParamKind =\n | \"number\"\n | \"color\"\n | \"vec2\"\n | \"enum\"\n | \"boolean\"\n | \"axis\"\n | \"text\"\n | \"colors\"\n | \"numbers\"\n | \"points\"\n | \"table\"\n | \"uniforms\";\n\n/** What a number measures, for a host's units and a renderer's scaling. */\nexport type EffectParamUnit = \"px\" | \"deg\" | \"percent\" | \"factor\" | \"normalized\";\n\n/** The picker family an effect is listed under. */\nexport type EffectGroup = \"blur\" | \"light\" | \"color\" | \"stylize\" | \"distort\" | \"glitch\";\n\n/** The control an inspector should draw for a parameter. */\nexport type EffectParamControl = \"number\" | \"slider\" | \"angle\" | \"hue\" | \"segmented\" | \"select\" | \"text\" | \"color\" | \"point\" | \"toggle\";\n\n/** Per-parameter inspector hints. None of them changes what the effect does. */\nexport interface EffectParamHints {\n /** i18n leaf for the field's label; defaults to the parameter name. */\n readonly label?: string;\n readonly control?: EffectParamControl;\n /** Shown on the effect's row beside its name (one per effect). */\n readonly inline?: boolean;\n /** Inspector position; defaults to the declaration order. */\n readonly order?: number;\n /** For an angle: where 0° points (the bearing turns clockwise). Defaults to `\"right\"`. */\n readonly zero?: \"right\" | \"top\";\n /** i18n group for an enum's option labels. */\n readonly optionsLabel?: string;\n /** Not offered as a field: the value a fresh effect carries is kept as is. */\n readonly hidden?: boolean;\n /** Where a freshly inserted effect starts, when the builder default would show nothing. */\n readonly initial?: unknown;\n}\n\n/** Interpolates one parameter. `from`/`to` are the whole effects, for parameters that depend on a sibling. */\nexport type EffectParamLerp<T> = (a: T, b: T, t: number, from: Record<string, unknown>, to: Record<string, unknown>) => T;\n\n/**\n * One parameter of a built-in effect: a stored field of the effect object.\n *\n * `T` is the stored type, `In` what a builder accepts for it (`normalize` maps\n * one to the other: a bare number for a per-axis count, say). Only the\n * serialisable fields reach {@link EffectDescriptor}.\n */\nexport interface EffectParamDef<T = unknown, In = T> extends EffectParamHints {\n readonly kind: EffectParamKind;\n /** What the builder writes when the option is omitted (an input, before `normalize`). */\n readonly default?: In;\n /** The stored field may be absent (`colorAdjustment`'s fields, `curves.channel`). */\n readonly optional?: boolean;\n /** The builder's options type requires it. */\n readonly required?: boolean;\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n readonly unit?: EffectParamUnit;\n /** An enum's values, in the order a renderer indexes them. */\n readonly options?: readonly (string | number)[];\n readonly normalize?: (input: In) => T;\n /** `\"step\"` switches at the midpoint; omitted uses the kind's interpolation. */\n readonly lerp?: \"step\" | EffectParamLerp<T>;\n readonly equals?: (a: T, b: T) => boolean;\n /** Type carrier only; never set. */\n readonly __type?: [T, In];\n}\n\n/** An effect's parameters, by stored field name, in builder (and stored-key) order. */\nexport type EffectParamTable = Readonly<Record<string, EffectParamDef<any, any>>>;\n\n/**\n * The declarative definition of a built-in effect: its parameters (types,\n * defaults, ranges, inspector hints) plus the behaviour that has to stay code.\n * Core's types, builder defaults, `lerp`/`equals` and the host-facing\n * {@link EffectDescriptor} are derived from it, and the renderers bind their\n * shader uniforms to its parameter names.\n */\nexport interface EffectSpec<T extends string = string, P extends EffectParamTable = EffectParamTable> {\n readonly type: T;\n readonly params: P;\n readonly group: EffectGroup;\n /** The option a bare number passed to the builder sets. */\n readonly scalar?: string;\n /** The builder's `mode` when none is given. */\n readonly defaultMode?: EffectMode;\n /** The one layer the effect does anything on. */\n readonly onlyOn?: EffectMode;\n /** Builder options at which the effect draws nothing, or `null` when it has none. */\n readonly neutral: Readonly<Record<string, unknown>> | null;\n readonly surface?: EffectData<any>[\"surface\"];\n readonly resolve?: (effect: any) => any;\n readonly declare?: (effect: any, assets: AssetScope) => void;\n /** Wraps or replaces the derived interpolation, which it is handed as `derived`. */\n readonly lerp?: (from: any, to: any, t: number, derived: (from: any, to: any, t: number) => any) => any;\n readonly equals?: (a: any, b: any) => boolean;\n}\n\ntype ParamValue<D> = D extends { readonly __type?: [infer T, unknown] } ? T : never;\ntype ParamInput<D> = D extends { readonly __type?: [unknown, infer I] } ? I : never;\ntype IsOptional<D> = D extends { readonly optional: true } ? true : false;\ntype IsRequired<D> = D extends { readonly required: true } ? true : false;\n\n/** The stored fields an effect's parameters describe. */\nexport type EffectFields<P extends EffectParamTable> = {\n -readonly [K in keyof P as IsOptional<P[K]> extends true ? never : K]: ParamValue<P[K]>;\n} & {\n -readonly [K in keyof P as IsOptional<P[K]> extends true ? K : never]?: ParamValue<P[K]>;\n};\n\n/** A builder's options for an effect: every parameter as input, plus `mode`/`clip`. */\nexport type EffectOptionsOf<P extends EffectParamTable> = {\n -readonly [K in keyof P as IsRequired<P[K]> extends true ? K : never]: ParamInput<P[K]>;\n} & {\n -readonly [K in keyof P as IsRequired<P[K]> extends true ? never : K]?: ParamInput<P[K]>;\n} & EffectOptions;\n\n/** The effect object a spec describes. */\nexport type EffectOf<S extends EffectSpec> = { type: S[\"type\"] } & ModedEffect & EffectFields<S[\"params\"]>;\n\n/** Declares a built-in effect; see {@link EffectSpec}. */\nexport function defineEffect<const T extends string, const P extends EffectParamTable>(\n spec: EffectSpec<T, P>,\n): EffectSpec<T, P> {\n return spec;\n}\n\n/** The middle of the layer, every centre option's default. Shared, as it always was. */\nexport const CENTER: Vector2 = { x: 0.5, y: 0.5 };\n\ntype Options<T, In = T> = Omit<EffectParamDef<T, In>, \"kind\" | \"__type\" | \"options\" | \"normalize\" | \"lerp\" | \"equals\">;\n// Kept out of the inferred options so a lambda here is typed by its parameter.\ntype Behaviour<T> = Pick<EffectParamDef<T>, \"lerp\" | \"equals\">;\n\n/** Parameter constructors for {@link defineEffect}. */\nexport const param = {\n number<const O extends Options<number>>(o: O & Behaviour<number> & { normalize?: (input: number) => number }): EffectParamDef<number> & NoInfer<O> & { kind: \"number\" } {\n return { kind: \"number\", ...o };\n },\n color<const O extends Options<Color>>(o: O & Behaviour<Color>): EffectParamDef<Color> & NoInfer<O> & { kind: \"color\" } {\n return { kind: \"color\", ...o };\n },\n /** A point or per-axis pair. `fromNumber` lets the builder take a bare number for it. */\n vec2<const O extends Options<Vector2, number | Vector2> & { fromNumber?: \"both\" | \"y\" }>(\n o: O & Behaviour<Vector2>,\n ): EffectParamDef<Vector2, O extends { fromNumber: string } ? number | Vector2 : Vector2> & NoInfer<O> & { kind: \"vec2\" } {\n const normalize = o.fromNumber === undefined\n ? undefined\n : o.fromNumber === \"both\"\n ? (v: number | Vector2) => (typeof v === \"number\" ? { x: v, y: v } : v)\n : (v: number | Vector2) => (typeof v === \"number\" ? { x: 0, y: v } : v);\n return { kind: \"vec2\", ...(normalize ? { normalize } : {}), ...o } as never;\n },\n choice<const V extends string | number, const O extends Options<V>>(\n options: readonly V[],\n o: O & Behaviour<V>,\n ): EffectParamDef<V> & NoInfer<O> & { kind: \"enum\"; options: readonly V[] } {\n return { kind: \"enum\", options, lerp: \"step\", ...o };\n },\n boolean<const O extends Options<boolean>>(o: O & Behaviour<boolean>): EffectParamDef<boolean> & NoInfer<O> & { kind: \"boolean\" } {\n return { kind: \"boolean\", lerp: \"step\", ...o };\n },\n axis<const O extends Options<EffectAxis>>(o: O & Behaviour<EffectAxis>): EffectParamDef<EffectAxis> & NoInfer<O> & { kind: \"axis\" } {\n return { kind: \"axis\", lerp: \"step\", ...o };\n },\n text<V extends string = string, const O extends Options<V> = Options<V>>(o: O & Behaviour<V>): EffectParamDef<V> & NoInfer<O> & { kind: \"text\" } {\n return { kind: \"text\", lerp: \"step\", ...o };\n },\n /**\n * A parameter of stored type `T` that no generic kind covers, curried so\n * `T` is given and the options inferred: `param.of<Color[]>()({ kind: \"colors\", … })`.\n * It steps and compares by `===` unless given `lerp`/`equals`.\n */\n of<T>() {\n return <const O extends Options<T> & { kind: EffectParamKind }>(o: O & Behaviour<T>): EffectParamDef<T> & NoInfer<O> =>\n ({ lerp: \"step\", ...o }) as never;\n },\n};\n\nconst step = <T>(a: T, b: T, t: number): T => (t < 0.5 ? a : b);\nconst same = (a: unknown, b: unknown) => a === b;\nconst sameVector = (a: Vector2, b: Vector2) => a.x === b.x && a.y === b.y;\n\nconst KIND_LERP: Partial<Record<EffectParamKind, EffectParamLerp<any>>> = {\n number: lerpNumber,\n color: (a: Color, b: Color, t) => lerpColor(resolveEffectColor(a), resolveEffectColor(b), t),\n vec2: lerpVector2,\n};\n\nconst KIND_EQUALS: Partial<Record<EffectParamKind, (a: any, b: any) => boolean>> = {\n color: sameEffectColor,\n vec2: sameVector,\n axis: sameEffectAxis,\n};\n\nfunction paramLerp(def: EffectParamDef<any, any>): EffectParamLerp<unknown> {\n if (typeof def.lerp === \"function\") return def.lerp;\n const kind = def.lerp === \"step\" ? undefined : KIND_LERP[def.kind];\n if (!kind) return step;\n // An absent optional field tweens from what it means when absent.\n if (def.optional && def.default !== undefined) {\n const fallback = def.default;\n return (a, b, t, from, to) => kind(a ?? fallback, b ?? fallback, t, from, to);\n }\n return kind;\n}\n\n/** The derived `EffectData` of a spec: generic per-kind `lerp`/`equals` unless the spec gives its own. */\nexport function effectDataOf<S extends EffectSpec>(spec: S): EffectData<EffectOf<S>> {\n const entries = Object.entries(spec.params);\n const lerps = entries.map(([name, def]) => [name, paramLerp(def)] as const);\n const equals = entries.map(([name, def]) => [name, def.equals ?? KIND_EQUALS[def.kind] ?? same] as const);\n const derived = (from: EffectOf<S>, to: EffectOf<S>, t: number): EffectOf<S> => {\n const out: Record<string, unknown> = { type: spec.type };\n const f = from as unknown as Record<string, unknown>;\n const g = to as unknown as Record<string, unknown>;\n for (const [name, lerp] of lerps) out[name] = lerp(f[name], g[name], t, f, g);\n return out as EffectOf<S>;\n };\n const custom = spec.lerp;\n const data: EffectData<EffectOf<S>> = {\n lerp: custom ? (from, to, t) => custom(from, to, t, derived) : derived,\n equals: spec.equals ?? ((a, b) => {\n const x = a as unknown as Record<string, unknown>;\n const y = b as unknown as Record<string, unknown>;\n return equals.every(([name, eq]) => eq(x[name], y[name]));\n }),\n };\n if (spec.surface !== undefined) data.surface = spec.surface;\n if (spec.resolve) data.resolve = spec.resolve;\n if (spec.declare) data.declare = spec.declare;\n return data;\n}\n\n// Arrays are copied so editing one effect's list never reaches another's;\n// objects (a centre point) are shared, as they always were.\nconst copyDefault = (value: unknown) => (Array.isArray(value) ? [...value] : value);\n\n/**\n * Builds an effect from builder input: the scalar shorthand, then each\n * parameter's option or default (normalised), then `mode`/`clip`.\n */\nexport function buildEffect<S extends EffectSpec>(\n spec: S,\n arg: number | EffectOptionsOf<S[\"params\"]> | undefined,\n): EffectOf<S> {\n const o = (spec.scalar\n ? scalarOptions(arg as number | Record<string, unknown> | undefined, spec.scalar as never)\n : (arg ?? {})) as Record<string, unknown> & EffectOptions;\n const out: Record<string, unknown> = { type: spec.type };\n for (const [name, def] of Object.entries(spec.params)) {\n const value = o[name] ?? copyDefault(def.default);\n if (value === undefined) continue;\n out[name] = def.normalize ? def.normalize(value) : value;\n }\n const options = spec.defaultMode && o.mode === undefined ? { ...o, mode: spec.defaultMode } : o;\n return withEffectOptions(out, options) as unknown as EffectOf<S>;\n}\n\n/** A JSON value — what every field of an {@link EffectDescriptor} is made of. */\nexport type EffectJson = string | number | boolean | null | EffectJson[] | { [key: string]: EffectJson };\n\n/** One parameter of an {@link EffectDescriptor}. */\nexport interface EffectParamDescriptor {\n /** The stored field it writes. */\n name: string;\n kind: EffectParamKind;\n /** What the builder writes when it is omitted, as stored (colours as authored). */\n default?: EffectJson;\n /** The builder's options require it. */\n required?: boolean;\n /** The stored field may be absent. */\n optional?: boolean;\n min?: number;\n max?: number;\n step?: number;\n unit?: EffectParamUnit;\n options?: (string | number)[];\n /** Tweens continuously (false: switches at the midpoint). */\n animatable: boolean;\n /** i18n leaf for the label; the name unless the spec says otherwise. */\n label: string;\n control?: EffectParamControl;\n inline?: boolean;\n /** Inspector position. */\n order: number;\n zero?: \"right\" | \"top\";\n optionsLabel?: string;\n hidden?: boolean;\n initial?: EffectJson;\n}\n\n/**\n * A built-in effect, described for a host: what its fields are, their kinds,\n * defaults and ranges, and how an inspector should lay them out. Plain JSON, so\n * it can be shipped to a UI as is.\n */\nexport interface EffectDescriptor {\n type: string;\n group: EffectGroup;\n /** `\"dynamic\"`: depends on the effect's `mode` (the user shader). */\n surface: EffectSurface | \"dynamic\";\n scalar?: string;\n defaultMode?: EffectMode;\n onlyOn?: EffectMode;\n /** Stored fields at which it draws nothing (the rest at their defaults); `null` when it has none. */\n neutral: { [key: string]: EffectJson } | null;\n /** In stored-key order; sort by `order` for the inspector's. */\n params: EffectParamDescriptor[];\n}\n\nconst json = (value: unknown): EffectJson | undefined =>\n value === undefined ? undefined : (JSON.parse(JSON.stringify(value)) as EffectJson);\n\n/** The serialisable {@link EffectDescriptor} of a spec. */\nexport function describeSpec(spec: EffectSpec): EffectDescriptor {\n const params = Object.entries(spec.params).map(([name, def], index): EffectParamDescriptor => {\n const stored = def.default !== undefined && def.normalize ? def.normalize(def.default) : def.default;\n const out: EffectParamDescriptor = {\n name,\n kind: def.kind,\n animatable: def.lerp !== \"step\",\n label: def.label ?? name,\n order: def.order ?? index,\n };\n const optional = {\n default: json(stored),\n required: def.required,\n optional: def.optional,\n min: def.min,\n max: def.max,\n step: def.step,\n unit: def.unit,\n options: def.options ? [...def.options] : undefined,\n control: def.control,\n inline: def.inline,\n zero: def.zero,\n optionsLabel: def.optionsLabel,\n hidden: def.hidden,\n initial: json(def.initial),\n };\n for (const [key, value] of Object.entries(optional)) {\n if (value !== undefined) (out as unknown as Record<string, unknown>)[key] = value;\n }\n return out;\n });\n const out: EffectDescriptor = {\n type: spec.type,\n group: spec.group,\n surface: typeof spec.surface === \"function\" ? \"dynamic\" : (spec.surface ?? \"filter\"),\n neutral: spec.neutral === null ? null : (json(Object.fromEntries(Object.entries(spec.neutral).map(([name, value]) => {\n const normalize = spec.params[name]?.normalize;\n return [name, normalize ? normalize(value) : value];\n }))) as { [key: string]: EffectJson }),\n params,\n };\n if (spec.scalar) out.scalar = spec.scalar;\n if (spec.defaultMode) out.defaultMode = spec.defaultMode;\n if (spec.onlyOn) out.onlyOn = spec.onlyOn;\n return out;\n}\n"]}
|
|
@@ -32,17 +32,13 @@ import type { BitCrushEffect } from "./implementations/bit-crush.js";
|
|
|
32
32
|
import type { AsciiEffect } from "./implementations/ascii.js";
|
|
33
33
|
import type { StreakEffect } from "./implementations/streak.js";
|
|
34
34
|
import type { GlowEffect } from "./implementations/glow.js";
|
|
35
|
-
import type { GodRaysEffect } from "./implementations/god-rays.js";
|
|
36
35
|
import type { OilPaintEffect } from "./implementations/oil-paint.js";
|
|
37
|
-
import type { TextureEffect } from "./implementations/texture.js";
|
|
38
|
-
import type { DisplaceEffect } from "./implementations/displace.js";
|
|
39
36
|
import type { WaveEffect } from "./implementations/wave.js";
|
|
40
37
|
import type { TwirlEffect } from "./implementations/twirl.js";
|
|
41
38
|
import type { ProgressiveBlurEffect } from "./implementations/progressive-blur.js";
|
|
42
39
|
import type { KaleidoscopeEffect } from "./implementations/kaleidoscope.js";
|
|
43
|
-
import type { TrailsEffect } from "./implementations/trails.js";
|
|
44
40
|
import type { GlassEffect } from "./implementations/glass.js";
|
|
45
41
|
import type { LutEffect } from "./implementations/lut.js";
|
|
46
|
-
/** Discriminated union of every effect type a
|
|
47
|
-
export type
|
|
42
|
+
/** Discriminated union of every effect type a node can carry. */
|
|
43
|
+
export type NodeEffect = BlurEffect | DirectionalBlurEffect | GrayscaleEffect | PixelateEffect | BulgeEffect | MagnifyEffect | BloomEffect | VintageEffect | ChromaticAberrationEffect | InvertEffect | ScatterEffect | PosterizeEffect | MotionBlurEffect | ShaderEffect | OutlineEffect | DropShadowEffect | VignetteEffect | GrainEffect | SharpenEffect | EdgesEffect | ThresholdEffect | RadialBlurEffect | HalftoneEffect | DitherEffect | DuotoneEffect | CurvesEffect | ColorAdjustmentEffect | RgbShiftEffect | ScanlinesEffect | BlockDisplaceEffect | BitCrushEffect | AsciiEffect | StreakEffect | GlowEffect | OilPaintEffect | WaveEffect | TwirlEffect | ProgressiveBlurEffect | KaleidoscopeEffect | GlassEffect | LutEffect;
|
|
48
44
|
//# sourceMappingURL=union.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAA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Y,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAChB,UAAU,GACV,qBAAqB,GACrB,eAAe,GACf,cAAc,GACd,WAAW,GACX,aAAa,GACb,WAAW,GACX,aAAa,GACb,yBAAyB,GACzB,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,WAAW,GACX,aAAa,GACb,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,qBAAqB,GACrB,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,WAAW,GACX,YAAY,GACZ,UAAU,GACV,cAAc,GACd,UAAU,GACV,WAAW,GACX,qBAAqB,GACrB,kBAAkB,GAClB,WAAW,GACX,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { BlurEffect } from \"./implementations/blur\";\nimport type { DirectionalBlurEffect } from \"./implementations/directional-blur\";\nimport type { GrayscaleEffect } from \"./implementations/grayscale\";\nimport type { PixelateEffect } from \"./implementations/pixelate\";\nimport type { BulgeEffect } from \"./implementations/bulge\";\nimport type { MagnifyEffect } from \"./implementations/magnify\";\nimport type { BloomEffect } from \"./implementations/bloom\";\nimport type { VintageEffect } from \"./implementations/vintage\";\nimport type { ChromaticAberrationEffect } from \"./implementations/chromatic-aberration\";\nimport type { InvertEffect } from \"./implementations/invert\";\nimport type { ScatterEffect } from \"./implementations/scatter\";\nimport type { PosterizeEffect } from \"./implementations/posterize\";\nimport type { MotionBlurEffect } from \"./implementations/motion-blur\";\nimport type { ShaderEffect } from \"./implementations/shader\";\nimport type { OutlineEffect } from \"./implementations/outline\";\nimport type { DropShadowEffect } from \"./implementations/drop-shadow\";\nimport type { VignetteEffect } from \"./implementations/vignette\";\nimport type { GrainEffect } from \"./implementations/grain\";\nimport type { SharpenEffect } from \"./implementations/sharpen\";\nimport type { EdgesEffect } from \"./implementations/edges\";\nimport type { ThresholdEffect } from \"./implementations/threshold\";\nimport type { RadialBlurEffect } from \"./implementations/radial-blur\";\nimport type { HalftoneEffect } from \"./implementations/halftone\";\nimport type { DitherEffect } from \"./implementations/dither\";\nimport type { DuotoneEffect } from \"./implementations/duotone\";\nimport type { CurvesEffect } from \"./implementations/curves\";\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\nimport type { RgbShiftEffect } from \"./implementations/rgb-shift\";\nimport type { ScanlinesEffect } from \"./implementations/scanlines\";\nimport type { BlockDisplaceEffect } from \"./implementations/block-displace\";\nimport type { BitCrushEffect } from \"./implementations/bit-crush\";\nimport type { AsciiEffect } from \"./implementations/ascii\";\nimport type { StreakEffect } from \"./implementations/streak\";\nimport type { GlowEffect } from \"./implementations/glow\";\nimport type {
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { BlurEffect } from \"./implementations/blur\";\nimport type { DirectionalBlurEffect } from \"./implementations/directional-blur\";\nimport type { GrayscaleEffect } from \"./implementations/grayscale\";\nimport type { PixelateEffect } from \"./implementations/pixelate\";\nimport type { BulgeEffect } from \"./implementations/bulge\";\nimport type { MagnifyEffect } from \"./implementations/magnify\";\nimport type { BloomEffect } from \"./implementations/bloom\";\nimport type { VintageEffect } from \"./implementations/vintage\";\nimport type { ChromaticAberrationEffect } from \"./implementations/chromatic-aberration\";\nimport type { InvertEffect } from \"./implementations/invert\";\nimport type { ScatterEffect } from \"./implementations/scatter\";\nimport type { PosterizeEffect } from \"./implementations/posterize\";\nimport type { MotionBlurEffect } from \"./implementations/motion-blur\";\nimport type { ShaderEffect } from \"./implementations/shader\";\nimport type { OutlineEffect } from \"./implementations/outline\";\nimport type { DropShadowEffect } from \"./implementations/drop-shadow\";\nimport type { VignetteEffect } from \"./implementations/vignette\";\nimport type { GrainEffect } from \"./implementations/grain\";\nimport type { SharpenEffect } from \"./implementations/sharpen\";\nimport type { EdgesEffect } from \"./implementations/edges\";\nimport type { ThresholdEffect } from \"./implementations/threshold\";\nimport type { RadialBlurEffect } from \"./implementations/radial-blur\";\nimport type { HalftoneEffect } from \"./implementations/halftone\";\nimport type { DitherEffect } from \"./implementations/dither\";\nimport type { DuotoneEffect } from \"./implementations/duotone\";\nimport type { CurvesEffect } from \"./implementations/curves\";\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\nimport type { RgbShiftEffect } from \"./implementations/rgb-shift\";\nimport type { ScanlinesEffect } from \"./implementations/scanlines\";\nimport type { BlockDisplaceEffect } from \"./implementations/block-displace\";\nimport type { BitCrushEffect } from \"./implementations/bit-crush\";\nimport type { AsciiEffect } from \"./implementations/ascii\";\nimport type { StreakEffect } from \"./implementations/streak\";\nimport type { GlowEffect } from \"./implementations/glow\";\nimport type { OilPaintEffect } from \"./implementations/oil-paint\";\nimport type { WaveEffect } from \"./implementations/wave\";\nimport type { TwirlEffect } from \"./implementations/twirl\";\nimport type { ProgressiveBlurEffect } from \"./implementations/progressive-blur\";\nimport type { KaleidoscopeEffect } from \"./implementations/kaleidoscope\";\nimport type { GlassEffect } from \"./implementations/glass\";\nimport type { LutEffect } from \"./implementations/lut\";\n\n/** Discriminated union of every effect type a node can carry. */\nexport type NodeEffect =\n | BlurEffect\n | DirectionalBlurEffect\n | GrayscaleEffect\n | PixelateEffect\n | BulgeEffect\n | MagnifyEffect\n | BloomEffect\n | VintageEffect\n | ChromaticAberrationEffect\n | InvertEffect\n | ScatterEffect\n | PosterizeEffect\n | MotionBlurEffect\n | ShaderEffect\n | OutlineEffect\n | DropShadowEffect\n | VignetteEffect\n | GrainEffect\n | SharpenEffect\n | EdgesEffect\n | ThresholdEffect\n | RadialBlurEffect\n | HalftoneEffect\n | DitherEffect\n | DuotoneEffect\n | CurvesEffect\n | ColorAdjustmentEffect\n | RgbShiftEffect\n | ScanlinesEffect\n | BlockDisplaceEffect\n | BitCrushEffect\n | AsciiEffect\n | StreakEffect\n | GlowEffect\n | OilPaintEffect\n | WaveEffect\n | TwirlEffect\n | ProgressiveBlurEffect\n | KaleidoscopeEffect\n | GlassEffect\n | LutEffect;\n"]}
|
|
@@ -128,25 +128,23 @@ export declare class FillChain {
|
|
|
128
128
|
*/
|
|
129
129
|
fractalNoise(options?: FillOptions & Omit<FractalNoiseFillProp, 'type' | 'opacity' | 'blend'>): FillChain;
|
|
130
130
|
/**
|
|
131
|
-
* Append a custom
|
|
131
|
+
* Append a custom shader fill — the escape hatch past {@link noise} and
|
|
132
132
|
* {@link fractalNoise}, where the author writes the fragment function.
|
|
133
133
|
*
|
|
134
|
-
* `source`
|
|
134
|
+
* The WGSL `source` defines `fn fill(in: FillIn) -> vec4f` and declares its
|
|
135
|
+
* uniforms as `struct Params`, read as `u.<name>`. It returns
|
|
135
136
|
* **premultiplied** rgba, without folding `opacity` in (the layer's opacity is
|
|
136
|
-
* already
|
|
137
|
-
*
|
|
138
|
-
* order is irrelevant; the renderer supplies `u_size`, `u_origin`,
|
|
139
|
-
* `u_resolution`, `u_aspect`, `u_time` and `u_scale` to whichever of them the
|
|
140
|
-
* source declares.
|
|
137
|
+
* already applied, so applying it twice squares it). Uniforms are keyed by
|
|
138
|
+
* their declared name, so order is irrelevant.
|
|
141
139
|
*
|
|
142
140
|
* Keep `source` constant — it is the compile-cache key, so it snaps at a
|
|
143
141
|
* tween's midpoint and rebuilding it per frame compiles a program per frame.
|
|
144
142
|
* Everything that changes belongs in a uniform, which is an in-place write.
|
|
145
143
|
*
|
|
146
144
|
* @example
|
|
147
|
-
* Fills.shader(GLOW, { uniforms: {
|
|
145
|
+
* Fills.shader(GLOW, { uniforms: { amount: 0.6 } })
|
|
148
146
|
*/
|
|
149
|
-
shader(source: string | FillShader, options?: FillOptions & Omit<ShaderFillProp, 'type' | 'source' | 'opacity' | 'blend' | 'shaderId'> & {
|
|
147
|
+
shader(source: string | FillShader, options?: FillOptions & Omit<ShaderFillProp, 'type' | 'source' | 'language' | 'opacity' | 'blend' | 'shaderId'> & {
|
|
150
148
|
values?: ShaderPropertyValues;
|
|
151
149
|
}): FillChain;
|
|
152
150
|
/** Append a stripe (hatch) fill. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/fill/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC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