@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
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
import { clamp01 } from "../util/clamp.js";
|
|
2
|
-
import { applySnapshotLayer, captureLayer } from "../
|
|
2
|
+
import { applySnapshotLayer, captureLayer } from "../components/trees/node/node-reactive.js";
|
|
3
3
|
import { _observer, PropSlot } from "../props/slot.js";
|
|
4
4
|
import { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX } from "../props/observer.js";
|
|
5
|
-
import { driveCommand, loopCommand } from "../tween/command.js";
|
|
5
|
+
import { driveCommand, loopCommand, settles, settling } from "../tween/command.js";
|
|
6
6
|
import { loopRepeats } from "../tween/loop.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { diffClip } from "./diff.js";
|
|
7
|
+
import { easeOfSpec } from "../tween/ease/spec.js";
|
|
8
|
+
import { commandNodeRefs, commandTraits, hasNodeRef, holdsWhenFinished, isContextProvider, isLayoutNeutralProp, writesPlacementInPlace } from "./command-traits.js";
|
|
9
|
+
import { diffClip, jsonEqual } from "./diff.js";
|
|
11
10
|
import { indexDocument } from "./doc-index.js";
|
|
12
11
|
import { expressionOps } from "./expression/ops.js";
|
|
12
|
+
import { MISSING_TYPE, missingNode, missingNodeOf, placeholderProps } from "./missing-node.js";
|
|
13
|
+
import { migrateNodeProps } from "./prop-evolution.js";
|
|
14
|
+
import { SettledIndex } from "./settled-index.js";
|
|
15
|
+
import { commandSoundsOf } from "../components/factory/timeline.js";
|
|
13
16
|
import { planTimelinePatch } from "./timeline-patch.js";
|
|
14
|
-
import { documentDuration, isStillDocument, nodeSpan, ROOT_NODE_ID } from "./types.js";
|
|
17
|
+
import { documentDuration, effectiveSpanIn, isStillDocument, nodeSpan, ROOT_NODE_ID } from "./types.js";
|
|
15
18
|
/** Resolve an {@link EaseSpec} to the function the tween actually calls. */
|
|
16
19
|
function resolveEase(ease, registry) {
|
|
17
20
|
if (!ease)
|
|
18
21
|
return undefined;
|
|
19
|
-
|
|
20
|
-
case "linear": return linear();
|
|
21
|
-
case "in": return easeIn(ease.args);
|
|
22
|
-
case "out": return easeOut(ease.args);
|
|
23
|
-
case "inOut": return easeInOut(ease.args);
|
|
24
|
-
case "custom": {
|
|
25
|
-
const key = ease.args;
|
|
26
|
-
if (isEaseCurve(key))
|
|
27
|
-
return curveEase(key);
|
|
28
|
-
if (typeof key !== "string") {
|
|
29
|
-
throw new Error(`A "custom" ease needs a curve or its Registry.addEase key in \`args\` (got ${JSON.stringify(ease.args)}).`);
|
|
30
|
-
}
|
|
31
|
-
const fn = registry.ease(key);
|
|
32
|
-
if (!fn) {
|
|
33
|
-
throw new Error(`No ease registered under "${key}". Registered: ${registry.easeKeys().join(", ") || "none"}.`);
|
|
34
|
-
}
|
|
35
|
-
return fn;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
22
|
+
return easeOfSpec(ease, (key) => registry.ease(key), () => registry.easeKeys());
|
|
38
23
|
}
|
|
39
24
|
/**
|
|
40
25
|
* Order commands for compilation and evaluation.
|
|
@@ -51,6 +36,22 @@ function inTimelineOrder(commands) {
|
|
|
51
36
|
.sort((a, b) => (a.spec.at - b.spec.at) || (a.index - b.index))
|
|
52
37
|
.map((e) => e.spec);
|
|
53
38
|
}
|
|
39
|
+
const NO_SLOTS = new Set();
|
|
40
|
+
/**
|
|
41
|
+
* Only an unmarked command can read live state while it runs, so only its reads are kept. A slot
|
|
42
|
+
* snapshot (`save`) reads without reporting it, so everything it acts on counts as read.
|
|
43
|
+
*/
|
|
44
|
+
function readsOf(command, recorder, owned) {
|
|
45
|
+
if (settles(command))
|
|
46
|
+
return NO_SLOTS;
|
|
47
|
+
for (const slot of owned)
|
|
48
|
+
recorder.reads.add(slot);
|
|
49
|
+
return recorder.reads;
|
|
50
|
+
}
|
|
51
|
+
/** Marks the command `settling` when `held`; a looped one is wrapped after, and runs. */
|
|
52
|
+
function heldIf(held, made) {
|
|
53
|
+
return held && made ? settling(made) : made;
|
|
54
|
+
}
|
|
54
55
|
/** The scene root when a document doesn't author one explicitly. */
|
|
55
56
|
function defaultRootSpec() {
|
|
56
57
|
return { id: ROOT_NODE_ID, type: "canvas2d", parentId: null, layerOrder: 0, props: {} };
|
|
@@ -94,10 +95,10 @@ function presenceOf(doc) {
|
|
|
94
95
|
return spans;
|
|
95
96
|
}
|
|
96
97
|
/**
|
|
97
|
-
* The
|
|
98
|
+
* The clip document, compiled and evaluable, over the one canvas it builds
|
|
98
99
|
* into — its live nodes, presence and baselines all belong to that tree.
|
|
99
100
|
*/
|
|
100
|
-
export class
|
|
101
|
+
export class ClipTimeline {
|
|
101
102
|
canvas;
|
|
102
103
|
constructor(doc, registry, canvas) {
|
|
103
104
|
this.canvas = canvas;
|
|
@@ -162,6 +163,12 @@ export class SceneTimeline {
|
|
|
162
163
|
captureInitial(entry);
|
|
163
164
|
captureInitial(this._root);
|
|
164
165
|
this._baselined = new Set(this._present);
|
|
166
|
+
for (const id of this._present) {
|
|
167
|
+
if (this._live.get(id)?.node.mounted === false) {
|
|
168
|
+
this._baselined.delete(id);
|
|
169
|
+
this._unmounted.add(id);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
165
172
|
}
|
|
166
173
|
/**
|
|
167
174
|
* Build every command against the laid-out tree, then put the tree back.
|
|
@@ -175,10 +182,14 @@ export class SceneTimeline {
|
|
|
175
182
|
* own `at` — see {@link _compileCommands}.
|
|
176
183
|
*/
|
|
177
184
|
compile(settle = () => { }) {
|
|
185
|
+
this._settled = null;
|
|
178
186
|
this._compileCommands(settle);
|
|
179
187
|
this._restoreBaselines();
|
|
180
|
-
|
|
188
|
+
const moved = this.syncPresence(0);
|
|
189
|
+
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
181
190
|
settle();
|
|
191
|
+
this._holdEntrances();
|
|
192
|
+
this._indexSettled();
|
|
182
193
|
}
|
|
183
194
|
/** What a variable holds at the last evaluated time. For a host's inspector. */
|
|
184
195
|
variableValue(id) {
|
|
@@ -188,10 +199,50 @@ export class SceneTimeline {
|
|
|
188
199
|
variables() {
|
|
189
200
|
return this._varSpecs;
|
|
190
201
|
}
|
|
202
|
+
/** The time the tree's presence was last synced to. */
|
|
203
|
+
get presenceTime() {
|
|
204
|
+
return this._presenceIndex().time;
|
|
205
|
+
}
|
|
206
|
+
/** Every sound a placed command plays, in clip seconds, with the node that plays it. */
|
|
207
|
+
commandSounds() {
|
|
208
|
+
const out = [];
|
|
209
|
+
for (const placed of this._placed) {
|
|
210
|
+
const played = commandSoundsOf(placed.command);
|
|
211
|
+
if (!played)
|
|
212
|
+
continue;
|
|
213
|
+
for (const sound of played.sounds) {
|
|
214
|
+
out.push({
|
|
215
|
+
node: played.host,
|
|
216
|
+
at: placed.start + sound.at,
|
|
217
|
+
until: sound.until === undefined ? undefined : placed.start + sound.until,
|
|
218
|
+
src: sound.src,
|
|
219
|
+
options: sound.options,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return out;
|
|
224
|
+
}
|
|
191
225
|
/** Every compiled command, in timeline order — the indices {@link evaluateAt} reports writes under. */
|
|
192
226
|
placedCommands() {
|
|
193
227
|
return this._placed;
|
|
194
228
|
}
|
|
229
|
+
/** What the build stepped around — see {@link TimelineIssue}. Placeholders first, in row order. */
|
|
230
|
+
issues() {
|
|
231
|
+
const out = [];
|
|
232
|
+
for (const { spec, node } of this._live.values()) {
|
|
233
|
+
const missing = missingNodeOf(node);
|
|
234
|
+
if (!missing)
|
|
235
|
+
continue;
|
|
236
|
+
out.push({
|
|
237
|
+
code: "unknown-node-type",
|
|
238
|
+
nodeId: spec.id,
|
|
239
|
+
type: missing.type,
|
|
240
|
+
message: `Unknown node type "${missing.type}" (node ${spec.id}): it builds as an empty placeholder, keeping its children.`,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
out.push(...this._skipped.values());
|
|
244
|
+
return out;
|
|
245
|
+
}
|
|
195
246
|
/**
|
|
196
247
|
* Put every node into the state it holds at `seconds`.
|
|
197
248
|
*
|
|
@@ -212,13 +263,20 @@ export class SceneTimeline {
|
|
|
212
263
|
this._evaluateObserved(seconds, onWrite);
|
|
213
264
|
return;
|
|
214
265
|
}
|
|
266
|
+
if (this._settled) {
|
|
267
|
+
this._restoreBaselines(this._wholeRestore);
|
|
268
|
+
for (const { slot, baseline } of this._slotRestore)
|
|
269
|
+
slot.restoreFrom(baseline);
|
|
270
|
+
this._settled.evaluate(this._placed, seconds);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
215
273
|
this._restoreBaselines();
|
|
216
274
|
for (const placed of this._placed) {
|
|
217
|
-
if (seconds < placed.
|
|
275
|
+
if (seconds < placed.holdFrom)
|
|
218
276
|
continue;
|
|
219
|
-
const local = placed.
|
|
220
|
-
? (seconds - placed.start) / placed.duration
|
|
221
|
-
|
|
277
|
+
const local = seconds < placed.start ? 0
|
|
278
|
+
: placed.duration > 0 ? (seconds - placed.start) / placed.duration
|
|
279
|
+
: 1;
|
|
222
280
|
// A finished command is held at `at(1)` rather than dropped, so a prop
|
|
223
281
|
// written early and never touched again keeps its value — the same
|
|
224
282
|
// rule `commandSequence` uses.
|
|
@@ -294,6 +352,22 @@ export class SceneTimeline {
|
|
|
294
352
|
liveNode(id) {
|
|
295
353
|
return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;
|
|
296
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* What a row holds before any command has acted on it: its props as it
|
|
357
|
+
* arrived, or as built for one that has not arrived yet. The same at every
|
|
358
|
+
* time, which is what tells it from the node's live props. A bound prop is
|
|
359
|
+
* read through its binding, so it answers for the tree as it stands.
|
|
360
|
+
*/
|
|
361
|
+
baselineProps(id) {
|
|
362
|
+
const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);
|
|
363
|
+
if (!entry)
|
|
364
|
+
return undefined;
|
|
365
|
+
const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;
|
|
366
|
+
const props = {};
|
|
367
|
+
for (const [key, snap] of layer)
|
|
368
|
+
props[key] = snap.fn ? snap.fn() : snap.value;
|
|
369
|
+
return props;
|
|
370
|
+
}
|
|
297
371
|
presenceSlot(id) {
|
|
298
372
|
return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;
|
|
299
373
|
}
|
|
@@ -316,10 +390,11 @@ export class SceneTimeline {
|
|
|
316
390
|
*/
|
|
317
391
|
applyUpdate(patch, settle, prepare) {
|
|
318
392
|
if (!this._root)
|
|
319
|
-
throw new Error("
|
|
393
|
+
throw new Error("ClipTimeline.applyUpdate needs a built timeline.");
|
|
320
394
|
if (patch.prev !== this._docIndex) {
|
|
321
395
|
throw new Error("This patch was planned against a different version of the document.");
|
|
322
396
|
}
|
|
397
|
+
this._settled = null;
|
|
323
398
|
this._restoreBaselines();
|
|
324
399
|
this.syncPresence(0);
|
|
325
400
|
this._updateVariables(patch);
|
|
@@ -329,8 +404,18 @@ export class SceneTimeline {
|
|
|
329
404
|
const fresh = this._updateStructure(patch);
|
|
330
405
|
for (const entry of fresh) {
|
|
331
406
|
captureInitial(entry);
|
|
332
|
-
|
|
333
|
-
|
|
407
|
+
const id = entry.spec.id;
|
|
408
|
+
if (!this._present.has(id))
|
|
409
|
+
continue;
|
|
410
|
+
if (entry.node.mounted)
|
|
411
|
+
this._baselined.add(id);
|
|
412
|
+
else
|
|
413
|
+
this._unmounted.add(id);
|
|
414
|
+
}
|
|
415
|
+
for (const id of patch.inPlace) {
|
|
416
|
+
const entry = this._live.get(id);
|
|
417
|
+
if (entry)
|
|
418
|
+
this._writeInPlace(entry, patch.prev.nodes.get(id));
|
|
334
419
|
}
|
|
335
420
|
if (patch.diff.rootChanged) {
|
|
336
421
|
const host = this.canvas;
|
|
@@ -354,6 +439,7 @@ export class SceneTimeline {
|
|
|
354
439
|
const touched = new Set();
|
|
355
440
|
this._animated = [];
|
|
356
441
|
this._animatedVars = [];
|
|
442
|
+
this._animatedParts = [];
|
|
357
443
|
if (!isStillDocument(this._doc)) {
|
|
358
444
|
for (const spec of patch.next.ordered) {
|
|
359
445
|
let entry = rebuilt.get(spec.id);
|
|
@@ -369,9 +455,15 @@ export class SceneTimeline {
|
|
|
369
455
|
}
|
|
370
456
|
}
|
|
371
457
|
this._placed = placed;
|
|
458
|
+
for (const id of this._skipped.keys())
|
|
459
|
+
if (!patch.next.commands.has(id))
|
|
460
|
+
this._skipped.delete(id);
|
|
372
461
|
this._restoreBaselines();
|
|
373
|
-
|
|
462
|
+
const moved = this.syncPresence(0);
|
|
463
|
+
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
374
464
|
settle();
|
|
465
|
+
this._holdEntrances();
|
|
466
|
+
this._indexSettled();
|
|
375
467
|
}
|
|
376
468
|
_doc;
|
|
377
469
|
/** The vocabulary this document is compiled against — see `document/registry.ts`. */
|
|
@@ -393,6 +485,14 @@ export class SceneTimeline {
|
|
|
393
485
|
/** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */
|
|
394
486
|
_keyed;
|
|
395
487
|
_placed = [];
|
|
488
|
+
/** Commands left out of {@link _placed}, by id — see {@link issues}. */
|
|
489
|
+
_skipped = new Map();
|
|
490
|
+
/** Built after every compile and update, when any placed command is marked settling (`tween/command`). */
|
|
491
|
+
_settled = null;
|
|
492
|
+
/** With {@link _settled}: the animated nodes an unmarked command writes, put back whole… */
|
|
493
|
+
_wholeRestore = [];
|
|
494
|
+
/** …and, on every other animated node, the baseline of each slot a marked command writes. */
|
|
495
|
+
_slotRestore = [];
|
|
396
496
|
/** The scene root (`targetId: null`), plus its baseline. */
|
|
397
497
|
_root = null;
|
|
398
498
|
/**
|
|
@@ -407,12 +507,28 @@ export class SceneTimeline {
|
|
|
407
507
|
_animated = [];
|
|
408
508
|
/** Only the variables some command writes to. Same reasoning. */
|
|
409
509
|
_animatedVars = [];
|
|
510
|
+
/**
|
|
511
|
+
* Slots on a part a node built for itself that some command writes, restored
|
|
512
|
+
* alongside {@link _animated}. A part is no document row, so its baseline is
|
|
513
|
+
* the slot's state the first time a command wrote it — see {@link _notePartWrite}.
|
|
514
|
+
*/
|
|
515
|
+
_animatedParts = [];
|
|
516
|
+
_partBaselines = new WeakMap();
|
|
410
517
|
/** Children each parent built for itself, which the document must not disturb. */
|
|
411
518
|
_baseChildCount = new Map();
|
|
412
519
|
/** Node ids currently in the tree, so presence only churns when it changes. */
|
|
413
520
|
_present = new Set();
|
|
414
521
|
/** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */
|
|
415
522
|
_baselined = new Set();
|
|
523
|
+
/**
|
|
524
|
+
* Rows present at time 0 that a lifecycle command (`removeChildAt`,
|
|
525
|
+
* `reparent`) took out of the parent their row names, as compile left them.
|
|
526
|
+
* Presence only moves a row across its own span, so nothing else would put
|
|
527
|
+
* one back before its command starts.
|
|
528
|
+
*/
|
|
529
|
+
_displaced = [];
|
|
530
|
+
/** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */
|
|
531
|
+
_unmounted = new Set();
|
|
416
532
|
_presence = null;
|
|
417
533
|
/** The rows the last {@link syncPresence} brought in, in document order. */
|
|
418
534
|
_arrived = [];
|
|
@@ -474,8 +590,17 @@ export class SceneTimeline {
|
|
|
474
590
|
this.canvas.set({ ...literal, ...bindings });
|
|
475
591
|
}
|
|
476
592
|
/** A row's node with its literal props passed to the constructor and its expressions bound after. */
|
|
477
|
-
_instantiate(spec) {
|
|
478
|
-
const
|
|
593
|
+
_instantiate(spec, rows = this._specs) {
|
|
594
|
+
const props = migrateNodeProps(this._registry, spec.type, spec.props).props;
|
|
595
|
+
const { literal, bindings, hasBindings } = expressionOps.bindProps(props, this._resolveVariable);
|
|
596
|
+
if (!this._registry.strict && !this._registry.hasNode(spec.type)) {
|
|
597
|
+
const dimension = this._placeholderDimension(spec, rows);
|
|
598
|
+
const node = missingNode(dimension, spec, literal);
|
|
599
|
+
const bound = placeholderProps(dimension, bindings);
|
|
600
|
+
if (Object.keys(bound).length > 0)
|
|
601
|
+
node.set(bound);
|
|
602
|
+
return node;
|
|
603
|
+
}
|
|
479
604
|
const node = this._registry.instantiate(spec, literal);
|
|
480
605
|
// Applied after construction rather than through it: see `instantiate`.
|
|
481
606
|
if (hasBindings)
|
|
@@ -524,18 +649,23 @@ export class SceneTimeline {
|
|
|
524
649
|
* Truncating is what keeps the pair a function of the chain rather than of
|
|
525
650
|
* how the playhead got here.
|
|
526
651
|
*/
|
|
527
|
-
_restoreBaselines() {
|
|
652
|
+
_restoreBaselines(nodes = this._animated) {
|
|
653
|
+
// Structure before props: a node put back is attached, and the baseline is
|
|
654
|
+
// what it holds once attached.
|
|
655
|
+
this._restoreDisplaced(this._displaced);
|
|
528
656
|
// Variables first, so a prop bound to one recomputes against the restored
|
|
529
657
|
// value rather than a stale one.
|
|
530
658
|
for (const entry of this._animatedVars)
|
|
531
659
|
entry.cell.set(entry.baseline);
|
|
532
|
-
for (const entry of
|
|
660
|
+
for (const entry of nodes) {
|
|
533
661
|
const host = entry.node;
|
|
534
662
|
applySnapshotLayer(host, entry.baseline);
|
|
535
663
|
if (host._stateStack.length > entry.baseStackDepth) {
|
|
536
664
|
host._stateStack.length = entry.baseStackDepth;
|
|
537
665
|
}
|
|
538
666
|
}
|
|
667
|
+
for (const slot of this._animatedParts)
|
|
668
|
+
slot.restoreFrom(this._partBaselines.get(slot));
|
|
539
669
|
}
|
|
540
670
|
/**
|
|
541
671
|
* Build every command, in timeline order, against a node already holding
|
|
@@ -562,13 +692,10 @@ export class SceneTimeline {
|
|
|
562
692
|
// Every node present but not yet baselined arrived in this sync:
|
|
563
693
|
// one that left and came back was baselined the first time.
|
|
564
694
|
for (const row of this._arrived) {
|
|
565
|
-
if (this._baselined.has(row.id))
|
|
566
|
-
|
|
567
|
-
const arrived = this._live.get(row.id);
|
|
568
|
-
if (arrived)
|
|
569
|
-
captureBaseline(arrived);
|
|
570
|
-
this._baselined.add(row.id);
|
|
695
|
+
if (!this._baselined.has(row.id))
|
|
696
|
+
this._baselineArrival(row.id);
|
|
571
697
|
}
|
|
698
|
+
this._baselineMounted();
|
|
572
699
|
if (settles[i])
|
|
573
700
|
settle();
|
|
574
701
|
}
|
|
@@ -579,11 +706,124 @@ export class SceneTimeline {
|
|
|
579
706
|
this._touch(placed, touched);
|
|
580
707
|
}
|
|
581
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Building runs every marked command to its end, which the restore then undoes.
|
|
711
|
+
* A node only marked commands write keeps every other slot at its baseline from
|
|
712
|
+
* here on, so an evaluation puts back only the slots they write.
|
|
713
|
+
*/
|
|
714
|
+
_indexSettled() {
|
|
715
|
+
const index = (this._settled = SettledIndex.build(this._placed));
|
|
716
|
+
if (!index)
|
|
717
|
+
return;
|
|
718
|
+
this._restoreBaselines();
|
|
719
|
+
const whole = new Set();
|
|
720
|
+
const written = new Map();
|
|
721
|
+
this._placed.forEach((placed, i) => {
|
|
722
|
+
const held = index.holds(i);
|
|
723
|
+
if (!held)
|
|
724
|
+
whole.add(placed.owner);
|
|
725
|
+
for (const slot of placed.writes) {
|
|
726
|
+
const host = slot._host;
|
|
727
|
+
const entry = host === null ? undefined : host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);
|
|
728
|
+
if (!entry)
|
|
729
|
+
continue;
|
|
730
|
+
if (!held)
|
|
731
|
+
whole.add(entry);
|
|
732
|
+
else if (written.has(entry))
|
|
733
|
+
written.get(entry).add(slot);
|
|
734
|
+
else
|
|
735
|
+
written.set(entry, new Set([slot]));
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
this._wholeRestore = [];
|
|
739
|
+
this._slotRestore = [];
|
|
740
|
+
for (const entry of this._animated) {
|
|
741
|
+
const slots = whole.has(entry) ? null : slotBaselines(entry, written.get(entry));
|
|
742
|
+
if (slots)
|
|
743
|
+
this._slotRestore.push(...slots);
|
|
744
|
+
else
|
|
745
|
+
this._wholeRestore.push(entry);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
/** The present rows whose node is no longer under the parent its row names. */
|
|
749
|
+
_collectDisplaced() {
|
|
750
|
+
const out = [];
|
|
751
|
+
for (const id of this._present) {
|
|
752
|
+
const entry = this._live.get(id);
|
|
753
|
+
const parent = entry && this._declaredParent(id);
|
|
754
|
+
if (entry && parent && entry.node.parent !== parent)
|
|
755
|
+
out.push(entry);
|
|
756
|
+
}
|
|
757
|
+
out.sort((a, b) => this._presenceIndex().row(a.spec.id).slot - this._presenceIndex().row(b.spec.id).slot);
|
|
758
|
+
return (this._displaced = out);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Put displaced rows back where {@link syncPresence} would have inserted them.
|
|
762
|
+
* Returns whether any moved.
|
|
763
|
+
*/
|
|
764
|
+
_restoreDisplaced(entries) {
|
|
765
|
+
let moved = false;
|
|
766
|
+
for (const entry of entries) {
|
|
767
|
+
const id = entry.spec.id;
|
|
768
|
+
const row = this._presenceIndex().row(id);
|
|
769
|
+
const parent = this._declaredParent(id);
|
|
770
|
+
if (!row || !parent || !this._present.has(id) || entry.node.parent === parent)
|
|
771
|
+
continue;
|
|
772
|
+
entry.node.parent?.remove(entry.node);
|
|
773
|
+
const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;
|
|
774
|
+
parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });
|
|
775
|
+
moved = true;
|
|
776
|
+
}
|
|
777
|
+
return moved;
|
|
778
|
+
}
|
|
779
|
+
/** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */
|
|
780
|
+
_declaredParent(id) {
|
|
781
|
+
const parentId = this._presenceIndex().row(id)?.siblings.parentId;
|
|
782
|
+
if (parentId === undefined)
|
|
783
|
+
return undefined;
|
|
784
|
+
return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Take the baseline of a row that has just arrived, if it is mounted.
|
|
788
|
+
*
|
|
789
|
+
* A baseline is the node as it stands once attached: an unmounted node's cells
|
|
790
|
+
* hold pre-attach values, without what it inherits from its ancestors. A row
|
|
791
|
+
* can arrive while an ancestor is still out of the tree (a child entering
|
|
792
|
+
* before its parent), so its baseline waits in {@link _unmounted} until
|
|
793
|
+
* {@link _baselineMounted} finds it mounted.
|
|
794
|
+
*/
|
|
795
|
+
_baselineArrival(id) {
|
|
796
|
+
const entry = this._live.get(id);
|
|
797
|
+
if (entry && !entry.node.mounted) {
|
|
798
|
+
this._unmounted.add(id);
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
if (entry)
|
|
802
|
+
captureBaseline(entry);
|
|
803
|
+
this._baselined.add(id);
|
|
804
|
+
this._unmounted.delete(id);
|
|
805
|
+
}
|
|
806
|
+
/** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */
|
|
807
|
+
_baselineMounted() {
|
|
808
|
+
for (const id of this._unmounted) {
|
|
809
|
+
const entry = this._live.get(id);
|
|
810
|
+
if (!entry) {
|
|
811
|
+
this._unmounted.delete(id);
|
|
812
|
+
}
|
|
813
|
+
else if (entry.node.mounted) {
|
|
814
|
+
captureBaseline(entry);
|
|
815
|
+
this._baselined.add(id);
|
|
816
|
+
this._unmounted.delete(id);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
582
820
|
/**
|
|
583
821
|
* Build one command against the tree as it stands and run it to its end —
|
|
584
822
|
* which is what leaves its target where the next command's `from` must start.
|
|
585
|
-
* Undone wholesale by {@link _restoreBaselines}.
|
|
586
|
-
*
|
|
823
|
+
* Undone wholesale by {@link _restoreBaselines}. Throws when its target names
|
|
824
|
+
* no row, for a node-scoped command of any kind. A command its target's type
|
|
825
|
+
* does not publish, or any aimed at a placeholder, is skipped and recorded
|
|
826
|
+
* (`null`) unless the registry is strict.
|
|
587
827
|
*
|
|
588
828
|
* The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`
|
|
589
829
|
* when the command is *constructed*, so a chain built against the untouched
|
|
@@ -598,21 +838,30 @@ export class SceneTimeline {
|
|
|
598
838
|
// up on. Everything else is a method on the target's own type, where it
|
|
599
839
|
// cannot collide with another type's command of the same name.
|
|
600
840
|
let entry = this._registry.command(spec.type);
|
|
841
|
+
if (entry?.scope !== "variable") {
|
|
842
|
+
const missing = missingNodeOf(this._targetOrThrow(spec).node);
|
|
843
|
+
if (missing) {
|
|
844
|
+
return this._skip(spec, `Command ${spec.id} ("${spec.type}") targets "${spec.targetId}", a placeholder for unknown node type "${missing.type}"; it is skipped.`, spec.type);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
601
847
|
if (!entry) {
|
|
602
|
-
const
|
|
603
|
-
const
|
|
604
|
-
const factory = typeKey ? this._registry.nodeCommand(typeKey, spec.type) : undefined;
|
|
848
|
+
const typeKey = this._targetOrThrow(spec).entry.spec.type;
|
|
849
|
+
const factory = this._registry.nodeCommand(typeKey, spec.type);
|
|
605
850
|
if (!factory) {
|
|
606
|
-
|
|
851
|
+
const message = `Node type "${typeKey}" has no command "${spec.type}" ` +
|
|
607
852
|
`(command ${spec.id}). It publishes: ` +
|
|
608
|
-
`${
|
|
609
|
-
(LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : "")
|
|
853
|
+
`${this._registry.commandKeys(typeKey).join(", ") || "none"}.` +
|
|
854
|
+
(LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : "");
|
|
855
|
+
if (this._registry.strict)
|
|
856
|
+
throw new Error(message);
|
|
857
|
+
return this._skip(spec, `${message} It is skipped.`, spec.type);
|
|
610
858
|
}
|
|
611
859
|
entry = { key: spec.type, scope: "node", factory };
|
|
612
860
|
}
|
|
861
|
+
this._skipped.delete(spec.id);
|
|
613
862
|
const duration = spec.duration ?? 0;
|
|
614
863
|
const easing = resolveEase(spec.easing, this._registry);
|
|
615
|
-
const recorder = new WriteRecorder();
|
|
864
|
+
const recorder = new WriteRecorder(this._notePartWrite);
|
|
616
865
|
// Applied inside `buildToEnd`, so the `at(1)` that leaves the target where
|
|
617
866
|
// the next command's `from` starts is the *loop's* end — which for an odd
|
|
618
867
|
// number of `alternate` passes is back where it began. A looped command
|
|
@@ -628,16 +877,53 @@ export class SceneTimeline {
|
|
|
628
877
|
}
|
|
629
878
|
this._assertNoExpressions(spec);
|
|
630
879
|
const { factory } = entry;
|
|
631
|
-
const
|
|
632
|
-
|
|
880
|
+
const held = holdsWhenFinished(commandTraits(this._registry, spec, undefined), spec);
|
|
881
|
+
const command = observeSlots(recorder, () => buildToEnd(() => repeat(heldIf(held, factory(variable.target, spec.args, duration, easing)))));
|
|
882
|
+
return { spec, start: spec.at, holdFrom: spec.at, entrance: false, duration: loop ? command.duration : duration, command, writes: recorder.writes, reads: readsOf(command, recorder, [variable.cell]), readsLayout: recorder.readsLayout, owner: variable };
|
|
633
883
|
}
|
|
634
|
-
const target = this.
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
884
|
+
const target = this._targetOrThrow(spec);
|
|
885
|
+
// `to` and `set` carry a props diff, so a renamed prop is renamed there too.
|
|
886
|
+
const given = PROP_DIFF_COMMANDS.has(spec.type)
|
|
887
|
+
? migrateNodeProps(this._registry, target.entry.spec.type, spec.args).props
|
|
888
|
+
: spec.args;
|
|
889
|
+
const args = entry.binds ? this._bindArgs(given) : (this._assertNoExpressions(spec), given);
|
|
638
890
|
const { factory } = entry;
|
|
639
|
-
const
|
|
640
|
-
|
|
891
|
+
const held = holdsWhenFinished(commandTraits(this._registry, spec, target.entry.spec), spec);
|
|
892
|
+
const command = observeSlots(recorder, () => buildToEnd(() => repeat(heldIf(held, factory(target.node, args, duration, easing)))));
|
|
893
|
+
const entrance = entry.scope === "node" && this._registry.node(target.entry.spec.type)?.commands.get(spec.type)?.entrance === true;
|
|
894
|
+
return { spec, start: spec.at, holdFrom: spec.at, entrance, duration: loop ? command.duration : duration, command, writes: recorder.writes, reads: readsOf(command, recorder, target.node.__cells?.slots.values() ?? []), readsLayout: recorder.readsLayout, owner: target.entry };
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Hold each entrance's first frame back from its `at`, so the node it brings in
|
|
898
|
+
* never shows at rest ahead of it.
|
|
899
|
+
*
|
|
900
|
+
* Back to the later of the moment its target arrives and the latest end of an
|
|
901
|
+
* earlier command writing any slot it writes. Stopping there keeps placement
|
|
902
|
+
* order honest: a command the entrance would otherwise overwrite still shows,
|
|
903
|
+
* and an entrance after an exit keeps the node gone in between. A command on
|
|
904
|
+
* the same node that writes other slots (a `moveTo` while it waits) does not
|
|
905
|
+
* stop it.
|
|
906
|
+
*/
|
|
907
|
+
_holdEntrances() {
|
|
908
|
+
const ended = new Map();
|
|
909
|
+
let byId;
|
|
910
|
+
for (const placed of this._placed) {
|
|
911
|
+
placed.holdFrom = placed.start;
|
|
912
|
+
if (placed.entrance) {
|
|
913
|
+
const id = placed.owner.spec.id;
|
|
914
|
+
byId ??= new Map(this._specs.map((s) => [s.id, s]));
|
|
915
|
+
let from = id === ROOT_NODE_ID ? 0 : effectiveSpanIn(byId, id)?.start ?? placed.start;
|
|
916
|
+
for (const slot of placed.writes)
|
|
917
|
+
from = Math.max(from, ended.get(slot) ?? -Infinity);
|
|
918
|
+
if (from < placed.start)
|
|
919
|
+
placed.holdFrom = Math.max(0, from);
|
|
920
|
+
}
|
|
921
|
+
const end = placed.start + placed.duration;
|
|
922
|
+
for (const slot of placed.writes) {
|
|
923
|
+
if (!(end <= (ended.get(slot) ?? -Infinity)))
|
|
924
|
+
ended.set(slot, end);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
641
927
|
}
|
|
642
928
|
/**
|
|
643
929
|
* Seconds an unlimited loop starting at `at` has to fill.
|
|
@@ -661,11 +947,10 @@ export class SceneTimeline {
|
|
|
661
947
|
* playhead reached it, which is the one thing the whole design forbids.
|
|
662
948
|
*
|
|
663
949
|
* `writes` is already recorded (see {@link WriteRecorder}) and a slot carries
|
|
664
|
-
* its owner, so this needs no declaration from the command. A slot
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
* rebuilt with its parent.
|
|
950
|
+
* its owner, so this needs no declaration from the command. A variable's slot
|
|
951
|
+
* arrives as {@link PlacedCommand.owner}. A slot on a part a node built for
|
|
952
|
+
* itself has no row to be restored through, so it is restored on its own, to
|
|
953
|
+
* the state {@link _notePartWrite} saw before any command wrote it.
|
|
669
954
|
*/
|
|
670
955
|
_touch(placed, touched) {
|
|
671
956
|
this._touchOwner(placed.owner, touched);
|
|
@@ -674,8 +959,13 @@ export class SceneTimeline {
|
|
|
674
959
|
if (host === null)
|
|
675
960
|
continue;
|
|
676
961
|
const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);
|
|
677
|
-
if (entry)
|
|
962
|
+
if (entry) {
|
|
678
963
|
this._touchOwner(entry, touched);
|
|
964
|
+
}
|
|
965
|
+
else if (this._partBaselines.has(slot) && !touched.has(slot)) {
|
|
966
|
+
touched.add(slot);
|
|
967
|
+
this._animatedParts.push(slot);
|
|
968
|
+
}
|
|
679
969
|
}
|
|
680
970
|
}
|
|
681
971
|
_touchOwner(owner, touched) {
|
|
@@ -687,6 +977,23 @@ export class SceneTimeline {
|
|
|
687
977
|
else
|
|
688
978
|
this._animated.push(owner);
|
|
689
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* Save a part's slot the first time a command is about to write it.
|
|
982
|
+
*
|
|
983
|
+
* Called by the observer *before* the write lands, while a command is built:
|
|
984
|
+
* every earlier command has run to its end by then, but none of them wrote
|
|
985
|
+
* this slot, so what it holds is what the part was built with (plus whatever
|
|
986
|
+
* the command's own factory primed, which is part of the command, not of the
|
|
987
|
+
* part).
|
|
988
|
+
*/
|
|
989
|
+
_notePartWrite = (slot) => {
|
|
990
|
+
const host = slot._host;
|
|
991
|
+
if (host === null || this._partBaselines.has(slot))
|
|
992
|
+
return;
|
|
993
|
+
if (host.id === ROOT_NODE_ID || this._live.has(host.id))
|
|
994
|
+
return;
|
|
995
|
+
this._partBaselines.set(slot, slot.snapshot());
|
|
996
|
+
};
|
|
690
997
|
/**
|
|
691
998
|
* Compile the expressions in a binding command's args.
|
|
692
999
|
*
|
|
@@ -719,6 +1026,54 @@ export class SceneTimeline {
|
|
|
719
1026
|
`Bind the prop where the node is authored (or with a "set" command) and animate the variable ` +
|
|
720
1027
|
`with "variableTo" instead.`);
|
|
721
1028
|
}
|
|
1029
|
+
_skip(spec, message, type) {
|
|
1030
|
+
this._skipped.set(spec.id, {
|
|
1031
|
+
code: "unknown-command",
|
|
1032
|
+
commandId: spec.id,
|
|
1033
|
+
...(spec.targetId !== null && { nodeId: spec.targetId }),
|
|
1034
|
+
type,
|
|
1035
|
+
message,
|
|
1036
|
+
});
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* The tree a placeholder for `spec` belongs to: its children's, else the one
|
|
1041
|
+
* its parent holds — a viewport holding two trees gives the one it adds.
|
|
1042
|
+
*/
|
|
1043
|
+
_placeholderDimension(spec, rows) {
|
|
1044
|
+
const byId = new Map(rows.map((row) => [row.id, row]));
|
|
1045
|
+
const seen = new Set();
|
|
1046
|
+
const of = (row) => {
|
|
1047
|
+
seen.add(row.id);
|
|
1048
|
+
for (const child of rows) {
|
|
1049
|
+
if (child.parentId !== row.id)
|
|
1050
|
+
continue;
|
|
1051
|
+
const dimension = this._registry.describe(child.type)?.dimension;
|
|
1052
|
+
if (dimension)
|
|
1053
|
+
return dimension;
|
|
1054
|
+
}
|
|
1055
|
+
const parent = row.parentId === null ? undefined : byId.get(row.parentId);
|
|
1056
|
+
if (!parent)
|
|
1057
|
+
return "2d";
|
|
1058
|
+
const described = this._registry.describe(parent.type);
|
|
1059
|
+
if (!described)
|
|
1060
|
+
return seen.has(parent.id) ? "2d" : of(parent);
|
|
1061
|
+
const holds = (described.holds ?? []).filter((d) => d !== "audio");
|
|
1062
|
+
if (holds.length === 0)
|
|
1063
|
+
return described.holds?.includes("audio") ? "audio" : described.dimension ?? "2d";
|
|
1064
|
+
return holds.find((d) => d !== described.dimension) ?? holds[0];
|
|
1065
|
+
};
|
|
1066
|
+
return of(spec);
|
|
1067
|
+
}
|
|
1068
|
+
/** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */
|
|
1069
|
+
_targetOrThrow(spec) {
|
|
1070
|
+
const target = this._targetOf(spec);
|
|
1071
|
+
if (!target) {
|
|
1072
|
+
throw new Error(`Command ${spec.id} ("${spec.type}") targets node "${spec.targetId}", ` +
|
|
1073
|
+
`which this document does not declare.`);
|
|
1074
|
+
}
|
|
1075
|
+
return target;
|
|
1076
|
+
}
|
|
722
1077
|
/** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */
|
|
723
1078
|
_targetOf(spec) {
|
|
724
1079
|
if (spec.targetId === null) {
|
|
@@ -733,9 +1088,9 @@ export class SceneTimeline {
|
|
|
733
1088
|
observeSlots(observer, () => {
|
|
734
1089
|
for (; index < this._placed.length; index++) {
|
|
735
1090
|
const placed = this._placed[index];
|
|
736
|
-
if (seconds < placed.
|
|
1091
|
+
if (seconds < placed.holdFrom)
|
|
737
1092
|
continue;
|
|
738
|
-
const local = placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;
|
|
1093
|
+
const local = seconds < placed.start ? 0 : placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;
|
|
739
1094
|
placed.command.at(clamp01(local));
|
|
740
1095
|
}
|
|
741
1096
|
});
|
|
@@ -805,11 +1160,27 @@ export class SceneTimeline {
|
|
|
805
1160
|
nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),
|
|
806
1161
|
isContextProvider: (type) => isContextProvider(registry, type),
|
|
807
1162
|
isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),
|
|
808
|
-
|
|
809
|
-
|
|
1163
|
+
writesInPlace: (row, key) => writesPlacementInPlace(registry, row, key),
|
|
1164
|
+
ctorOf: (id) => {
|
|
1165
|
+
const node = this._live.get(id)?.node;
|
|
1166
|
+
return node && missingNodeOf(node) ? MISSING_TYPE : node?.constructor;
|
|
1167
|
+
},
|
|
1168
|
+
registeredCtor: (type) => registry.node(type)?.ctor ?? (registry.strict ? undefined : MISSING_TYPE),
|
|
810
1169
|
dimensionOf: (type) => registry.node(type)?.descriptor.dimension,
|
|
811
1170
|
};
|
|
812
1171
|
}
|
|
1172
|
+
/** Write the props `entry`'s row changed since `was` as its new initial values. */
|
|
1173
|
+
_writeInPlace(entry, was) {
|
|
1174
|
+
const changed = {};
|
|
1175
|
+
for (const [key, value] of Object.entries(entry.spec.props)) {
|
|
1176
|
+
if (!jsonEqual(was.props[key], value))
|
|
1177
|
+
changed[key] = value;
|
|
1178
|
+
}
|
|
1179
|
+
resetToInitial(entry);
|
|
1180
|
+
const { literal, bindings } = expressionOps.bindProps(changed, this._resolveVariable);
|
|
1181
|
+
entry.node.set({ ...literal, ...bindings });
|
|
1182
|
+
captureInitial(entry);
|
|
1183
|
+
}
|
|
813
1184
|
_updateVariables(patch) {
|
|
814
1185
|
const { added, removed, changed } = patch.diff.variables;
|
|
815
1186
|
for (const id of removed)
|
|
@@ -862,6 +1233,7 @@ export class SceneTimeline {
|
|
|
862
1233
|
this._live.delete(id);
|
|
863
1234
|
this._baseChildCount.delete(id);
|
|
864
1235
|
this._baselined.delete(id);
|
|
1236
|
+
this._unmounted.delete(id);
|
|
865
1237
|
}
|
|
866
1238
|
for (const id of patch.reinstantiate) {
|
|
867
1239
|
const entry = this._live.get(id);
|
|
@@ -876,11 +1248,12 @@ export class SceneTimeline {
|
|
|
876
1248
|
entry.spec = spec;
|
|
877
1249
|
continue;
|
|
878
1250
|
}
|
|
879
|
-
const node = this._instantiate(spec);
|
|
1251
|
+
const node = this._instantiate(spec, rest);
|
|
880
1252
|
if (entry) {
|
|
881
1253
|
entry.spec = spec;
|
|
882
1254
|
entry.node = node;
|
|
883
1255
|
this._baselined.delete(spec.id);
|
|
1256
|
+
this._unmounted.delete(spec.id);
|
|
884
1257
|
}
|
|
885
1258
|
else {
|
|
886
1259
|
entry = {
|
|
@@ -960,12 +1333,11 @@ export class SceneTimeline {
|
|
|
960
1333
|
const step = steps[i];
|
|
961
1334
|
if (settles[i])
|
|
962
1335
|
pending = true;
|
|
963
|
-
this.syncPresence(step.at)
|
|
1336
|
+
if (this.syncPresence(step.at))
|
|
1337
|
+
this._baselineMounted();
|
|
964
1338
|
if (step.capture !== undefined) {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
captureBaseline(entry);
|
|
968
|
-
this._baselined.add(step.capture);
|
|
1339
|
+
this._baselined.delete(step.capture);
|
|
1340
|
+
this._baselineArrival(step.capture);
|
|
969
1341
|
continue;
|
|
970
1342
|
}
|
|
971
1343
|
// After this `at`'s captures, as compile baselines arrivals before it settles.
|
|
@@ -997,15 +1369,26 @@ const LEGACY_COMMAND_HINTS = {
|
|
|
997
1369
|
variable: "A variable is declared in `variables`.",
|
|
998
1370
|
};
|
|
999
1371
|
const NO_LAYER = new Map();
|
|
1372
|
+
const PROP_DIFF_COMMANDS = new Set(["to", "set"]);
|
|
1000
1373
|
/** Records what building one command wrote, and whether it read a laid-out box. */
|
|
1001
1374
|
class WriteRecorder {
|
|
1375
|
+
firstWrite;
|
|
1002
1376
|
writes = new Set();
|
|
1377
|
+
reads = new Set();
|
|
1003
1378
|
readsLayout = false;
|
|
1379
|
+
/** `firstWrite` runs the first time a slot is written, before the write lands. */
|
|
1380
|
+
constructor(firstWrite) {
|
|
1381
|
+
this.firstWrite = firstWrite;
|
|
1382
|
+
}
|
|
1004
1383
|
read(slot) {
|
|
1005
1384
|
if (slot._name === LAYOUT_SLOT)
|
|
1006
1385
|
this.readsLayout = true;
|
|
1386
|
+
this.reads.add(slot);
|
|
1007
1387
|
}
|
|
1008
1388
|
write(slot) {
|
|
1389
|
+
if (this.writes.has(slot))
|
|
1390
|
+
return;
|
|
1391
|
+
this.firstWrite(slot);
|
|
1009
1392
|
this.writes.add(slot);
|
|
1010
1393
|
}
|
|
1011
1394
|
}
|
|
@@ -1033,6 +1416,21 @@ function captureBaseline(entry) {
|
|
|
1033
1416
|
entry.baseline = captureLayer(host);
|
|
1034
1417
|
entry.baseStackDepth = host._stateStack.length;
|
|
1035
1418
|
}
|
|
1419
|
+
/** The baseline of each of `slots`, or `null` when one isn't among the node's props. */
|
|
1420
|
+
function slotBaselines(entry, slots) {
|
|
1421
|
+
if (!slots)
|
|
1422
|
+
return [];
|
|
1423
|
+
const cells = entry.node.__cells?.slots;
|
|
1424
|
+
if (!cells)
|
|
1425
|
+
return null;
|
|
1426
|
+
const out = [];
|
|
1427
|
+
for (const [key, slot] of cells) {
|
|
1428
|
+
const baseline = slots.has(slot) ? entry.baseline.get(key) : undefined;
|
|
1429
|
+
if (baseline)
|
|
1430
|
+
out.push({ slot, baseline });
|
|
1431
|
+
}
|
|
1432
|
+
return out.length === slots.size ? out : null;
|
|
1433
|
+
}
|
|
1036
1434
|
function captureInitial(entry) {
|
|
1037
1435
|
captureBaseline(entry);
|
|
1038
1436
|
entry.initial = entry.baseline;
|