@motionscript/core 0.1.0-alpha.7 → 0.1.0-alpha.8
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 +6 -0
- package/NOTICE +15 -14
- package/README.md +4 -4
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +7 -5
- package/dist/assets/manager.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/effects/implementations/echo.js +11 -0
- 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/effects/implementations/gain.js +6 -0
- 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/effects/implementations/highpass.js +10 -0
- 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/effects/implementations/lowpass.js +10 -0
- 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/effects/implementations/tremolo.js +10 -0
- 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 +24 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +4 -3
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +21 -13
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +42 -28
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +15 -12
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -10
- 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 +4 -3
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +4 -7
- package/dist/attributes/index.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/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +7 -7
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -6
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -2
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +1 -2
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +96 -409
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +93 -283
- 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 +96 -26
- 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 +20 -6
- 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 +46 -14
- 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 +76 -19
- 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 +34 -7
- 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 +42 -26
- 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 +4 -2
- 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 +11 -0
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +113 -102
- 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/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/implementations/shader.d.ts +27 -26
- 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/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/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 +2 -6
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -5
- 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/registry.d.ts +1 -1
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +2 -3
- 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/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/browser/chunks/chunk-AOT33LMS.js +13 -0
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +4 -4
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/components/builtins/audio/audio.d.ts +14 -5
- package/dist/components/builtins/audio/audio.d.ts.map +1 -1
- package/dist/components/builtins/audio/audio.js +10 -13
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.d.ts +3 -3
- package/dist/components/builtins/media/media.d.ts +7 -7
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +4 -10
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +12 -12
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js +3 -0
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/factory/api.d.ts +38 -11
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/component3d.d.ts.map +1 -1
- package/dist/components/factory/component3d.js +11 -3
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.d.ts +3 -0
- package/dist/components/factory/factory.d.ts.map +1 -1
- package/dist/components/factory/factory.js +39 -5
- package/dist/components/factory/factory.js.map +1 -1
- package/dist/components/modules/text-style.d.ts +1 -1
- package/dist/components/trees/2d/node-render.d.ts +1 -1
- package/dist/components/trees/2d/node-render.js +1 -1
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +1 -1
- package/dist/components/trees/2d/node2d.js +1 -1
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +16 -9
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +15 -11
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/document/command-traits.d.ts +12 -2
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +34 -6
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/index.d.ts +8 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +4 -0
- 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-descriptor.d.ts +4 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +2 -1
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +2 -0
- 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 +16 -0
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +30 -4
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +2 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +5 -5
- package/dist/document/settled-index.js.map +1 -1
- 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 +45 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +172 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +14 -28
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +17 -5
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +158 -21
- 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 +68 -8
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +22 -8
- package/dist/experimental.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -0
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +1 -1
- package/dist/renamed-scene-names.d.ts.map +1 -1
- package/dist/renamed-scene-names.js +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +9 -0
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +10 -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/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/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 +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/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +54 -5
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/runtime/asset-refine.js +2 -1
- 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 +7 -0
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +3 -1
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +4 -0
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +17 -2
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -3
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +14 -4
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +7 -3
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +11 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +8 -6
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +10 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +7 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -0
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +2 -0
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +4 -0
- package/dist/tween/ease/describe.js.map +1 -1
- 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 +1 -0
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +1 -0
- package/dist/tween/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/browser/chunks/chunk-D4FSTPML.js +0 -14
- package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
- package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
- package/dist/browser/chunks/chunk-RTNATFWX.js.map +0 -7
|
@@ -4,39 +4,22 @@ import { _observer, PropSlot } from "../props/slot.js";
|
|
|
4
4
|
import { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX } from "../props/observer.js";
|
|
5
5
|
import { driveCommand, loopCommand } 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, 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";
|
|
13
14
|
import { SettledIndex } from "./settled-index.js";
|
|
14
15
|
import { commandSoundsOf } from "../components/factory/timeline.js";
|
|
15
16
|
import { planTimelinePatch } from "./timeline-patch.js";
|
|
16
|
-
import { documentDuration, isStillDocument, nodeSpan, ROOT_NODE_ID } from "./types.js";
|
|
17
|
+
import { documentDuration, effectiveSpanIn, isStillDocument, nodeSpan, ROOT_NODE_ID } from "./types.js";
|
|
17
18
|
/** Resolve an {@link EaseSpec} to the function the tween actually calls. */
|
|
18
19
|
function resolveEase(ease, registry) {
|
|
19
20
|
if (!ease)
|
|
20
21
|
return undefined;
|
|
21
|
-
|
|
22
|
-
case "linear": return linear();
|
|
23
|
-
case "in": return easeIn(ease.args);
|
|
24
|
-
case "out": return easeOut(ease.args);
|
|
25
|
-
case "inOut": return easeInOut(ease.args);
|
|
26
|
-
case "custom": {
|
|
27
|
-
const key = ease.args;
|
|
28
|
-
if (isEaseCurve(key))
|
|
29
|
-
return curveEase(key);
|
|
30
|
-
if (typeof key !== "string") {
|
|
31
|
-
throw new Error(`A "custom" ease needs a curve or its Registry.addEase key in \`args\` (got ${JSON.stringify(ease.args)}).`);
|
|
32
|
-
}
|
|
33
|
-
const fn = registry.ease(key);
|
|
34
|
-
if (!fn) {
|
|
35
|
-
throw new Error(`No ease registered under "${key}". Registered: ${registry.easeKeys().join(", ") || "none"}.`);
|
|
36
|
-
}
|
|
37
|
-
return fn;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
22
|
+
return easeOfSpec(ease, (key) => registry.ease(key), () => registry.easeKeys());
|
|
40
23
|
}
|
|
41
24
|
/**
|
|
42
25
|
* Order commands for compilation and evaluation.
|
|
@@ -189,6 +172,7 @@ export class ClipTimeline {
|
|
|
189
172
|
const moved = this.syncPresence(0);
|
|
190
173
|
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
191
174
|
settle();
|
|
175
|
+
this._holdEntrances();
|
|
192
176
|
this._indexSettled();
|
|
193
177
|
}
|
|
194
178
|
/** What a variable holds at the last evaluated time. For a host's inspector. */
|
|
@@ -226,6 +210,23 @@ export class ClipTimeline {
|
|
|
226
210
|
placedCommands() {
|
|
227
211
|
return this._placed;
|
|
228
212
|
}
|
|
213
|
+
/** What the build stepped around — see {@link TimelineIssue}. Placeholders first, in row order. */
|
|
214
|
+
issues() {
|
|
215
|
+
const out = [];
|
|
216
|
+
for (const { spec, node } of this._live.values()) {
|
|
217
|
+
const missing = missingNodeOf(node);
|
|
218
|
+
if (!missing)
|
|
219
|
+
continue;
|
|
220
|
+
out.push({
|
|
221
|
+
code: "unknown-node-type",
|
|
222
|
+
nodeId: spec.id,
|
|
223
|
+
type: missing.type,
|
|
224
|
+
message: `Unknown node type "${missing.type}" (node ${spec.id}): it builds as an empty placeholder, keeping its children.`,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
out.push(...this._skipped.values());
|
|
228
|
+
return out;
|
|
229
|
+
}
|
|
229
230
|
/**
|
|
230
231
|
* Put every node into the state it holds at `seconds`.
|
|
231
232
|
*
|
|
@@ -255,11 +256,11 @@ export class ClipTimeline {
|
|
|
255
256
|
}
|
|
256
257
|
this._restoreBaselines();
|
|
257
258
|
for (const placed of this._placed) {
|
|
258
|
-
if (seconds < placed.
|
|
259
|
+
if (seconds < placed.holdFrom)
|
|
259
260
|
continue;
|
|
260
|
-
const local = placed.
|
|
261
|
-
? (seconds - placed.start) / placed.duration
|
|
262
|
-
|
|
261
|
+
const local = seconds < placed.start ? 0
|
|
262
|
+
: placed.duration > 0 ? (seconds - placed.start) / placed.duration
|
|
263
|
+
: 1;
|
|
263
264
|
// A finished command is held at `at(1)` rather than dropped, so a prop
|
|
264
265
|
// written early and never touched again keeps its value — the same
|
|
265
266
|
// rule `commandSequence` uses.
|
|
@@ -395,6 +396,11 @@ export class ClipTimeline {
|
|
|
395
396
|
else
|
|
396
397
|
this._unmounted.add(id);
|
|
397
398
|
}
|
|
399
|
+
for (const id of patch.inPlace) {
|
|
400
|
+
const entry = this._live.get(id);
|
|
401
|
+
if (entry)
|
|
402
|
+
this._writeInPlace(entry, patch.prev.nodes.get(id));
|
|
403
|
+
}
|
|
398
404
|
if (patch.diff.rootChanged) {
|
|
399
405
|
const host = this.canvas;
|
|
400
406
|
applySnapshotLayer(host, this._pristineRoot);
|
|
@@ -433,10 +439,14 @@ export class ClipTimeline {
|
|
|
433
439
|
}
|
|
434
440
|
}
|
|
435
441
|
this._placed = placed;
|
|
442
|
+
for (const id of this._skipped.keys())
|
|
443
|
+
if (!patch.next.commands.has(id))
|
|
444
|
+
this._skipped.delete(id);
|
|
436
445
|
this._restoreBaselines();
|
|
437
446
|
const moved = this.syncPresence(0);
|
|
438
447
|
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
439
448
|
settle();
|
|
449
|
+
this._holdEntrances();
|
|
440
450
|
this._indexSettled();
|
|
441
451
|
}
|
|
442
452
|
_doc;
|
|
@@ -459,6 +469,8 @@ export class ClipTimeline {
|
|
|
459
469
|
/** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */
|
|
460
470
|
_keyed;
|
|
461
471
|
_placed = [];
|
|
472
|
+
/** Commands left out of {@link _placed}, by id — see {@link issues}. */
|
|
473
|
+
_skipped = new Map();
|
|
462
474
|
/** Built after every compile and update, when any placed command is marked settling (`tween/command`). */
|
|
463
475
|
_settled = null;
|
|
464
476
|
/** With {@link _settled}: the animated nodes an unmarked command writes, put back whole… */
|
|
@@ -562,8 +574,17 @@ export class ClipTimeline {
|
|
|
562
574
|
this.canvas.set({ ...literal, ...bindings });
|
|
563
575
|
}
|
|
564
576
|
/** A row's node with its literal props passed to the constructor and its expressions bound after. */
|
|
565
|
-
_instantiate(spec) {
|
|
566
|
-
const
|
|
577
|
+
_instantiate(spec, rows = this._specs) {
|
|
578
|
+
const props = migrateNodeProps(this._registry, spec.type, spec.props).props;
|
|
579
|
+
const { literal, bindings, hasBindings } = expressionOps.bindProps(props, this._resolveVariable);
|
|
580
|
+
if (!this._registry.strict && !this._registry.hasNode(spec.type)) {
|
|
581
|
+
const dimension = this._placeholderDimension(spec, rows);
|
|
582
|
+
const node = missingNode(dimension, spec, literal);
|
|
583
|
+
const bound = placeholderProps(dimension, bindings);
|
|
584
|
+
if (Object.keys(bound).length > 0)
|
|
585
|
+
node.set(bound);
|
|
586
|
+
return node;
|
|
587
|
+
}
|
|
567
588
|
const node = this._registry.instantiate(spec, literal);
|
|
568
589
|
// Applied after construction rather than through it: see `instantiate`.
|
|
569
590
|
if (hasBindings)
|
|
@@ -663,6 +684,8 @@ export class ClipTimeline {
|
|
|
663
684
|
settle();
|
|
664
685
|
}
|
|
665
686
|
const placed = this._buildPlaced(spec);
|
|
687
|
+
if (!placed)
|
|
688
|
+
continue;
|
|
666
689
|
this._placed.push(placed);
|
|
667
690
|
this._touch(placed, touched);
|
|
668
691
|
}
|
|
@@ -782,7 +805,9 @@ export class ClipTimeline {
|
|
|
782
805
|
* Build one command against the tree as it stands and run it to its end —
|
|
783
806
|
* which is what leaves its target where the next command's `from` must start.
|
|
784
807
|
* Undone wholesale by {@link _restoreBaselines}. Throws when its target names
|
|
785
|
-
* no row, for a node-scoped command of any kind.
|
|
808
|
+
* no row, for a node-scoped command of any kind. A command its target's type
|
|
809
|
+
* does not publish, or any aimed at a placeholder, is skipped and recorded
|
|
810
|
+
* (`null`) unless the registry is strict.
|
|
786
811
|
*
|
|
787
812
|
* The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`
|
|
788
813
|
* when the command is *constructed*, so a chain built against the untouched
|
|
@@ -797,17 +822,27 @@ export class ClipTimeline {
|
|
|
797
822
|
// up on. Everything else is a method on the target's own type, where it
|
|
798
823
|
// cannot collide with another type's command of the same name.
|
|
799
824
|
let entry = this._registry.command(spec.type);
|
|
825
|
+
if (entry?.scope !== "variable") {
|
|
826
|
+
const missing = missingNodeOf(this._targetOrThrow(spec).node);
|
|
827
|
+
if (missing) {
|
|
828
|
+
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);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
800
831
|
if (!entry) {
|
|
801
832
|
const typeKey = this._targetOrThrow(spec).entry.spec.type;
|
|
802
833
|
const factory = this._registry.nodeCommand(typeKey, spec.type);
|
|
803
834
|
if (!factory) {
|
|
804
|
-
|
|
835
|
+
const message = `Node type "${typeKey}" has no command "${spec.type}" ` +
|
|
805
836
|
`(command ${spec.id}). It publishes: ` +
|
|
806
837
|
`${this._registry.commandKeys(typeKey).join(", ") || "none"}.` +
|
|
807
|
-
(LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : "")
|
|
838
|
+
(LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : "");
|
|
839
|
+
if (this._registry.strict)
|
|
840
|
+
throw new Error(message);
|
|
841
|
+
return this._skip(spec, `${message} It is skipped.`, spec.type);
|
|
808
842
|
}
|
|
809
843
|
entry = { key: spec.type, scope: "node", factory };
|
|
810
844
|
}
|
|
845
|
+
this._skipped.delete(spec.id);
|
|
811
846
|
const duration = spec.duration ?? 0;
|
|
812
847
|
const easing = resolveEase(spec.easing, this._registry);
|
|
813
848
|
const recorder = new WriteRecorder(this._notePartWrite);
|
|
@@ -827,13 +862,50 @@ export class ClipTimeline {
|
|
|
827
862
|
this._assertNoExpressions(spec);
|
|
828
863
|
const { factory } = entry;
|
|
829
864
|
const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));
|
|
830
|
-
return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };
|
|
865
|
+
return { spec, start: spec.at, holdFrom: spec.at, entrance: false, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };
|
|
831
866
|
}
|
|
832
867
|
const target = this._targetOrThrow(spec);
|
|
833
|
-
|
|
868
|
+
// `to` and `set` carry a props diff, so a renamed prop is renamed there too.
|
|
869
|
+
const given = PROP_DIFF_COMMANDS.has(spec.type)
|
|
870
|
+
? migrateNodeProps(this._registry, target.entry.spec.type, spec.args).props
|
|
871
|
+
: spec.args;
|
|
872
|
+
const args = entry.binds ? this._bindArgs(given) : (this._assertNoExpressions(spec), given);
|
|
834
873
|
const { factory } = entry;
|
|
835
874
|
const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(target.node, args, duration, easing))));
|
|
836
|
-
|
|
875
|
+
const entrance = entry.scope === "node" && this._registry.node(target.entry.spec.type)?.commands.get(spec.type)?.entrance === true;
|
|
876
|
+
return { spec, start: spec.at, holdFrom: spec.at, entrance, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: target.entry };
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Hold each entrance's first frame back from its `at`, so the node it brings in
|
|
880
|
+
* never shows at rest ahead of it.
|
|
881
|
+
*
|
|
882
|
+
* Back to the later of the moment its target arrives and the latest end of an
|
|
883
|
+
* earlier command writing any slot it writes. Stopping there keeps placement
|
|
884
|
+
* order honest: a command the entrance would otherwise overwrite still shows,
|
|
885
|
+
* and an entrance after an exit keeps the node gone in between. A command on
|
|
886
|
+
* the same node that writes other slots (a `moveTo` while it waits) does not
|
|
887
|
+
* stop it.
|
|
888
|
+
*/
|
|
889
|
+
_holdEntrances() {
|
|
890
|
+
const ended = new Map();
|
|
891
|
+
let byId;
|
|
892
|
+
for (const placed of this._placed) {
|
|
893
|
+
placed.holdFrom = placed.start;
|
|
894
|
+
if (placed.entrance) {
|
|
895
|
+
const id = placed.owner.spec.id;
|
|
896
|
+
byId ??= new Map(this._specs.map((s) => [s.id, s]));
|
|
897
|
+
let from = id === ROOT_NODE_ID ? 0 : effectiveSpanIn(byId, id)?.start ?? placed.start;
|
|
898
|
+
for (const slot of placed.writes)
|
|
899
|
+
from = Math.max(from, ended.get(slot) ?? -Infinity);
|
|
900
|
+
if (from < placed.start)
|
|
901
|
+
placed.holdFrom = Math.max(0, from);
|
|
902
|
+
}
|
|
903
|
+
const end = placed.start + placed.duration;
|
|
904
|
+
for (const slot of placed.writes) {
|
|
905
|
+
if (!(end <= (ended.get(slot) ?? -Infinity)))
|
|
906
|
+
ended.set(slot, end);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
837
909
|
}
|
|
838
910
|
/**
|
|
839
911
|
* Seconds an unlimited loop starting at `at` has to fill.
|
|
@@ -936,6 +1008,45 @@ export class ClipTimeline {
|
|
|
936
1008
|
`Bind the prop where the node is authored (or with a "set" command) and animate the variable ` +
|
|
937
1009
|
`with "variableTo" instead.`);
|
|
938
1010
|
}
|
|
1011
|
+
_skip(spec, message, type) {
|
|
1012
|
+
this._skipped.set(spec.id, {
|
|
1013
|
+
code: "unknown-command",
|
|
1014
|
+
commandId: spec.id,
|
|
1015
|
+
...(spec.targetId !== null && { nodeId: spec.targetId }),
|
|
1016
|
+
type,
|
|
1017
|
+
message,
|
|
1018
|
+
});
|
|
1019
|
+
return null;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* The tree a placeholder for `spec` belongs to: its children's, else the one
|
|
1023
|
+
* its parent holds — a viewport holding two trees gives the one it adds.
|
|
1024
|
+
*/
|
|
1025
|
+
_placeholderDimension(spec, rows) {
|
|
1026
|
+
const byId = new Map(rows.map((row) => [row.id, row]));
|
|
1027
|
+
const seen = new Set();
|
|
1028
|
+
const of = (row) => {
|
|
1029
|
+
seen.add(row.id);
|
|
1030
|
+
for (const child of rows) {
|
|
1031
|
+
if (child.parentId !== row.id)
|
|
1032
|
+
continue;
|
|
1033
|
+
const dimension = this._registry.describe(child.type)?.dimension;
|
|
1034
|
+
if (dimension)
|
|
1035
|
+
return dimension;
|
|
1036
|
+
}
|
|
1037
|
+
const parent = row.parentId === null ? undefined : byId.get(row.parentId);
|
|
1038
|
+
if (!parent)
|
|
1039
|
+
return "2d";
|
|
1040
|
+
const described = this._registry.describe(parent.type);
|
|
1041
|
+
if (!described)
|
|
1042
|
+
return seen.has(parent.id) ? "2d" : of(parent);
|
|
1043
|
+
const holds = (described.holds ?? []).filter((d) => d !== "audio");
|
|
1044
|
+
if (holds.length === 0)
|
|
1045
|
+
return described.holds?.includes("audio") ? "audio" : described.dimension ?? "2d";
|
|
1046
|
+
return holds.find((d) => d !== described.dimension) ?? holds[0];
|
|
1047
|
+
};
|
|
1048
|
+
return of(spec);
|
|
1049
|
+
}
|
|
939
1050
|
/** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */
|
|
940
1051
|
_targetOrThrow(spec) {
|
|
941
1052
|
const target = this._targetOf(spec);
|
|
@@ -959,9 +1070,9 @@ export class ClipTimeline {
|
|
|
959
1070
|
observeSlots(observer, () => {
|
|
960
1071
|
for (; index < this._placed.length; index++) {
|
|
961
1072
|
const placed = this._placed[index];
|
|
962
|
-
if (seconds < placed.
|
|
1073
|
+
if (seconds < placed.holdFrom)
|
|
963
1074
|
continue;
|
|
964
|
-
const local = placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;
|
|
1075
|
+
const local = seconds < placed.start ? 0 : placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;
|
|
965
1076
|
placed.command.at(clamp01(local));
|
|
966
1077
|
}
|
|
967
1078
|
});
|
|
@@ -1031,11 +1142,27 @@ export class ClipTimeline {
|
|
|
1031
1142
|
nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),
|
|
1032
1143
|
isContextProvider: (type) => isContextProvider(registry, type),
|
|
1033
1144
|
isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),
|
|
1034
|
-
|
|
1035
|
-
|
|
1145
|
+
writesInPlace: (row, key) => writesPlacementInPlace(registry, row, key),
|
|
1146
|
+
ctorOf: (id) => {
|
|
1147
|
+
const node = this._live.get(id)?.node;
|
|
1148
|
+
return node && missingNodeOf(node) ? MISSING_TYPE : node?.constructor;
|
|
1149
|
+
},
|
|
1150
|
+
registeredCtor: (type) => registry.node(type)?.ctor ?? (registry.strict ? undefined : MISSING_TYPE),
|
|
1036
1151
|
dimensionOf: (type) => registry.node(type)?.descriptor.dimension,
|
|
1037
1152
|
};
|
|
1038
1153
|
}
|
|
1154
|
+
/** Write the props `entry`'s row changed since `was` as its new initial values. */
|
|
1155
|
+
_writeInPlace(entry, was) {
|
|
1156
|
+
const changed = {};
|
|
1157
|
+
for (const [key, value] of Object.entries(entry.spec.props)) {
|
|
1158
|
+
if (!jsonEqual(was.props[key], value))
|
|
1159
|
+
changed[key] = value;
|
|
1160
|
+
}
|
|
1161
|
+
resetToInitial(entry);
|
|
1162
|
+
const { literal, bindings } = expressionOps.bindProps(changed, this._resolveVariable);
|
|
1163
|
+
entry.node.set({ ...literal, ...bindings });
|
|
1164
|
+
captureInitial(entry);
|
|
1165
|
+
}
|
|
1039
1166
|
_updateVariables(patch) {
|
|
1040
1167
|
const { added, removed, changed } = patch.diff.variables;
|
|
1041
1168
|
for (const id of removed)
|
|
@@ -1103,7 +1230,7 @@ export class ClipTimeline {
|
|
|
1103
1230
|
entry.spec = spec;
|
|
1104
1231
|
continue;
|
|
1105
1232
|
}
|
|
1106
|
-
const node = this._instantiate(spec);
|
|
1233
|
+
const node = this._instantiate(spec, rest);
|
|
1107
1234
|
if (entry) {
|
|
1108
1235
|
entry.spec = spec;
|
|
1109
1236
|
entry.node = node;
|
|
@@ -1206,7 +1333,9 @@ export class ClipTimeline {
|
|
|
1206
1333
|
old.command.at(1);
|
|
1207
1334
|
continue;
|
|
1208
1335
|
}
|
|
1209
|
-
|
|
1336
|
+
const placed = this._buildPlaced(spec);
|
|
1337
|
+
if (placed)
|
|
1338
|
+
rebuilt.set(spec.id, placed);
|
|
1210
1339
|
}
|
|
1211
1340
|
return rebuilt;
|
|
1212
1341
|
}
|
|
@@ -1222,6 +1351,7 @@ const LEGACY_COMMAND_HINTS = {
|
|
|
1222
1351
|
variable: "A variable is declared in `variables`.",
|
|
1223
1352
|
};
|
|
1224
1353
|
const NO_LAYER = new Map();
|
|
1354
|
+
const PROP_DIFF_COMMANDS = new Set(["to", "set"]);
|
|
1225
1355
|
/** Records what building one command wrote, and whether it read a laid-out box. */
|
|
1226
1356
|
class WriteRecorder {
|
|
1227
1357
|
firstWrite;
|