@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,246 @@
|
|
|
1
|
+
import { linear } from "../../tween/ease/constants.js";
|
|
2
|
+
import { easeOfSpec, specOfEase } from "../../tween/ease/spec.js";
|
|
3
|
+
import { lerpNumber } from "../../tween/lerp.js";
|
|
4
|
+
const segmentsOf = new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* The fluent builder: `ramp(0, 1, 0.5).hold().ramp(1, 0, 1)`.
|
|
7
|
+
*
|
|
8
|
+
* Its one own field is `keys`, so it is a {@link Ramp} and serializes to one.
|
|
9
|
+
* Segments before the first bare `hold()` are placed from the start, segments
|
|
10
|
+
* after it from the end, and the hold stretches to fill whatever lies between.
|
|
11
|
+
*/
|
|
12
|
+
export class RampChain {
|
|
13
|
+
keys;
|
|
14
|
+
constructor(segments = []) {
|
|
15
|
+
segmentsOf.set(this, segments);
|
|
16
|
+
this.keys = keysOf(segments);
|
|
17
|
+
}
|
|
18
|
+
/** Append a ramp from `from` to `to` over `duration` seconds. */
|
|
19
|
+
ramp(from, to, duration, options) {
|
|
20
|
+
return this._append({ from, to, duration, ease: specOf(options?.ease) });
|
|
21
|
+
}
|
|
22
|
+
/** Append a hold: for `duration` seconds, or, bare, for whatever the clip leaves over. */
|
|
23
|
+
hold(duration) {
|
|
24
|
+
return this._append({ duration });
|
|
25
|
+
}
|
|
26
|
+
_append(segment) {
|
|
27
|
+
return new RampChain([...(segmentsOf.get(this) ?? []), segment]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** A ramp from `from` to `to` over `duration` seconds. */
|
|
31
|
+
export function ramp(from, to, duration, options) {
|
|
32
|
+
return new RampChain().ramp(from, to, duration, options);
|
|
33
|
+
}
|
|
34
|
+
/** A hold; bare `hold()` stretches to fill the middle of the clip. */
|
|
35
|
+
export function hold(duration) {
|
|
36
|
+
return new RampChain().hold(duration);
|
|
37
|
+
}
|
|
38
|
+
function specOf(ease) {
|
|
39
|
+
if (ease === undefined)
|
|
40
|
+
return undefined;
|
|
41
|
+
const spec = typeof ease === "function" ? specOfEase(ease) : ease;
|
|
42
|
+
if (!spec) {
|
|
43
|
+
throw new TypeError("A ramp's ease is stored as data, and this function has none: pass an EaseSpec, or an engine-built ease (easeIn, easeOut, easeInOut, curveEase).");
|
|
44
|
+
}
|
|
45
|
+
return spec.kind === "linear" ? undefined : spec;
|
|
46
|
+
}
|
|
47
|
+
function keysOf(segments) {
|
|
48
|
+
let previous;
|
|
49
|
+
const values = segments.map((s) => {
|
|
50
|
+
const from = s.from ?? previous;
|
|
51
|
+
const to = s.to ?? from;
|
|
52
|
+
previous = to;
|
|
53
|
+
return { from, to };
|
|
54
|
+
});
|
|
55
|
+
const keys = [];
|
|
56
|
+
const push = (key) => {
|
|
57
|
+
const last = keys[keys.length - 1];
|
|
58
|
+
if (last && !key.ease && last.at === key.at && last.before === key.before && last.value === key.value)
|
|
59
|
+
return;
|
|
60
|
+
keys.push(key);
|
|
61
|
+
};
|
|
62
|
+
const withEase = (s) => (s.ease ? { ease: s.ease } : {});
|
|
63
|
+
const fill = segments.findIndex((s) => s.duration === undefined);
|
|
64
|
+
const head = fill < 0 ? segments.length : fill;
|
|
65
|
+
let at = 0;
|
|
66
|
+
for (let i = 0; i < head; i++) {
|
|
67
|
+
const s = segments[i];
|
|
68
|
+
const duration = Math.max(0, s.duration ?? 0);
|
|
69
|
+
const { from, to } = values[i];
|
|
70
|
+
if (from !== undefined)
|
|
71
|
+
push({ at, value: from });
|
|
72
|
+
if (to !== undefined)
|
|
73
|
+
push({ at: at + duration, value: to, ...withEase(s) });
|
|
74
|
+
at += duration;
|
|
75
|
+
}
|
|
76
|
+
if (fill < 0)
|
|
77
|
+
return keys;
|
|
78
|
+
const tail = segments.slice(fill + 1);
|
|
79
|
+
if (tail.some((s) => s.duration === undefined) && process.env.NODE_ENV !== "production") {
|
|
80
|
+
console.warn("[motionscript] A ramp has more than one bare hold(); only the first stretches, the rest are zero-length.");
|
|
81
|
+
}
|
|
82
|
+
let before = tail.reduce((sum, s) => sum + Math.max(0, s.duration ?? 0), 0);
|
|
83
|
+
for (let i = fill + 1; i < segments.length; i++) {
|
|
84
|
+
const s = segments[i];
|
|
85
|
+
const duration = Math.max(0, s.duration ?? 0);
|
|
86
|
+
const { from, to } = values[i];
|
|
87
|
+
if (from !== undefined)
|
|
88
|
+
push({ before, value: from });
|
|
89
|
+
before -= duration;
|
|
90
|
+
if (to !== undefined)
|
|
91
|
+
push({ before: Math.max(0, before), value: to, ...withEase(s) });
|
|
92
|
+
}
|
|
93
|
+
return keys;
|
|
94
|
+
}
|
|
95
|
+
/** Whether `p` is a {@link Ramp}: anything with a `keys` array, a parsed copy included. */
|
|
96
|
+
export function isRamp(p) {
|
|
97
|
+
return typeof p === "object" && p !== null && Array.isArray(p.keys);
|
|
98
|
+
}
|
|
99
|
+
const LINEAR = linear();
|
|
100
|
+
const resolved = new WeakMap();
|
|
101
|
+
/**
|
|
102
|
+
* The keys of `ramp` placed on a clip `length` seconds long, in time order.
|
|
103
|
+
*
|
|
104
|
+
* Every time is clamped to the clip, so a ramp longer than its clip is cut, not
|
|
105
|
+
* squeezed. Keys whose anchors cross (a start key past an end key on a short
|
|
106
|
+
* clip) are sorted by where they land, with a development warning.
|
|
107
|
+
*/
|
|
108
|
+
export function resolveRamp(ramp, length) {
|
|
109
|
+
const clip = Number.isFinite(length) && length > 0 ? length : 0;
|
|
110
|
+
const cached = resolved.get(ramp);
|
|
111
|
+
if (cached && cached.length === clip)
|
|
112
|
+
return cached.keys;
|
|
113
|
+
let crossed = false;
|
|
114
|
+
let last = -Infinity;
|
|
115
|
+
const keys = ramp.keys.map((key) => {
|
|
116
|
+
const time = Math.min(clip, Math.max(0, key.before !== undefined ? clip - key.before : key.at ?? 0));
|
|
117
|
+
if (time < last)
|
|
118
|
+
crossed = true;
|
|
119
|
+
last = time;
|
|
120
|
+
const ease = key.ease ? easeOfSpec(key.ease) : LINEAR;
|
|
121
|
+
return { time, value: key.value, ease, linear: !key.ease || key.ease.kind === "linear" };
|
|
122
|
+
});
|
|
123
|
+
if (crossed) {
|
|
124
|
+
keys.sort((a, b) => a.time - b.time);
|
|
125
|
+
if (process.env.NODE_ENV !== "production") {
|
|
126
|
+
console.warn(`[motionscript] A ramp's start and end keys cross on a ${clip.toFixed(3)}s clip; they play in the order they land.`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
resolved.set(ramp, { length: clip, keys });
|
|
130
|
+
return keys;
|
|
131
|
+
}
|
|
132
|
+
/** The value of `ramp` at `t` seconds into a clip `length` seconds long, `fallback` when it has no keys. */
|
|
133
|
+
export function sampleRamp(ramp, t, length, fallback) {
|
|
134
|
+
const keys = resolveRamp(ramp, length);
|
|
135
|
+
if (keys.length === 0)
|
|
136
|
+
return fallback;
|
|
137
|
+
if (t <= keys[0].time)
|
|
138
|
+
return keys[0].value;
|
|
139
|
+
for (let i = 1; i < keys.length; i++) {
|
|
140
|
+
const key = keys[i];
|
|
141
|
+
if (t > key.time)
|
|
142
|
+
continue;
|
|
143
|
+
const previous = keys[i - 1];
|
|
144
|
+
const span = key.time - previous.time;
|
|
145
|
+
return lerpNumber(previous.value, key.value, key.ease(span > 0 ? (t - previous.time) / span : 1));
|
|
146
|
+
}
|
|
147
|
+
return keys[keys.length - 1].value;
|
|
148
|
+
}
|
|
149
|
+
/** The value of `p` at `t`, for a number its own value. */
|
|
150
|
+
export function sampleParam(p, t, length, fallback) {
|
|
151
|
+
return isRamp(p) ? sampleRamp(p, t, length, fallback) : p;
|
|
152
|
+
}
|
|
153
|
+
/** One representative number: the value itself, or the ramp's value at its start. */
|
|
154
|
+
export function staticValue(p, fallback = 0) {
|
|
155
|
+
if (!isRamp(p))
|
|
156
|
+
return p;
|
|
157
|
+
let first;
|
|
158
|
+
for (const key of p.keys) {
|
|
159
|
+
if (key.at !== undefined && (first?.at === undefined || key.at < first.at))
|
|
160
|
+
first = key;
|
|
161
|
+
}
|
|
162
|
+
return (first ?? p.keys[0])?.value ?? fallback;
|
|
163
|
+
}
|
|
164
|
+
/** Equal for two params exactly when they sound the same: what tells a device a param was edited. */
|
|
165
|
+
export function paramKey(p) {
|
|
166
|
+
if (p === undefined)
|
|
167
|
+
return "_";
|
|
168
|
+
return isRamp(p) ? `r${JSON.stringify(p.keys)}` : String(p);
|
|
169
|
+
}
|
|
170
|
+
/** Two numbers lerp; a ramp on either side hard-cuts at the midpoint. */
|
|
171
|
+
export function lerpParam(from, to, t) {
|
|
172
|
+
if (typeof from === "number" && typeof to === "number")
|
|
173
|
+
return lerpNumber(from, to, t);
|
|
174
|
+
return t < 0.5 ? from : to;
|
|
175
|
+
}
|
|
176
|
+
export function equalsParam(a, b) {
|
|
177
|
+
if (a === b)
|
|
178
|
+
return true;
|
|
179
|
+
if (typeof a === "number" || typeof b === "number" || a === undefined || b === undefined)
|
|
180
|
+
return false;
|
|
181
|
+
return paramKey(a) === paramKey(b);
|
|
182
|
+
}
|
|
183
|
+
/** The audio-param attribute's op set: resolve is the identity, lerp is {@link lerpParam}. */
|
|
184
|
+
export const audioParamOps = {
|
|
185
|
+
resolve: (value) => value,
|
|
186
|
+
lerp: lerpParam,
|
|
187
|
+
};
|
|
188
|
+
const INTEGRATION_STEP = 0.001;
|
|
189
|
+
/** The most cells one table holds: past it a long source gets coarser cells, not a bigger table. */
|
|
190
|
+
const MAX_CELLS = 20000;
|
|
191
|
+
const speedTables = new WeakMap();
|
|
192
|
+
function speedTableOf(speed, sourceLength, step) {
|
|
193
|
+
let byLength = speedTables.get(speed);
|
|
194
|
+
if (!byLength)
|
|
195
|
+
speedTables.set(speed, (byLength = new Map()));
|
|
196
|
+
const key = `${sourceLength}:${step}`;
|
|
197
|
+
const cached = byLength.get(key);
|
|
198
|
+
if (cached)
|
|
199
|
+
return cached;
|
|
200
|
+
const cells = Math.max(1, Math.min(MAX_CELLS, Math.ceil(sourceLength / step)));
|
|
201
|
+
const size = sourceLength / cells;
|
|
202
|
+
const clip = new Float64Array(cells + 1);
|
|
203
|
+
const rate = new Float64Array(cells);
|
|
204
|
+
for (let i = 0; i < cells; i++) {
|
|
205
|
+
rate[i] = Math.max(1e-6, sampleRamp(speed, (i + 0.5) * size, sourceLength, 1));
|
|
206
|
+
clip[i + 1] = clip[i] + size / rate[i];
|
|
207
|
+
}
|
|
208
|
+
const table = { step: size, clip, rate };
|
|
209
|
+
if (byLength.size >= 8)
|
|
210
|
+
byLength.clear();
|
|
211
|
+
byLength.set(key, table);
|
|
212
|
+
return table;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Clip seconds spent playing the first `upper` source seconds under a speed
|
|
216
|
+
* ramp: `∫ 1/speed(τ) dτ`. The ramp is placed on `sourceLength`, the source
|
|
217
|
+
* seconds it is authored over, and speed is floored just above zero.
|
|
218
|
+
*/
|
|
219
|
+
export function integrateSpeedToClipTime(speed, sourceLength, upper = sourceLength, step = INTEGRATION_STEP) {
|
|
220
|
+
const end = Math.min(upper, sourceLength);
|
|
221
|
+
if (end <= 0)
|
|
222
|
+
return 0;
|
|
223
|
+
const table = speedTableOf(speed, sourceLength, step);
|
|
224
|
+
const cell = Math.min(table.rate.length - 1, Math.floor(end / table.step));
|
|
225
|
+
return table.clip[cell] + (end - cell * table.step) / table.rate[cell];
|
|
226
|
+
}
|
|
227
|
+
/** Inverse of {@link integrateSpeedToClipTime}: the source seconds reached after `clipElapsed` clip seconds. */
|
|
228
|
+
export function sourceTimeAtClipElapsed(speed, sourceLength, clipElapsed, step = INTEGRATION_STEP) {
|
|
229
|
+
if (clipElapsed <= 0 || sourceLength <= 0)
|
|
230
|
+
return 0;
|
|
231
|
+
const table = speedTableOf(speed, sourceLength, step);
|
|
232
|
+
const { clip, rate } = table;
|
|
233
|
+
if (clipElapsed >= clip[clip.length - 1])
|
|
234
|
+
return sourceLength;
|
|
235
|
+
let lo = 0;
|
|
236
|
+
let hi = rate.length - 1;
|
|
237
|
+
while (lo < hi) {
|
|
238
|
+
const mid = (lo + hi + 1) >> 1;
|
|
239
|
+
if (clip[mid] <= clipElapsed)
|
|
240
|
+
lo = mid;
|
|
241
|
+
else
|
|
242
|
+
hi = mid - 1;
|
|
243
|
+
}
|
|
244
|
+
return Math.min(sourceLength, lo * table.step + (clipElapsed - clip[lo]) * rate[lo]);
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=ramp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ramp.js","sourceRoot":"","sources":["../../../src/attributes/audio/ramp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAiB,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA4C1C,MAAM,UAAU,GAAG,IAAI,OAAO,EAAiC,CAAC;AAEhE;;;;;;GAMG;AACH,MAA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,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,WAAW;YAAE,EAAE,GAAG,GAAG,CAAC;;YAClC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACzF,CAAC","sourcesContent":["import { linear } from \"@/tween/ease/constants\";\nimport { easeOfSpec, specOfEase, type EaseSpec } from \"@/tween/ease/spec\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { lerpNumber } from \"@/tween/lerp\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\n/**\n * One point of a {@link Ramp}: a value, placed `at` seconds after the start or\n * `before` seconds before the end, and the ease of the segment arriving at it\n * (linear when absent).\n */\nexport type RampKey =\n | { readonly at: number; readonly before?: undefined; readonly value: number; readonly ease?: EaseSpec }\n | { readonly before: number; readonly at?: undefined; readonly value: number; readonly ease?: EaseSpec };\n\n/**\n * Automation for one audio param, as plain JSON.\n *\n * A `before` key stays where it is when the clip is trimmed, which is what makes\n * \"the last second\" mean the last second of whatever length the clip has.\n */\nexport interface Ramp {\n readonly keys: readonly RampKey[];\n}\n\n/** An audio param: a constant, or a {@link Ramp}. */\nexport type Param = number | Ramp;\n\n/** A ramp key's time and ease, resolved against one length. */\nexport interface ResolvedRampKey {\n readonly time: number;\n readonly value: number;\n readonly ease: EasingFunction;\n /** Linear into this key, so a device can schedule a cheap ramp rather than a baked curve. */\n readonly linear: boolean;\n}\n\ninterface Segment {\n readonly from?: number;\n readonly to?: number;\n readonly duration?: number;\n readonly ease?: EaseSpec;\n}\n\n/** An ease as data, or an engine-built function (which records the data it came from). */\nexport type RampEase = EaseSpec | EasingFunction;\n\nconst segmentsOf = new WeakMap<RampChain, readonly Segment[]>();\n\n/**\n * The fluent builder: `ramp(0, 1, 0.5).hold().ramp(1, 0, 1)`.\n *\n * Its one own field is `keys`, so it is a {@link Ramp} and serializes to one.\n * Segments before the first bare `hold()` are placed from the start, segments\n * after it from the end, and the hold stretches to fill whatever lies between.\n */\nexport class RampChain implements Ramp {\n readonly keys: readonly RampKey[];\n\n constructor(segments: readonly Segment[] = []) {\n segmentsOf.set(this, segments);\n this.keys = keysOf(segments);\n }\n\n /** Append a ramp from `from` to `to` over `duration` seconds. */\n ramp(from: number, to: number, duration: number, options?: { readonly ease?: RampEase }): RampChain {\n return this._append({ from, to, duration, ease: specOf(options?.ease) });\n }\n\n /** Append a hold: for `duration` seconds, or, bare, for whatever the clip leaves over. */\n hold(duration?: number): RampChain {\n return this._append({ duration });\n }\n\n private _append(segment: Segment): RampChain {\n return new RampChain([...(segmentsOf.get(this) ?? []), segment]);\n }\n}\n\n/** A ramp from `from` to `to` over `duration` seconds. */\nexport function ramp(from: number, to: number, duration: number, options?: { readonly ease?: RampEase }): RampChain {\n return new RampChain().ramp(from, to, duration, options);\n}\n\n/** A hold; bare `hold()` stretches to fill the middle of the clip. */\nexport function hold(duration?: number): RampChain {\n return new RampChain().hold(duration);\n}\n\nfunction specOf(ease: RampEase | undefined): EaseSpec | undefined {\n if (ease === undefined) return undefined;\n const spec = typeof ease === \"function\" ? specOfEase(ease) : ease;\n if (!spec) {\n throw new TypeError(\"A ramp's ease is stored as data, and this function has none: pass an EaseSpec, or an engine-built ease (easeIn, easeOut, easeInOut, curveEase).\");\n }\n return spec.kind === \"linear\" ? undefined : spec;\n}\n\nfunction keysOf(segments: readonly Segment[]): RampKey[] {\n let previous: number | undefined;\n const values = segments.map((s) => {\n const from = s.from ?? previous;\n const to = s.to ?? from;\n previous = to;\n return { from, to };\n });\n\n const keys: RampKey[] = [];\n const push = (key: RampKey): void => {\n const last = keys[keys.length - 1];\n if (last && !key.ease && last.at === key.at && last.before === key.before && last.value === key.value) return;\n keys.push(key);\n };\n const withEase = (s: Segment) => (s.ease ? { ease: s.ease } : {});\n\n const fill = segments.findIndex((s) => s.duration === undefined);\n const head = fill < 0 ? segments.length : fill;\n let at = 0;\n for (let i = 0; i < head; i++) {\n const s = segments[i];\n const duration = Math.max(0, s.duration ?? 0);\n const { from, to } = values[i];\n if (from !== undefined) push({ at, value: from });\n if (to !== undefined) push({ at: at + duration, value: to, ...withEase(s) });\n at += duration;\n }\n if (fill < 0) return keys;\n\n const tail = segments.slice(fill + 1);\n if (tail.some((s) => s.duration === undefined) && process.env.NODE_ENV !== \"production\") {\n console.warn(\"[motionscript] A ramp has more than one bare hold(); only the first stretches, the rest are zero-length.\");\n }\n let before = tail.reduce((sum, s) => sum + Math.max(0, s.duration ?? 0), 0);\n for (let i = fill + 1; i < segments.length; i++) {\n const s = segments[i];\n const duration = Math.max(0, s.duration ?? 0);\n const { from, to } = values[i];\n if (from !== undefined) push({ before, value: from });\n before -= duration;\n if (to !== undefined) push({ before: Math.max(0, before), value: to, ...withEase(s) });\n }\n return keys;\n}\n\n/** Whether `p` is a {@link Ramp}: anything with a `keys` array, a parsed copy included. */\nexport function isRamp(p: unknown): p is Ramp {\n return typeof p === \"object\" && p !== null && Array.isArray((p as Ramp).keys);\n}\n\nconst LINEAR = linear();\nconst resolved = new WeakMap<Ramp, { readonly length: number; readonly keys: readonly ResolvedRampKey[] }>();\n\n/**\n * The keys of `ramp` placed on a clip `length` seconds long, in time order.\n *\n * Every time is clamped to the clip, so a ramp longer than its clip is cut, not\n * squeezed. Keys whose anchors cross (a start key past an end key on a short\n * clip) are sorted by where they land, with a development warning.\n */\nexport function resolveRamp(ramp: Ramp, length: number): readonly ResolvedRampKey[] {\n const clip = Number.isFinite(length) && length > 0 ? length : 0;\n const cached = resolved.get(ramp);\n if (cached && cached.length === clip) return cached.keys;\n\n let crossed = false;\n let last = -Infinity;\n const keys = ramp.keys.map((key) => {\n const time = Math.min(clip, Math.max(0, key.before !== undefined ? clip - key.before : key.at ?? 0));\n if (time < last) crossed = true;\n last = time;\n const ease = key.ease ? easeOfSpec(key.ease) : LINEAR;\n return { time, value: key.value, ease, linear: !key.ease || key.ease.kind === \"linear\" };\n });\n if (crossed) {\n keys.sort((a, b) => a.time - b.time);\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(`[motionscript] A ramp's start and end keys cross on a ${clip.toFixed(3)}s clip; they play in the order they land.`);\n }\n }\n resolved.set(ramp, { length: clip, keys });\n return keys;\n}\n\n/** The value of `ramp` at `t` seconds into a clip `length` seconds long, `fallback` when it has no keys. */\nexport function sampleRamp(ramp: Ramp, t: number, length: number, fallback: number): number {\n const keys = resolveRamp(ramp, length);\n if (keys.length === 0) return fallback;\n if (t <= keys[0].time) return keys[0].value;\n for (let i = 1; i < keys.length; i++) {\n const key = keys[i];\n if (t > key.time) continue;\n const previous = keys[i - 1];\n const span = key.time - previous.time;\n return lerpNumber(previous.value, key.value, key.ease(span > 0 ? (t - previous.time) / span : 1));\n }\n return keys[keys.length - 1].value;\n}\n\n/** The value of `p` at `t`, for a number its own value. */\nexport function sampleParam(p: Param, t: number, length: number, fallback: number): number {\n return isRamp(p) ? sampleRamp(p, t, length, fallback) : p;\n}\n\n/** One representative number: the value itself, or the ramp's value at its start. */\nexport function staticValue(p: Param, fallback = 0): number {\n if (!isRamp(p)) return p;\n let first: RampKey | undefined;\n for (const key of p.keys) {\n if (key.at !== undefined && (first?.at === undefined || key.at < first.at)) first = key;\n }\n return (first ?? p.keys[0])?.value ?? fallback;\n}\n\n/** Equal for two params exactly when they sound the same: what tells a device a param was edited. */\nexport function paramKey(p: Param | undefined): string {\n if (p === undefined) return \"_\";\n return isRamp(p) ? `r${JSON.stringify(p.keys)}` : String(p);\n}\n\n/** Two numbers lerp; a ramp on either side hard-cuts at the midpoint. */\nexport function lerpParam(from: Param, to: Param, t: number): Param {\n if (typeof from === \"number\" && typeof to === \"number\") return lerpNumber(from, to, t);\n return t < 0.5 ? from : to;\n}\n\nexport function equalsParam(a: Param | undefined, b: Param | undefined): boolean {\n if (a === b) return true;\n if (typeof a === \"number\" || typeof b === \"number\" || a === undefined || b === undefined) return false;\n return paramKey(a) === paramKey(b);\n}\n\n/** The audio-param attribute's op set: resolve is the identity, lerp is {@link lerpParam}. */\nexport const audioParamOps: AttributeOps<Param, Param> = {\n resolve: (value) => value,\n lerp: lerpParam,\n};\n\nconst INTEGRATION_STEP = 0.001;\n/** The most cells one table holds: past it a long source gets coarser cells, not a bigger table. */\nconst MAX_CELLS = 20000;\n\n/**\n * `∫ 1/speed` tabulated once per ramp and source length: `clip[i]` is the clip\n * seconds spent by the start of cell `i`, so either direction is a lookup\n * rather than a walk from zero. A device asks hundreds of times a second of\n * clip while scheduling a rate, and walking from zero each time was quadratic.\n */\ninterface SpeedTable {\n readonly step: number;\n readonly clip: Float64Array;\n readonly rate: Float64Array;\n}\n\nconst speedTables = new WeakMap<Ramp, Map<string, SpeedTable>>();\n\nfunction speedTableOf(speed: Ramp, sourceLength: number, step: number): SpeedTable {\n let byLength = speedTables.get(speed);\n if (!byLength) speedTables.set(speed, (byLength = new Map()));\n const key = `${sourceLength}:${step}`;\n const cached = byLength.get(key);\n if (cached) return cached;\n const cells = Math.max(1, Math.min(MAX_CELLS, Math.ceil(sourceLength / step)));\n const size = sourceLength / cells;\n const clip = new Float64Array(cells + 1);\n const rate = new Float64Array(cells);\n for (let i = 0; i < cells; i++) {\n rate[i] = Math.max(1e-6, sampleRamp(speed, (i + 0.5) * size, sourceLength, 1));\n clip[i + 1] = clip[i] + size / rate[i];\n }\n const table = { step: size, clip, rate };\n if (byLength.size >= 8) byLength.clear();\n byLength.set(key, table);\n return table;\n}\n\n/**\n * Clip seconds spent playing the first `upper` source seconds under a speed\n * ramp: `∫ 1/speed(τ) dτ`. The ramp is placed on `sourceLength`, the source\n * seconds it is authored over, and speed is floored just above zero.\n */\nexport function integrateSpeedToClipTime(speed: Ramp, sourceLength: number, upper: number = sourceLength, step = INTEGRATION_STEP): number {\n const end = Math.min(upper, sourceLength);\n if (end <= 0) return 0;\n const table = speedTableOf(speed, sourceLength, step);\n const cell = Math.min(table.rate.length - 1, Math.floor(end / table.step));\n return table.clip[cell] + (end - cell * table.step) / table.rate[cell];\n}\n\n/** Inverse of {@link integrateSpeedToClipTime}: the source seconds reached after `clipElapsed` clip seconds. */\nexport function sourceTimeAtClipElapsed(speed: Ramp, sourceLength: number, clipElapsed: number, step = INTEGRATION_STEP): number {\n if (clipElapsed <= 0 || sourceLength <= 0) return 0;\n const table = speedTableOf(speed, sourceLength, step);\n const { clip, rate } = table;\n if (clipElapsed >= clip[clip.length - 1]) return sourceLength;\n let lo = 0;\n let hi = rate.length - 1;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (clip[mid] <= clipElapsed) lo = mid;\n else hi = mid - 1;\n }\n return Math.min(sourceLength, lo * table.step + (clipElapsed - clip[lo]) * rate[lo]);\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type AudioEffect } from "../../attributes/audio/effects/union.js";
|
|
2
|
+
import { type Param } from "../../attributes/audio/ramp.js";
|
|
3
|
+
import { type AudioTransition } from "../../attributes/audio/transition.js";
|
|
3
4
|
/**
|
|
4
5
|
* One bus a clip's signal passes through on its way to the master.
|
|
5
6
|
*
|
|
@@ -14,30 +15,45 @@ import type { Param } from "../../attributes/audio/filters/curve.js";
|
|
|
14
15
|
*/
|
|
15
16
|
export interface AudioBusStop {
|
|
16
17
|
id: string;
|
|
17
|
-
/** Linear gain. A {@link Param}, so a bus fade is a
|
|
18
|
+
/** Linear gain. A {@link Param}, so a bus fade is a ramp rather than a per-frame write. */
|
|
18
19
|
volume: Param;
|
|
19
20
|
/** -1 hard left … +1 hard right. */
|
|
20
21
|
pan: Param;
|
|
21
22
|
mute: boolean;
|
|
22
23
|
/** Applied in array order, index 0 closest to the source. */
|
|
23
|
-
|
|
24
|
+
effects?: AudioEffect[];
|
|
25
|
+
transitionIn?: AudioTransition;
|
|
26
|
+
transitionOut?: AudioTransition;
|
|
27
|
+
/**
|
|
28
|
+
* When the bus is present, in the same seconds as the request carrying the
|
|
29
|
+
* stop: what a ramp in {@link volume} or {@link effects}, and its
|
|
30
|
+
* transitions, run over, as a clip's run over the clip. Not the clip's span, because one bus
|
|
31
|
+
* feeds many clips and its fade has to mean one thing to all of them.
|
|
32
|
+
*/
|
|
33
|
+
startAt: number;
|
|
34
|
+
endAt: number;
|
|
24
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Everything about a stop that changes what passes through it, as a string — so
|
|
38
|
+
* a device can tell an edited bus from the one it already built.
|
|
39
|
+
*/
|
|
40
|
+
export declare function busStopKey(stop: AudioBusStop): string;
|
|
25
41
|
export interface AudioParams {
|
|
26
42
|
src: string;
|
|
27
|
-
volume?:
|
|
43
|
+
volume?: Param;
|
|
28
44
|
loop?: boolean;
|
|
29
45
|
trimStart?: number;
|
|
30
46
|
trimEnd?: number;
|
|
31
|
-
|
|
47
|
+
effects?: AudioEffect[];
|
|
32
48
|
}
|
|
33
49
|
export interface AudioRequest {
|
|
34
50
|
id: string;
|
|
35
51
|
/** The asset path or URL. ('src' is standard for media) */
|
|
36
52
|
src: string;
|
|
37
|
-
/** The
|
|
53
|
+
/** The clip timestamp when the audio should START playing. */
|
|
38
54
|
startAt: number;
|
|
39
55
|
/**
|
|
40
|
-
* The
|
|
56
|
+
* The clip timestamp when the audio should STOP playing.
|
|
41
57
|
*
|
|
42
58
|
* Always a number, and **`Infinity` is the open/unbounded sentinel** — never
|
|
43
59
|
* `null` or `undefined`. An unstopped clip carries `Infinity` until
|
|
@@ -64,14 +80,30 @@ export interface AudioRequest {
|
|
|
64
80
|
mediaDuration?: number;
|
|
65
81
|
/** Offset in seconds to skip ahead in the audio file. Default: 0 */
|
|
66
82
|
trimStart: number;
|
|
67
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Out-point inside the source, in seconds, carried **only by a looping
|
|
85
|
+
* request that has one** (`trimEnd` greater than {@link trimStart}). A device
|
|
86
|
+
* loops the region `[trimStart, trimEnd)` rather than the whole buffer; for a
|
|
87
|
+
* request that does not loop, {@link endAt} already ends playback at the
|
|
88
|
+
* out-point and this is absent.
|
|
89
|
+
*/
|
|
90
|
+
trimEnd?: number;
|
|
91
|
+
/** Linear gain over the clip's own seconds. Default 1. */
|
|
92
|
+
volume: Param;
|
|
93
|
+
/** Playback rate, default 1. A ramp runs over the first {@link sourceLength} source seconds after `trimStart`. */
|
|
94
|
+
speed?: Param;
|
|
95
|
+
/** The source seconds a speed ramp is placed on; carried only with one, so the device and the timeline place it alike. */
|
|
96
|
+
sourceLength?: number;
|
|
68
97
|
loop: boolean;
|
|
69
|
-
/** Audio
|
|
70
|
-
|
|
98
|
+
/** Audio effects applied in array order (index 0 closest to the source). */
|
|
99
|
+
effects?: AudioEffect[];
|
|
100
|
+
/** A gain over the clip's first and last seconds, on top of {@link volume}. */
|
|
101
|
+
transitionIn?: AudioTransition;
|
|
102
|
+
transitionOut?: AudioTransition;
|
|
71
103
|
/**
|
|
72
104
|
* The buses this clip feeds, **source-adjacent first** — the same ordering
|
|
73
|
-
* convention {@link
|
|
74
|
-
* the clip's own
|
|
105
|
+
* convention {@link effects} uses, so the whole chain reads in signal order:
|
|
106
|
+
* the clip's own effects, then each stop in turn, then the master.
|
|
75
107
|
*
|
|
76
108
|
* Absent means the clip goes straight to the master, which is what every
|
|
77
109
|
* request did before buses existed.
|
|
@@ -83,5 +115,12 @@ export interface AudioRequest {
|
|
|
83
115
|
* timeline draw the waveform on that node's bar. Never affects playback.
|
|
84
116
|
*/
|
|
85
117
|
ownerId?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The sound of something that is also a picture — a video's own track. A
|
|
120
|
+
* source only such requests want is silence when it holds no audio, where
|
|
121
|
+
* for a request without this it is a failure to report. Never part of the
|
|
122
|
+
* request's identity: it changes nothing a device plays.
|
|
123
|
+
*/
|
|
124
|
+
optional?: boolean;
|
|
86
125
|
}
|
|
87
126
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEpF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,MAAM,EAAE,KAAK,CAAC;IACd,oCAAoC;IACpC,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAErD;AAED,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IAIZ,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;OASG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAIvB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,0DAA0D;IAC1D,MAAM,EAAE,KAAK,CAAC;IACd,kHAAkH;IAClH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IAId,4EAA4E;IAC5E,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAI9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { effectsKey } from "../../attributes/audio/effects/union.js";
|
|
2
|
+
import { paramKey } from "../../attributes/audio/ramp.js";
|
|
3
|
+
import { transitionKey } from "../../attributes/audio/transition.js";
|
|
4
|
+
/**
|
|
5
|
+
* Everything about a stop that changes what passes through it, as a string — so
|
|
6
|
+
* a device can tell an edited bus from the one it already built.
|
|
7
|
+
*/
|
|
8
|
+
export function busStopKey(stop) {
|
|
9
|
+
return `${stop.id}:${paramKey(stop.volume)}:${paramKey(stop.pan)}:${stop.mute ? 1 : 0}:${effectsKey(stop.effects)}:${transitionKey(stop.transitionIn)}:${transitionKey(stop.transitionOut)}:${stop.startAt}:${stop.endAt}`;
|
|
10
|
+
}
|
|
2
11
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"","sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoB,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAc,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAwB,MAAM,+BAA+B,CAAC;AAmCpF;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAkB;IACzC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;AAC/N,CAAC","sourcesContent":["import { effectsKey, type AudioEffect } from \"@/attributes/audio/effects/union\";\nimport { paramKey, type Param } from \"@/attributes/audio/ramp\";\nimport { transitionKey, type AudioTransition } from \"@/attributes/audio/transition\";\n\n/**\n * One bus a clip's signal passes through on its way to the master.\n *\n * A flattened snapshot of an {@link AudioBus} node, not a reference to it: core\n * describes what the graph should be and a platform builds it, so what crosses\n * that seam has to be plain data.\n *\n * {@link id} is what makes it a *bus* rather than per-clip processing — two\n * clips naming the same id share one live chain, so a reverb on a bus is a\n * single tail fed by both, which is not the same sound as that reverb applied\n * to each clip separately.\n */\nexport interface AudioBusStop {\n id: string;\n /** Linear gain. A {@link Param}, so a bus fade is a ramp rather than a per-frame write. */\n volume: Param;\n /** -1 hard left … +1 hard right. */\n pan: Param;\n mute: boolean;\n /** Applied in array order, index 0 closest to the source. */\n effects?: AudioEffect[];\n transitionIn?: AudioTransition;\n transitionOut?: AudioTransition;\n /**\n * When the bus is present, in the same seconds as the request carrying the\n * stop: what a ramp in {@link volume} or {@link effects}, and its\n * transitions, run over, as a clip's run over the clip. Not the clip's span, because one bus\n * feeds many clips and its fade has to mean one thing to all of them.\n */\n startAt: number;\n endAt: number;\n}\n\n/**\n * Everything about a stop that changes what passes through it, as a string — so\n * a device can tell an edited bus from the one it already built.\n */\nexport function busStopKey(stop: AudioBusStop): string {\n return `${stop.id}:${paramKey(stop.volume)}:${paramKey(stop.pan)}:${stop.mute ? 1 : 0}:${effectsKey(stop.effects)}:${transitionKey(stop.transitionIn)}:${transitionKey(stop.transitionOut)}:${stop.startAt}:${stop.endAt}`;\n}\n\nexport interface AudioParams {\n src: string;\n volume?: Param;\n loop?: boolean;\n trimStart?: number; // in seconds\n trimEnd?: number; // in seconds\n effects?: AudioEffect[];\n}\n\nexport interface AudioRequest {\n id: string;\n /** The asset path or URL. ('src' is standard for media) */\n src: string;\n\n // --- Timeline Synchronization (Clip Time) ---\n\n /** The clip timestamp when the audio should START playing. */\n startAt: number; // in seconds\n\n /**\n * The clip timestamp when the audio should STOP playing.\n *\n * Always a number, and **`Infinity` is the open/unbounded sentinel** — never\n * `null` or `undefined`. An unstopped clip carries `Infinity` until\n * {@link open} resolution pins it to the project end.\n *\n * So test it with `Number.isFinite(endAt)`. A `?? Infinity` or `!== null`\n * guard is dead code that reads as if the field were nullable.\n */\n endAt: number; // in seconds\n\n /**\n * True when this request was started and left running at its scene's end —\n * neither explicitly stopped nor finite-trimmed. Open requests\n * are exempt from the per-scene audio clamp and instead **continue across scene\n * boundaries**: `assembleTimeline` shifts them to absolute time and resolves\n * `endAt = min(startAt + mediaDuration, projectTotalDuration)` (a looped open\n * request runs to the project end). Bounded requests are unaffected.\n */\n open?: boolean;\n\n /**\n * Source media length in seconds, carried on **open** requests so the\n * cross-scene end can be resolved at assembly time without re-reading the\n * asset catalog. Ignored for bounded requests.\n */\n mediaDuration?: number;\n\n // --- Media Trimming (Local Audio Time) ---\n\n /** Offset in seconds to skip ahead in the audio file. Default: 0 */\n trimStart: number;\n\n /**\n * Out-point inside the source, in seconds, carried **only by a looping\n * request that has one** (`trimEnd` greater than {@link trimStart}). A device\n * loops the region `[trimStart, trimEnd)` rather than the whole buffer; for a\n * request that does not loop, {@link endAt} already ends playback at the\n * out-point and this is absent.\n */\n trimEnd?: number;\n\n // --- Playback Settings ---\n\n /** Linear gain over the clip's own seconds. Default 1. */\n volume: Param;\n /** Playback rate, default 1. A ramp runs over the first {@link sourceLength} source seconds after `trimStart`. */\n speed?: Param;\n /** The source seconds a speed ramp is placed on; carried only with one, so the device and the timeline place it alike. */\n sourceLength?: number;\n loop: boolean; // Default: false\n\n // --- Processing ---\n\n /** Audio effects applied in array order (index 0 closest to the source). */\n effects?: AudioEffect[];\n /** A gain over the clip's first and last seconds, on top of {@link volume}. */\n transitionIn?: AudioTransition;\n transitionOut?: AudioTransition;\n\n /**\n * The buses this clip feeds, **source-adjacent first** — the same ordering\n * convention {@link effects} uses, so the whole chain reads in signal order:\n * the clip's own effects, then each stop in turn, then the master.\n *\n * Absent means the clip goes straight to the master, which is what every\n * request did before buses existed.\n */\n bus?: readonly AudioBusStop[];\n\n // --- Timeline attribution (display only) ---\n\n /**\n * The owner key of the node that declared this request: its document row's\n * id, plus the path below that row for a node a composite built. Lets a\n * timeline draw the waveform on that node's bar. Never affects playback.\n */\n ownerId?: string;\n\n /**\n * The sound of something that is also a picture — a video's own track. A\n * source only such requests want is silence when it holds no audio, where\n * for a request without this it is a failure to report. Never part of the\n * request's identity: it changes nothing a device plays.\n */\n optional?: boolean;\n}"]}
|
|
@@ -1,43 +1,45 @@
|
|
|
1
1
|
import type { AssetCatalog } from "../../assets/catalog.js";
|
|
2
|
-
import type
|
|
3
|
-
import { type
|
|
4
|
-
import type {
|
|
2
|
+
import { type AudioEffectsInput } from "./effects/chain.js";
|
|
3
|
+
import { type Param } from "./ramp.js";
|
|
4
|
+
import type { AudioTransition } from "./transition.js";
|
|
5
5
|
import type { AudioBusStop, AudioRequest } from "./request.js";
|
|
6
|
-
/** One clip a
|
|
6
|
+
/** One clip a command's sound plays, in its clip's seconds. */
|
|
7
7
|
export interface AudioClip {
|
|
8
8
|
src: string;
|
|
9
|
-
/** When it starts.
|
|
9
|
+
/** When it starts. */
|
|
10
10
|
at?: number;
|
|
11
|
-
/** When it is cut, however much of it is left.
|
|
11
|
+
/** When it is cut, however much of it is left. */
|
|
12
12
|
until?: number;
|
|
13
13
|
/** In-point inside the source, in seconds. */
|
|
14
14
|
trimStart?: number;
|
|
15
15
|
/** Out-point inside the source. Absent plays to the source's end. */
|
|
16
16
|
trimEnd?: number;
|
|
17
17
|
loop?: boolean;
|
|
18
|
-
volume?:
|
|
19
|
-
|
|
18
|
+
volume?: Param;
|
|
19
|
+
/** Playback rate; a ramp runs over source seconds after `trimStart`. */
|
|
20
|
+
speed?: Param;
|
|
21
|
+
effects?: AudioEffectsInput;
|
|
22
|
+
transitionIn?: AudioTransition;
|
|
23
|
+
transitionOut?: AudioTransition;
|
|
20
24
|
/** Source-adjacent first — see {@link AudioRequest.bus}. */
|
|
21
25
|
bus?: readonly AudioBusStop[];
|
|
26
|
+
/** Sound nobody asked for by name — see {@link AudioRequest.optional}. */
|
|
27
|
+
optional?: boolean;
|
|
22
28
|
}
|
|
23
|
-
/** What a node's `declareAudio` is handed. */
|
|
24
|
-
export interface AudioScope {
|
|
25
|
-
readonly catalog: AssetCatalog;
|
|
26
|
-
/** When the node is in the tree, in clip seconds. `end` is `Infinity` for one that never leaves. */
|
|
27
|
-
readonly span: Readonly<NodeSpan>;
|
|
28
|
-
clip(clip: AudioClip): void;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The product of every scalar `speed` filter. A curve contributes 1 here — its
|
|
32
|
-
* effect on length needs integrating, which {@link sceneDurationFor} does.
|
|
33
|
-
*/
|
|
34
|
-
export declare function effectiveSpeed(filters: readonly AudioFilterItem[]): number;
|
|
35
29
|
/**
|
|
36
|
-
* Clip seconds
|
|
37
|
-
* Must match the
|
|
38
|
-
* or after
|
|
30
|
+
* Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source
|
|
31
|
+
* seconds at `speed`. Must match the device's `playbackRate` schedule, or a
|
|
32
|
+
* request ends before or after its sound does.
|
|
39
33
|
*/
|
|
40
|
-
export declare function
|
|
34
|
+
export declare function clipTimeAtSource(speed: Param, sourceLength: number, sourceElapsed?: number): number;
|
|
35
|
+
/** Inverse of {@link clipTimeAtSource}: the source seconds reached `clipElapsed` clip seconds in. */
|
|
36
|
+
export declare function sourceTimeAtClip(speed: Param, sourceLength: number, clipElapsed: number): number;
|
|
37
|
+
/** How long a clip lasts on the timeline: its trimmed source at its speed. `trimEnd` absent plays to `mediaDuration`. */
|
|
38
|
+
export declare function clipDurationOf(clip: {
|
|
39
|
+
readonly trimStart?: number;
|
|
40
|
+
readonly trimEnd?: number;
|
|
41
|
+
readonly speed?: Param;
|
|
42
|
+
}, mediaDuration: number): number;
|
|
41
43
|
/**
|
|
42
44
|
* The request `clip` schedules.
|
|
43
45
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB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