@motionscript/core 0.1.0 → 0.1.1-alpha.1
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 +16 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
- package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/style.d.ts +38 -0
- package/dist/components/factory/style.d.ts.map +1 -0
- package/dist/components/factory/style.js +104 -0
- package/dist/components/factory/style.js.map +1 -0
- package/dist/components/factory/types.d.ts +9 -0
- package/dist/components/factory/types.d.ts.map +1 -1
- package/dist/components/factory/types.js +11 -0
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playback-controller.js","sourceRoot":"","sources":["../../src/runtime/playback-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAoB,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAsB,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAsC,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAc,aAAa,EAAkD,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAItD,OAAO,EAAE,MAAM,EAAmB,MAAM,8BAA8B,CAAC;AAKvE,OAAO,EAAW,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAA0B,MAAM,gBAAgB,CAAC;AAGvN,OAAO,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAkB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,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IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,IAAI,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAU,EAAE,EAAU;IACpC,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAEhC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC5B,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import { AssetManager } from \"../assets/manager\";\nimport { MeasureContext2D } from \"../render/measure-context\";\nimport { CanvasRenderContext2D } from \"../render/canvas-render-context2d\";\nimport { asTextBlockSource } from \"../render/text-layout\";\nimport { renderIssueKey, toRenderIssue, type RenderIssue } from \"../render/render-issue\";\nimport { StateEvaluator } from \"./state-evaluator\";\nimport { renderSettled, SETTLE_PASSES, type SettleOutcome } from \"./settle\";\nimport { NodeState, TreeState, WaveformInfo, nodePath } from \"@/project/tree\";\nimport { AudioRequest } from \"@/attributes/audio/request\";\nimport { StorageAdapter } from \"../platform/storage-adapter\";\nimport { BuildError, AssetTimeline, AssetTimelineResult, type AssetTimelineProfile } from \"./asset-timeline\";\nimport { ClipStore, DEFAULT_PRECOMP_BUDGET_MS } from \"./clip-store\";\nimport type { AssetDecl } from \"@/assets/scope\";\nimport { yieldToScheduler } from \"@/util/scheduler\";\nimport { Ticker, TimeCallback } from \"@/platform/ticker\";\nimport { AudioSink } from \"@/platform/audio-sink\";\nimport { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetNotLoadedError } from \"@/assets/errors\";\nimport type { AssetRecord } from \"@/assets/record\";\nimport { Size2D } from \"@/attributes/layout/size\";\nimport { Node } from \"@/components/trees/node/node\";\nimport { Node2D, type NodeHandle } from \"@/components/trees/2d/node2d\";\nimport type { NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\nimport type { ProjectDocument } from \"@/document/project\";\nimport type { Registry } from \"@/document/registry\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { NodeBox, childPlanePointAt, collectBoxes, handleValueAt, nodeAt, nodeBoxAt, nodeHandlesAt, parentPlanePointAt, pickNode, projectNode3DAt, reparentPlacementAt, type ReparentPlacement } from \"./node-picking\";\nimport type { Node3DFrame } from \"./node-picking3d\";\nimport type { Vector3 } from \"@/render3d/vector3\";\nimport { NodeTextLayout, nodeTextLayout } from \"./text-geometry\";\nimport { spanFrames, spansCovering, trackFrameCount, type TrackSpan } from \"./placement\";\nimport { clipFrameToTime, clipTimeToFrame } from \"./frame-time\";\n\n/**\n * Transient prop values layered over a node's evaluated state — see\n * {@link PlaybackController.setNodeOverride}. Keys are prop names the node\n * accepts (`x`, `y`, `rotation`, `width`, …).\n */\nexport type NodeOverride = Record<string, unknown>;\n\n/** Dependencies injected into `PlaybackController` at construction time. */\nexport type ControllerParams = {\n /** The project to play, its fps and viewport resolved — see `Session`. */\n project: ProjectDocument;\n /** The vocabulary its clips compile against. */\n registry: Registry;\n renderContext: CanvasRenderContext2D;\n measurer: MeasureContext2D;\n storageAdapter: StorageAdapter;\n masterClock: Ticker;\n audioDevice: AudioSink;\n assets: AssetCatalog;\n /**\n * Wall-clock ms the background discovery may run before yielding. Defaults\n * to {@link DEFAULT_PRECOMP_BUDGET_MS}; `0` in tests yields between every\n * sample interval, making preemption deterministic.\n */\n precompBudgetMs?: number;\n precompProfile?: AssetTimelineProfile;\n /**\n * Called each time background discovery lands another track. Passed at\n * construction so a fast first track can't publish before the caller attaches.\n */\n onPrecompProgress?: (result: AssetTimelineResult) => void;\n};\n\n/**\n * Orchestrates playback of a project document.\n *\n * On construction it discovers what frame 0 needs, then streams the rest of the\n * project's asset timeline in behind the first paint. Every clock tick:\n *\n * 1. Loads assets required at the current frame (`AssetManager.loadAt`).\n * 2. Evaluates the tracks on screen and lays them out (`StateEvaluator`).\n * 3. Renders the frame to the render context.\n * 4. Prefetches assets for upcoming frames.\n */\nexport class PlaybackController {\n private renderContext: CanvasRenderContext2D;\n private measurer: MeasureContext2D;\n private storageAdapter: StorageAdapter;\n private masterClock: Ticker;\n private stateEvaluator: StateEvaluator;\n private assetManager: AssetManager;\n private audioDevice: AudioSink;\n /**\n * Held rather than merely handed on, because {@link recoverMissingAsset} has\n * to build a record for a source no pass declared, from what the catalog\n * knows of it.\n */\n private readonly assetCatalog: AssetCatalog;\n /**\n * Called synchronously at the end of every frame this controller paints, on\n * the same task as the draw — for a host drawing *over* the canvas (a\n * selection box, a caret) that must measure the tree for the frame just\n * drawn rather than poll and trail a fast scrub. Called after the draw, so a\n * throwing listener is never mistaken for a render failure.\n */\n onFramePainted?: (frame: number) => void;\n\n /** Set by dispose(); once true the controller must never touch its (now-freed) render context again. */\n private disposed = false;\n /** One background pass at a time — see {@link startBackgroundPrecomp}. */\n private precompRunning = false;\n /**\n * Whether a frame has ever been drawn. Every render pass but {@link repaint}\n * loads the frame's assets first, so this is what `repaint` waits on before\n * it will draw one of its own.\n */\n private hasPainted = false;\n /**\n * Monotonic token bumped by every seek / tick / swap. A render pass captures\n * it at entry and bails before painting if a newer pass has begun, so a\n * superseded seek never stamps its stale frame over a newer one.\n */\n private seekGeneration = 0;\n private readonly precompBudgetMs: number;\n private readonly onPrecompProgress?: (result: AssetTimelineResult) => void;\n readonly fps: number;\n readonly viewport: Size2D;\n private readonly precomper: AssetTimeline;\n /** The one build per track that discovery, the evaluator and the editor API share. */\n private readonly store: ClipStore;\n /**\n * Transient prop values re-applied after every state evaluation, keyed by\n * structural path so they survive a rebuild. See {@link setNodeOverride}.\n */\n private readonly overrides = new Map<string, NodeOverride>();\n /** Latest assembled precomp result. */\n precomp: AssetTimelineResult;\n\n /** Every track's span on the project timeline, in document order. */\n get spans(): readonly TrackSpan[] {\n return this.precomp.tracks.map((track, index) => ({\n id: track.id,\n index,\n startFrame: track.startFrame,\n endFrame: track.startFrame + track.frameCount - 1,\n }));\n }\n\n get totalFrames(): number {\n return this.precomp.totalFrames;\n }\n\n /** Total playback duration in seconds. */\n get totalDuration(): number {\n return this.precomp.totalDuration;\n }\n\n /** The track the editor API reads from — see `StateEvaluator.currentTrackId`. */\n get currentTrackId(): string | null {\n return this.stateEvaluator.currentTrackId;\n }\n\n /**\n * Errors collected while discovering tracks, plus any thrown while\n * *drawing* — one list, because a consumer showing them has the same thing\n * to say about both: this frame is not what the document says.\n */\n get buildErrors(): BuildError[] {\n if (this.renderErrors.length === 0) return this.precomp.buildErrors;\n return [...this.precomp.buildErrors, ...this.renderErrors];\n }\n\n /**\n * Errors thrown by a render pass, deduplicated by message. A render throwing\n * happens per frame, at pointer rate while scrubbing, and left to propagate\n * it was an unhandled rejection and a canvas that simply stopped drawing.\n */\n private readonly renderErrors: BuildError[] = [];\n\n /** Called when {@link renderErrors} gains an entry. Set by the host. */\n onRenderError?: (errors: BuildError[]) => void;\n\n /**\n * Record a draw-time failure and tell the host, once per distinct message.\n * Swallowing it is the point: one bad frame must not take down the clock loop.\n */\n private captureRenderError(error: unknown, frame?: number, issue?: RenderIssue): void {\n const e = error instanceof Error ? error : new Error(String(error));\n // A frame can reach for an asset no pass declared — an override previewing\n // an edit puts a picture on a node the rebuild that would declare it has\n // not run yet. The error names the source, so load it and paint again.\n if (frame !== undefined && this.recoverMissingAsset(e, frame)) return;\n if (issue) {\n const key = renderIssueKey(issue);\n if (this.renderErrors.some((prior) => prior.issue && renderIssueKey(prior.issue) === key)) return;\n } else if (this.renderErrors.some((prior) => !prior.issue && prior.message === e.message)) return;\n this.renderErrors.push({\n trackId: this.stateEvaluator.currentTrackId ?? \"\",\n message: e.message,\n ...(issue ? { issue, ...(issue.nodeId !== undefined && { nodeId: issue.nodeId }) } : { stack: e.stack }),\n });\n this.onRenderError?.(this.buildErrors);\n }\n\n /**\n * Widen the drawing track's index by what the draw found missing, so the next\n * visit to this frame loads it ahead. The owner is the node the error names,\n * or else whoever declared the source elsewhere in the clip.\n */\n private learnMissingAsset(error: AssetNotLoadedError, frame: number): void {\n const decl = declOf(error, this.assetCatalog);\n if (!decl) return;\n for (const trackId of [...this.stateEvaluator.activeTrackIds].reverse()) {\n const instance = this.store.instanceOf(trackId);\n const track = this.precomp.tracks.find((t) => t.id === trackId);\n if (!instance || !track) continue;\n let ownerKey: string | undefined;\n if (error.nodeId !== undefined) {\n instance.forEachOwner((node, key) => {\n if (ownerKey === undefined && node.id === error.nodeId) ownerKey = key;\n });\n }\n ownerKey ??= this.store.ownersOf(trackId, error.src).values().next().value;\n if (ownerKey === undefined) continue;\n const next = this.precomper.learn(trackId, ownerKey, decl, Math.floor(frame) - track.startFrame);\n if (next !== this.precomp) this.adoptPrecomp(next);\n return;\n }\n }\n\n /**\n * Sources already tried by {@link recoverMissingAsset}, so a picture that\n * genuinely cannot be fetched is reported rather than re-fetched every frame\n * of a drag. Cleared by {@link clearRenderErrors}.\n */\n private readonly rescuedAssets = new Set<string>();\n\n /**\n * Load an asset a frame reached for but nothing had declared, then paint that\n * frame again. Deliberately narrow: only {@link AssetNotLoadedError}, only a\n * source the catalog can describe, and only once per source.\n */\n private recoverMissingAsset(error: Error, frame: number): boolean {\n if (!(error instanceof AssetNotLoadedError)) return false;\n // Audio is fetched on demand by the audio device, not through the storage adapter.\n if (error.assetType === \"audio\") return false;\n const token = `${error.assetType}:${error.src}`;\n if (this.rescuedAssets.has(token)) return false;\n this.rescuedAssets.add(token);\n // Once per source, like the rescue: a source that never loads would otherwise republish every frame.\n this.learnMissingAsset(error, frame);\n\n const record = this.recordFor(error.assetType, error.src, frame);\n if (!record) return false;\n\n void this.storageAdapter.loadAsset(error.src, record)\n .then(() => {\n if (this.disposed) return;\n this.renderAt(this.stateEvaluator.currentFrame);\n this.settleTrailing();\n })\n .catch((cause) => {\n if (this.disposed) return;\n // No `frame`, so it cannot come back through here a second time.\n this.captureRenderError(\n new Error(`${error.message}\\n\\nLoading it directly also failed: ${String(cause)}`),\n );\n });\n return true;\n }\n\n /**\n * A one-frame record describing `src` well enough to load it, from the\n * catalog's own metadata — or `null` when the catalog has never heard of it.\n */\n private recordFor(type: AssetNotLoadedError[\"assetType\"], src: string, frame: number): AssetRecord | null {\n try {\n if (type === \"font\") {\n // 400 is what an unsuffixed font key assumes.\n return {\n type: \"font\", src, startFrame: frame, endFrame: frame,\n fontFamily: src, fontWeight: 400,\n };\n }\n if (type === \"image\") {\n // Throws for a source the catalog has never heard of.\n this.assetCatalog.getImageMeta(src);\n return { type: \"image\", src, startFrame: frame, endFrame: frame };\n }\n this.assetCatalog.getVideoMeta(src);\n return {\n type: \"video\", src, startFrame: frame, endFrame: frame,\n trimStart: 0, trimEnd: this.assetCatalog.getVideoDuration(src),\n };\n } catch {\n return null;\n }\n }\n\n /** Forget draw-time errors — called when what they were about is replaced. */\n clearRenderErrors(): void {\n this.rescuedAssets.clear();\n if (this.renderErrors.length === 0) return;\n this.renderErrors.length = 0;\n this.onRenderError?.(this.buildErrors);\n }\n\n constructor(params: ControllerParams) {\n const { project } = params;\n if (project.fps === undefined || project.viewport === undefined) {\n throw new Error(\"PlaybackController takes a project whose fps and viewport are resolved — see Session.\");\n }\n this.renderContext = params.renderContext;\n this.measurer = params.measurer;\n this.masterClock = params.masterClock;\n this.storageAdapter = params.storageAdapter;\n this.audioDevice = params.audioDevice;\n this.fps = project.fps;\n this.viewport = project.viewport;\n this.precompBudgetMs = params.precompBudgetMs ?? DEFAULT_PRECOMP_BUDGET_MS;\n this.onPrecompProgress = params.onPrecompProgress;\n this.assetCatalog = params.assets;\n\n const scope = {\n registry: params.registry,\n viewport: this.viewport,\n fps: this.fps,\n assets: params.assets,\n measurer: this.measurer,\n };\n this.store = new ClipStore(project, scope, {\n profile: params.precompProfile,\n // Nothing is resident before the manager exists, which is what the first build should see.\n isReady: (key) => this.assetManager?.isReady(key) ?? false,\n });\n this.precomper = new AssetTimeline(project, scope, { store: this.store });\n // Only what frame 0 needs — the rest streams in behind the first paint,\n // so time-to-first-frame is O(the tracks on screen), not O(the project).\n this.precomp = this.precomper.ensureCovering(0);\n this.stateEvaluator = new StateEvaluator(project, scope, this.store);\n this.assetManager = new AssetManager(\n this.precomp, this.storageAdapter, this.audioDevice,\n (error) => this.captureRenderError(error),\n );\n\n this.masterClock.setDuration(this.totalDuration);\n\n this.masterClock.onPlay((t, speed, reverse) => {\n this.audioDevice.play(t, speed, reverse);\n this.storageAdapter.setPlaying(true);\n });\n this.masterClock.onPause(() => {\n this.audioDevice.stop();\n this.storageAdapter.setPlaying(false);\n });\n this.masterClock.onTick(async (currentTime: number) => {\n // A tick is also a render pass: claim a generation so a stale paused\n // seek can't paint after the clock has moved on (and vice-versa).\n const gen = ++this.seekGeneration;\n const frame = clipTimeToFrame(currentTime, this.fps);\n if (frame >= this.totalFrames) this.masterClock.pause();\n this.discoverThrough(frame);\n await this.loadFrame(frame);\n if (!this.isCurrent(gen)) return;\n this.audioDevice.syncTo(currentTime);\n this.renderAt(frame);\n this.assetManager.prefetch(frame);\n this.trimAround(frame);\n });\n\n this.startBackgroundPrecomp();\n }\n\n /**\n * Discover the remaining tracks off the critical path, republishing the\n * asset timeline as each one lands. Deferred behind a yield so the first\n * frame paints before this starts competing for the main thread.\n */\n private startBackgroundPrecomp(): void {\n if (this.precompRunning || this.disposed || this.precomp.complete) return;\n this.precompRunning = true;\n void (async () => {\n try {\n await yieldToScheduler();\n // Looped: a document swapped in during the pass's last step has\n // no yield left for the pass to notice it by.\n while (!this.disposed && !this.precomp.complete) {\n const final = await this.precomper.runAsync({\n budgetMs: this.precompBudgetMs,\n isCancelled: () => this.disposed,\n onProgress: result => this.adoptPrecomp(result),\n });\n if (this.disposed) return;\n if (!this.precomp.complete) this.adoptPrecomp(final);\n }\n } finally {\n this.precompRunning = false;\n }\n })();\n }\n\n /**\n * Swap in a newly assembled result. `setPrecomp` resets the asset manager's\n * audio signature, which is what reschedules audio a new result changed.\n */\n private adoptPrecomp(next: AssetTimelineResult): void {\n if (this.disposed) return;\n this.precomp = next;\n this.assetManager.setPrecomp(next);\n this.masterClock.setDuration(this.totalDuration);\n this.onPrecompProgress?.(next);\n }\n\n /**\n * Discover the tracks covering `frame` before anything loads or draws it — a\n * track nobody discovered has no asset windows, so its frame would reach for\n * decodes nothing loaded. Cheap once they are: this runs on every tick.\n */\n private discoverThrough(frame: number): void {\n const next = this.precomper.ensureCovering(Math.floor(frame));\n if (next !== this.precomp) this.adoptPrecomp(next);\n }\n\n /**\n * Load `frame`'s assets and the layout gates of every track covering it —\n * a face must be resident before text measures, whatever its window says.\n */\n private async loadFrame(frame: number): Promise<void> {\n const gates: AssetRecord[] = [];\n for (const span of spansCovering(this.store.spans, Math.floor(frame))) {\n for (const record of this.store.layoutGates(span.id)) {\n if (!this.assetManager.isReady(record.src)) gates.push(record);\n }\n }\n if (gates.length === 0) {\n await this.assetManager.loadAt(frame);\n return;\n }\n await Promise.all([this.assetManager.loadAt(frame), this.assetManager.loadRecords(gates)]);\n }\n\n /** Keep built trees near the playhead only; a released track keeps what discovery found. */\n private trimAround(frame: number): void {\n if (Math.abs(frame - this.lastTrimFrame) < this.fps) return;\n this.lastTrimFrame = frame;\n this.store.trim(Math.floor(frame), Math.ceil(TRIM_HORIZON_SECONDS * this.fps));\n }\n\n private lastTrimFrame = 0;\n\n get isPlaying(): boolean {\n return this.masterClock.isPlaying;\n }\n\n /** Current playback position in seconds. */\n get currentTime(): number {\n return this.masterClock.currentTime;\n }\n\n /** Current playback position in frames (float). */\n get currentFrame(): number {\n return clipTimeToFrame(this.masterClock.currentTime, this.fps);\n }\n\n /** Register a callback that fires on every clock tick with the current time. */\n onTime(cb: TimeCallback): void {\n this.masterClock.onTime(cb);\n }\n\n /** Register a callback that fires when playback starts. */\n onPlay(cb: () => void): void {\n this.masterClock.onPlay(() => cb());\n }\n\n /** Register a callback that fires when playback pauses. */\n onPause(cb: () => void): void {\n this.masterClock.onPause(cb);\n }\n\n /** True while `gen` is still the latest seek/tick and the controller is alive. */\n private isCurrent(gen: number): boolean {\n return !this.disposed && gen === this.seekGeneration;\n }\n\n /** Evaluate the tracks on screen, lay them out, and render `frame`. */\n private renderAt(frame: number): void {\n // A disposed controller's surface is freed; an in-flight seek\n // (StrictMode double-mount, HMR) can resolve after dispose().\n if (this.disposed) return;\n this.hasPainted = true;\n this.renders++;\n try {\n // A track whose compile measured a face before it loaded builds again, now that it has.\n this.store.settleGates(spansCovering(this.store.spans, Math.floor(frame)).map((span) => span.id));\n // Evaluation and layout are inside the guard too: a command can throw\n // at a time, and a missing font throws while measuring.\n this.stateEvaluator.stateAt(frame);\n // After evaluation, before layout: an override beats what the document\n // evaluated to, and the layout pass that follows sees it.\n this.applyOverrides();\n this.stateEvaluator.layout(this.measurer);\n this.renderContext.execute(() => {\n this.stateEvaluator.render(this.renderContext);\n });\n for (const raw of this.renderContext.takeRenderIssues()) {\n const issue = toRenderIssue(raw);\n this.captureRenderError(new Error(issue.message), undefined, issue);\n }\n } catch (error) {\n this.captureRenderError(error, frame);\n }\n this.announcePaint(frame);\n }\n\n /** Tell {@link onFramePainted} a frame has landed, without letting a listener take the render loop down. */\n private announcePaint(frame: number): void {\n if (!this.onFramePainted) return;\n try {\n this.onFramePainted(Math.floor(frame));\n } catch (error) {\n console.error(\"[PlaybackController] onFramePainted listener threw:\", error);\n }\n }\n\n /**\n * Jump to `frame`, pausing playback first. Waits for required assets to\n * load before rendering, then prefetches upcoming frames.\n */\n async seek(frame: number): Promise<void> {\n if (this.disposed) return;\n const gen = ++this.seekGeneration;\n this.paintInFlight = gen;\n try {\n const clamped = Math.max(0, Math.min(frame, this.totalFrames));\n this.masterClock.pause();\n this.discoverThrough(clamped);\n this.masterClock.seek(clipFrameToTime(clamped, this.fps));\n await this.loadFrame(clamped);\n if (!this.isCurrent(gen)) return;\n // A cold seek can land on a video frame or an image no draw has asked\n // for yet: the render asks, the adapter warms, the frame paints again.\n if (await this.settle(() => this.renderAt(clamped), gen) === \"superseded\") return;\n this.assetManager.prefetch(clamped);\n this.trimAround(clamped);\n } finally {\n this.paintLanded(gen);\n }\n }\n\n /**\n * Swap in a new document without rebuilding the backend.\n *\n * A track whose clip is unchanged keeps its tree and its discovery; one whose\n * clip patches in place re-declares only the owners the edit can reach, and\n * republishes the asset timeline only when that changed it. **The swap does not\n * paint**: it loads the frame's assets first, and the canvas keeps the last\n * complete frame until then — strictly better than a current frame with a\n * hole where an added picture has not arrived. See {@link pendingSwap}.\n */\n setProject(next: ProjectDocument): void {\n if (this.disposed) return;\n // Claimed before anything is touched, so a seek parked on a yield unwinds\n // rather than painting into a timeline that moved under it.\n const gen = ++this.seekGeneration;\n\n this.precomper.setProject(next);\n this.stateEvaluator.setProject(next);\n // Adopts only when the swap changed what is published — an edit no declaration read changes nothing.\n this.discoverThrough(this.currentFrame);\n this.clearRenderErrors();\n this.masterClock.setDuration(this.totalDuration);\n\n // The timeline may now be shorter than where the playhead sat.\n const frame = Math.min(this.currentFrame, Math.max(0, this.totalFrames - 1));\n this.pendingSwap = gen;\n this.paintInFlight = gen;\n this.lastReplacePaint = this.loadAndRepaint(frame, gen);\n this.startBackgroundPrecomp();\n }\n\n /**\n * The catalog this controller builds against changed in place: build every\n * track again and repaint, as a swap to the same document would if it could\n * tell. A clip that failed for want of an entry the catalog now has builds,\n * and one measured against an old size is measured again.\n */\n reconcileCatalog(): void {\n if (this.disposed) return;\n this.store.reset();\n this.setProject(this.store.project);\n }\n\n /** Resolves when the paint {@link setProject} scheduled has landed — for a caller that swaps in order to read the result. */\n whenReplaced(): Promise<void> {\n return this.lastReplacePaint;\n }\n\n private lastReplacePaint: Promise<void> = Promise.resolve();\n\n /**\n * The generation claimed by the swap whose paint has not landed yet, or `0`.\n *\n * {@link repaint} stands down while this names the current generation: the\n * swap is loading the frame's assets and owes a paint that reads every\n * override as it stands when it lands. A generation rather than a flag,\n * because a seek can supersede the swap, and a flag nobody cleared would\n * leave `repaint` disabled for the rest of the session.\n */\n private pendingSwap = 0;\n\n /** Load `frame`'s assets, then paint — abandoning both if a newer pass began. */\n private async loadAndRepaint(frame: number, gen: number): Promise<void> {\n try {\n try {\n await this.loadFrame(frame);\n } catch (err) {\n console.error(\"[PlaybackController] swap asset load failed:\", err);\n return;\n }\n await this.settle(() => this.renderAt(frame), gen);\n } finally {\n // Only this swap's claim is released: a newer one has written its own.\n if (this.pendingSwap === gen) this.pendingSwap = 0;\n this.paintLanded(gen);\n }\n }\n\n /** Reposition the clock to `frame` without interrupting playback. */\n seekWhilePlaying(frame: number): void {\n // Invalidate any in-flight paused seek so its late render can't paint over\n // the live playback position.\n ++this.seekGeneration;\n const clamped = Math.max(0, Math.min(frame, this.totalFrames));\n this.masterClock.seek(clipFrameToTime(clamped, this.fps));\n }\n\n /**\n * Capture the current frame as a base-64 PNG data URL. Renders afresh — the\n * drawing buffer may have been cleared since the last tick — and loads the\n * frame's assets first, so the capture is right whatever the caller did\n * before it.\n */\n async screenshot(): Promise<string | undefined> {\n const frame = this.stateEvaluator.currentFrame;\n const gen = ++this.seekGeneration;\n this.paintInFlight = gen;\n try {\n await this.loadFrame(frame);\n if (!this.isCurrent(gen)) return undefined;\n // A capture is kept, not glanced at, so it waits for the upgrades a preview paints behind.\n if (await this.settle(() => this.renderAt(frame), gen, true) === \"superseded\") return undefined;\n return this.renderContext.screenshot();\n } finally {\n this.paintLanded(gen);\n }\n }\n\n /** {@link renderSettled} against this controller's generation, warning when a frame never settles. */\n private async settle(render: () => void, gen: number, upgrades = false): Promise<SettleOutcome> {\n const adapter = upgrades ? settlingUpgrades(this.storageAdapter) : this.storageAdapter;\n const outcome = await renderSettled(render, adapter, () => this.isCurrent(gen));\n if (outcome === \"exhausted\") {\n console.warn(`[PlaybackController] frame ${this.stateEvaluator.currentFrame} still had decodes pending after ${SETTLE_PASSES} passes`);\n }\n return outcome;\n }\n\n /**\n * The generation of the seek, swap or screenshot still on its way to its\n * paint, or `0`. A repaint behind decodes leaves that paint to it — see\n * {@link settleTrailing}.\n */\n private paintInFlight = 0;\n\n /** Bumped by every render, so a repaint owed to a landed upgrade can tell whether one has happened since. */\n private renders = 0;\n\n /** {@link renders} when an upgrade landed with a paint in flight, or `null`. */\n private repaintOwedSince: number | null = null;\n\n /** Release `gen`'s claim — unless a newer paint has claimed since — and repaint behind what it drew. */\n private paintLanded(gen: number): void {\n if (this.paintInFlight !== gen || this.disposed) return;\n this.paintInFlight = 0;\n if (this.repaintOwedSince !== null) {\n const stale = this.renders === this.repaintOwedSince;\n this.repaintOwedSince = null;\n if (stale && !this.isPlaying) this.renderAt(this.stateEvaluator.currentFrame);\n }\n this.settleTrailing();\n }\n\n /**\n * The current track's node tree, with each node's frame range on the project\n * timeline and its waveforms attached. Used by the timeline UI. `null` before\n * any track is built.\n */\n getTreeState(): TreeState | null {\n const instance = this.stateEvaluator.currentInstance;\n if (!instance) return null;\n const track = this.precomp.tracks.find(t => t.id === this.stateEvaluator.currentTrackId);\n const trackStart = track?.startFrame ?? 0;\n const frameCount = track?.frameCount ?? trackFrameCount(instance.duration, this.fps);\n\n const bars = new Map<string, { startFrame: number; endFrame: number }>();\n const pathOfOwner = new Map<string, string>();\n instance.forEachOwner((_node, ownerKey, span, path) => {\n pathOfOwner.set(ownerKey, path);\n const frames = spanFrames(span, this.fps, frameCount);\n if (frames) {\n bars.set(path, { startFrame: trackStart + frames.startFrame, endFrame: trackStart + frames.endFrame });\n }\n });\n const waveformsByPath = waveformsByOwner(track?.audioRequests ?? [], pathOfOwner);\n return nodeToTreeState(instance.canvas, \"\", bars, waveformsByPath);\n }\n\n getNodeState(nodeId: string): NodeState | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = findNode(canvas, nodeId);\n if (!node) return null;\n return { id: node.id, type: node.className, properties: node.properties };\n }\n\n /**\n * What a document node of the current track holds before any command has\n * acted on it, whatever frame is showing and whether or not it is on screen:\n * the props an editor shows for the node itself, where {@link getNodeState}\n * is the node at this frame. `null` when the track holds no such row.\n */\n getNodeInitialProps(nodeId: string): NodeState[\"properties\"] | null {\n return this.stateEvaluator.currentInstance?.baselineProps(nodeId) ?? null;\n }\n\n // ---- Direct manipulation ----------------------------------------------\n // Where a node's pixels are, what is under a point, and a write path fast\n // enough for a drag. See `runtime/node-picking.ts` for the geometry.\n\n /**\n * The on-screen box of one node at the current frame, or `null` when the path\n * does not resolve. See {@link NodeBox}.\n *\n * @param path Structural path from {@link TreeState.path}.\n */\n getNodeBox(path: string): NodeBox | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n // Through `nodeBoxAt`, so a path naming a mesh inside a `Canvas3D`\n // resolves too — see `node-picking3d.ts`.\n return nodeBoxAt(canvas, path);\n }\n\n /**\n * The node's **own** props at a structural path — what it holds right now,\n * in its own coordinate space, the space {@link setNodeOverride} writes into —\n * or `null` when the path doesn't resolve.\n */\n getNodePropsAt(path: string): NodeState[\"properties\"] | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = nodeAt(canvas, path);\n return node ? node.properties : null;\n }\n\n /** Every visible node's box in draw order — one tree walk instead of N {@link getNodeBox} calls. */\n getNodeBoxes(): NodeBox[] {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return [];\n const out: NodeBox[] = [];\n collectBoxes(canvas, \"\", out, true);\n return out;\n }\n\n /**\n * Project points around the `Node3D` at `path`, or `null` when the path\n * doesn't resolve to one. See {@link Node3DFrame}.\n */\n projectNode3D(\n path: string,\n parentPoints: readonly Vector3[],\n localPoints: readonly Vector3[],\n ): Node3DFrame | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return projectNode3DAt(canvas, path, parentPoints, localPoints);\n }\n\n /**\n * Where a viewport point lands on the plane the node at `path` is positioned\n * in, in that plane's own y-up frame — see {@link parentPlanePointAt}.\n */\n parentPlanePoint(path: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return parentPlanePointAt(canvas, path, point);\n }\n\n /**\n * Where a viewport point lands in the coordinates the node at `path`\n * positions its children in, or `null` when those are pixels — see\n * {@link childPlanePointAt}.\n */\n childPlanePoint(path: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return childPlanePointAt(canvas, path, point);\n }\n\n /**\n * What keeps the node at `path` looking as it does once it moves under the\n * node at `parentPath` — see {@link reparentPlacementAt}.\n */\n reparentPlacement(path: string, parentPath: string, offsets: readonly Vector2[]): ReparentPlacement | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return reparentPlacementAt(canvas, path, parentPath, offsets);\n }\n\n /** The points an editor may drag on the node at `path`, in viewport space — see {@link nodeHandlesAt}. */\n nodeHandles(path: string): NodeHandle[] | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return nodeHandlesAt(canvas, path);\n }\n\n /** The value of `prop` that puts its handle under a viewport point — see {@link handleValueAt}. */\n handleValue(path: string, prop: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return handleValueAt(canvas, path, prop, point);\n }\n\n /**\n * Where a Text node's caret slots landed on screen, or `null` when the path\n * doesn't resolve, the node isn't text, or the measurer has no caret model.\n * See {@link NodeTextLayout}.\n */\n getTextLayout(path: string): NodeTextLayout | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = findNodeByPath(canvas, path);\n return node instanceof Node2D\n ? this.textLayoutOf(node, path)\n : null;\n }\n\n /** `node`'s caret slots in viewport space, or `null` when this controller's measurer keeps no glyph positions. */\n private textLayoutOf(node: Node2D, path: string): NodeTextLayout | null {\n const source = asTextBlockSource(this.measurer);\n return source ? nodeTextLayout(node, path, source) : null;\n }\n\n /**\n * The topmost node under a viewport-space point (origin at the viewport\n * centre, y-up), or `null`. `tolerance` is grab-slop in **scene units** —\n * the host's pixel slop divided by its preview zoom. See {@link pickNode}.\n */\n pickNode(point: Vector2, tolerance = 0): NodeBox | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return pickNode(canvas, point, tolerance);\n }\n\n /**\n * Layer transient prop values over a node, on top of whatever the document\n * evaluates to, re-applied after every evaluation until cleared — for an\n * editor dragging a node at pointer rate without rebuilding anything. Not\n * persistence: the host commits the value to its document on drop and\n * clears the override.\n *\n * @param path Structural path from {@link TreeState.path}.\n * @param props Props the node accepts. Merged over any existing override.\n */\n setNodeOverride(path: string, props: NodeOverride): void {\n const existing = this.overrides.get(path);\n this.overrides.set(path, existing ? { ...existing, ...props } : { ...props });\n this.applyOverrides();\n }\n\n /**\n * Drop one node's overrides, or all of them when `path` is omitted, and\n * repaint so the node snaps back to what the document says.\n *\n * Rebuilds the current track's tree to do it: an override was written\n * straight onto a live prop, and the timeline only restores what its own\n * commands write. Cheap enough for a pointer-up, which is the only place it\n * belongs.\n *\n * @param path Structural path, as {@link setNodeOverride} takes — not an id,\n * since a node a composite built for itself has no authored one to name.\n */\n clearNodeOverrides(path?: string): void {\n const cleared = path === undefined\n ? (this.overrides.size > 0 && (this.overrides.clear(), true))\n : this.overrides.delete(path);\n if (!cleared) return;\n this.stateEvaluator.rebuild();\n // Through `repaint` for both of its guards — see there.\n this.repaint();\n }\n\n /** Hidden/locked state for one track's nodes. Not authored, so it rides beside the document. */\n setEditorStates(trackId: string, states: NodeEditorStates | undefined): void {\n this.stateEvaluator.setEditorStates(trackId, states);\n this.repaint();\n }\n\n /**\n * Re-lay-out and repaint the current frame. Cheap enough for a pointer-rate\n * drag loop: `stateAt` early-returns for the frame already current.\n *\n * Does nothing **before the first frame has been drawn** — its assets have\n * not been loaded, and the last complete frame is a blank surface, which is\n * what should stay up — **nor between a swap and its paint**, which owes a\n * paint of its own. See {@link pendingSwap}.\n */\n repaint(): void {\n if (!this.hasPainted) return;\n if (this.pendingSwap !== 0 && this.isCurrent(this.pendingSwap)) return;\n this.renderAt(this.stateEvaluator.currentFrame);\n this.settleTrailing();\n }\n\n /**\n * Repaint a paused frame as the decodes its draw asked for land — one it could\n * not draw at all, and an upgrade of one it drew below demand, which no paint\n * waits for. Never while playing: the next tick picks them up. A seek, swap or\n * screenshot still on its way paints for itself, and once more when it lands\n * if an upgrade arrived after its render.\n */\n private settleTrailing(): void {\n if (this.trailingSettle || this.disposed || this.isPlaying || !this.hasBackgroundDecodes()) return;\n void this.repaintBehindDecodes().catch((error) => {\n console.error(\"[PlaybackController] background decode failed:\", error);\n });\n }\n\n private trailingSettle = false;\n\n private hasBackgroundDecodes(): boolean {\n return this.storageAdapter.hasPendingDecodes() || this.storageAdapter.hasPendingUpgrades();\n }\n\n private async repaintBehindDecodes(): Promise<void> {\n // Released in `finally` on the same turn as the return, so a paint landing\n // right after this gives up can start the next one.\n this.trailingSettle = true;\n try {\n for (let pass = 0; pass < SETTLE_PASSES && this.hasBackgroundDecodes(); pass++) {\n const [decoded, upgraded] = await Promise.all([\n this.storageAdapter.warmPendingDecodes(),\n this.storageAdapter.warmPendingUpgrades(),\n ]);\n if (!(decoded || upgraded) || this.disposed || this.isPlaying) return;\n if (this.paintInFlight !== 0) {\n this.repaintOwedSince = this.renders;\n return;\n }\n this.renderAt(this.stateEvaluator.currentFrame);\n }\n } finally {\n this.trailingSettle = false;\n }\n }\n\n /** Write every held override onto its node. No-op when none are set. */\n private applyOverrides(): void {\n if (this.overrides.size === 0) return;\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return;\n for (const [path, props] of this.overrides) {\n findNodeByPath(canvas, path)?.set(props as never);\n }\n }\n\n play(speed: number = 1, reverse: boolean = false): void {\n if (this.currentFrame >= this.totalFrames) {\n this.seek(0).then(() => this.masterClock.play(speed, reverse)).catch(() => { });\n return;\n }\n this.masterClock.play(speed, reverse);\n }\n\n pause(): void {\n this.masterClock.pause();\n }\n\n setMuted(muted: boolean): void {\n this.audioDevice.setMuted(muted);\n }\n\n dispose(): void {\n this.disposed = true;\n this.masterClock.dispose();\n this.audioDevice.dispose();\n this.stateEvaluator.dispose();\n this.store.dispose();\n this.assetManager.dispose();\n }\n}\n\n/** How far from the playhead a built tree is kept, in seconds. */\nconst TRIM_HORIZON_SECONDS = 30;\n\n/** `adapter`, settling upgrades alongside what a frame needs — for a paint that is kept rather than shown. */\nfunction settlingUpgrades(adapter: StorageAdapter): Pick<StorageAdapter, \"warmPendingDecodes\"> {\n return {\n async warmPendingDecodes() {\n const [decoded, upgraded] = await Promise.all([adapter.warmPendingDecodes(), adapter.warmPendingUpgrades()]);\n return decoded || upgraded;\n },\n };\n}\n\n/** What a missing-asset error says was needed, as a declaration. */\nfunction declOf(error: AssetNotLoadedError, catalog: AssetCatalog): AssetDecl | undefined {\n switch (error.assetType) {\n case \"image\":\n return { type: \"image\", src: error.src };\n case \"font\":\n return { type: \"font\", family: error.src, weight: 400 };\n case \"video\":\n try {\n return { type: \"video\", src: error.src, trimStart: 0, trimEnd: catalog.getVideoDuration(error.src) };\n } catch {\n return undefined;\n }\n default:\n return undefined;\n }\n}\n\n// Every Node2D is a container (children may be empty); kept for callers that\n// want an explicit \"has children\" check.\nexport function isParentNode(node: Node2D): boolean {\n return node.children.length > 0;\n}\n\n/**\n * `node` and its subtree as {@link TreeState}, indexed over the authored child\n * list — the same one every other structural-path walk reads, so selection,\n * bars and `getNodeBox` share one set of paths.\n */\nfunction nodeToTreeState(\n node: Node,\n path: string,\n bars: ReadonlyMap<string, { startFrame: number; endFrame: number }>,\n waveformsByPath: ReadonlyMap<string, WaveformInfo[]>,\n): TreeState {\n const state: TreeState = {\n id: node.id,\n path,\n type: node.className,\n children: node._allChildren.map((c, i) => nodeToTreeState(c, nodePath(path, i), bars, waveformsByPath)),\n };\n const waveform = waveformsByPath.get(path);\n if (waveform && waveform.length > 0) state.waveform = waveform;\n const bar = bars.get(path);\n if (bar) {\n state.startFrame = bar.startFrame;\n state.endFrame = bar.endFrame;\n }\n return state;\n}\n\n/**\n * Group a track's audio requests into per-node waveform entries, keyed by the\n * structural path their owner has in the tree right now. A request whose owner\n * is not in the tree has no bar to land on.\n */\nfunction waveformsByOwner(\n requests: readonly AudioRequest[],\n pathOfOwner: ReadonlyMap<string, string>,\n): Map<string, WaveformInfo[]> {\n const byPath = new Map<string, WaveformInfo[]>();\n for (const req of requests) {\n const path = req.ownerId !== undefined ? pathOfOwner.get(req.ownerId) : \"\";\n if (path === undefined) continue;\n const info: WaveformInfo = {\n src: req.src,\n startTime: req.startAt,\n endTime: Number.isFinite(req.endAt) ? req.endAt : null,\n };\n const list = byPath.get(path);\n if (list) list.push(info);\n else byPath.set(path, [info]);\n }\n return byPath;\n}\n\n/** The node at a structural path (`\"\"` = root, `\"0.2\"` = third child of the first), walking the authored list. */\nfunction findNodeByPath(root: Node2D, path: string): Node | null {\n if (path === \"\") return root;\n let node: Node = root;\n for (const seg of path.split(\".\")) {\n const next = node._allChildren[Number(seg)];\n if (!next) return null;\n node = next;\n }\n return node;\n}\n\nfunction findNode(root: Node, id: string): Node | null {\n if (root.id === id) return root;\n\n for (const child of root._allChildren) {\n const found = findNode(child, id);\n if (found) return found;\n }\n\n return null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playback-controller.js","sourceRoot":"","sources":["../../src/runtime/playback-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAoB,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAsB,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAsC,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAc,aAAa,EAAkD,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EA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,CAAC","sourcesContent":["import { AssetManager } from \"../assets/manager\";\nimport { MeasureContext2D } from \"../render/measure-context\";\nimport { CanvasRenderContext2D } from \"../render/canvas-render-context2d\";\nimport { asTextBlockSource } from \"../render/text-layout\";\nimport { renderIssueKey, toRenderIssue, type RenderIssue } from \"../render/render-issue\";\nimport { StateEvaluator } from \"./state-evaluator\";\nimport { renderSettled, SETTLE_PASSES, type SettleOutcome } from \"./settle\";\nimport { NodeState, TreeState, WaveformInfo, nodePath } from \"@/project/tree\";\nimport { AudioRequest } from \"@/attributes/audio/request\";\nimport { StorageAdapter } from \"../platform/storage-adapter\";\nimport { BuildError, AssetTimeline, AssetTimelineResult, type AssetTimelineProfile } from \"./asset-timeline\";\nimport { ClipStore, DEFAULT_PRECOMP_BUDGET_MS } from \"./clip-store\";\nimport type { AssetDecl } from \"@/assets/scope\";\nimport { yieldToScheduler } from \"@/util/scheduler\";\nimport { Ticker, TimeCallback } from \"@/platform/ticker\";\nimport { AudioSink } from \"@/platform/audio-sink\";\nimport { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetNotLoadedError } from \"@/assets/errors\";\nimport type { AssetRecord } from \"@/assets/record\";\nimport { Size2D } from \"@/attributes/layout/size\";\nimport { Node } from \"@/components/trees/node/node\";\nimport { Node2D, type NodeHandle } from \"@/components/trees/2d/node2d\";\nimport type { NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\nimport type { ProjectDocument } from \"@/document/project\";\nimport type { Registry } from \"@/document/registry\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { NodeBox, childPlanePointAt, collectBoxes, handleValueAt, nodeAt, nodeBoxAt, nodeHandlesAt, parentPlanePointAt, pickNode, projectNode3DAt, reparentPlacementAt, type ReparentPlacement } from \"./node-picking\";\nimport type { Node3DFrame } from \"./node-picking3d\";\nimport type { Vector3 } from \"@/render3d/vector3\";\nimport { NodeTextLayout, nodeTextLayout } from \"./text-geometry\";\nimport { spanFrames, spansCovering, trackFrameCount, type TrackSpan } from \"./placement\";\nimport { clipFrameToTime, clipTimeToFrame } from \"./frame-time\";\n\n/** Keys are prop names the node accepts; see {@link PlaybackController.setNodeOverride}. */\nexport type NodeOverride = Record<string, unknown>;\n\nexport type ControllerParams = {\n project: ProjectDocument;\n registry: Registry;\n renderContext: CanvasRenderContext2D;\n measurer: MeasureContext2D;\n storageAdapter: StorageAdapter;\n masterClock: Ticker;\n audioDevice: AudioSink;\n assets: AssetCatalog;\n /**\n * Wall-clock ms background discovery may run before yielding. `0` in tests yields between every sample\n * interval, making preemption deterministic.\n */\n precompBudgetMs?: number;\n precompProfile?: AssetTimelineProfile;\n /** Passed at construction so a fast first track cannot publish before the caller attaches. */\n onPrecompProgress?: (result: AssetTimelineResult) => void;\n};\n\n/**\n * Plays a project document: discovers what frame 0 needs, then streams the rest of the asset timeline in\n * behind the first paint. Each tick loads the frame's assets, evaluates and lays out the tracks on screen,\n * renders, then prefetches upcoming frames.\n */\nexport class PlaybackController {\n private renderContext: CanvasRenderContext2D;\n private measurer: MeasureContext2D;\n private storageAdapter: StorageAdapter;\n private masterClock: Ticker;\n private stateEvaluator: StateEvaluator;\n private assetManager: AssetManager;\n private audioDevice: AudioSink;\n /**\n * Held because {@link recoverMissingAsset} must build a record for a source no pass declared, from what the\n * catalog knows of it.\n */\n private readonly assetCatalog: AssetCatalog;\n /**\n * Called synchronously at the end of every painted frame, on the same task as the draw, for a host drawing\n * over the canvas (a selection box, a caret) that must measure the tree for the frame just drawn rather than\n * trail a fast scrub. Called after the draw, so a throwing listener is never mistaken for a render failure.\n */\n onFramePainted?: (frame: number) => void;\n\n private disposed = false;\n private precompRunning = false;\n /**\n * Every render pass but {@link repaint} loads the frame's assets first, so `repaint` waits on this before\n * drawing one of its own.\n */\n private hasPainted = false;\n /**\n * Bumped by every seek, tick and swap. A render pass captures it at entry and bails before painting if a newer\n * pass began, so a superseded seek never stamps a stale frame over a newer one.\n */\n private seekGeneration = 0;\n private readonly precompBudgetMs: number;\n private readonly onPrecompProgress?: (result: AssetTimelineResult) => void;\n readonly fps: number;\n readonly viewport: Size2D;\n private readonly precomper: AssetTimeline;\n private readonly store: ClipStore;\n /**\n * Re-applied after every state evaluation, keyed by structural path so they survive a rebuild. See {@link\n * setNodeOverride}.\n */\n private readonly overrides = new Map<string, NodeOverride>();\n precomp: AssetTimelineResult;\n\n get spans(): readonly TrackSpan[] {\n return this.precomp.tracks.map((track, index) => ({\n id: track.id,\n index,\n startFrame: track.startFrame,\n endFrame: track.startFrame + track.frameCount - 1,\n }));\n }\n\n get totalFrames(): number {\n return this.precomp.totalFrames;\n }\n\n get totalDuration(): number {\n return this.precomp.totalDuration;\n }\n\n get currentTrackId(): string | null {\n return this.stateEvaluator.currentTrackId;\n }\n\n /**\n * Discovery errors plus any thrown while drawing: one list, because a consumer says the same thing about both\n * (this frame is not what the document says).\n */\n get buildErrors(): BuildError[] {\n if (this.renderErrors.length === 0) return this.precomp.buildErrors;\n return [...this.precomp.buildErrors, ...this.renderErrors];\n }\n\n /**\n * Deduplicated by message. A render throws per frame, at pointer rate while scrubbing, and left to propagate\n * it would be an unhandled rejection and a canvas that stopped drawing.\n */\n private readonly renderErrors: BuildError[] = [];\n\n onRenderError?: (errors: BuildError[]) => void;\n\n /**\n * Swallowing is the point: one bad frame must not take down the clock loop. Reported once per distinct\n * message.\n */\n private captureRenderError(error: unknown, frame?: number, issue?: RenderIssue): void {\n const e = error instanceof Error ? error : new Error(String(error));\n /**\n * A frame can reach for an asset no pass declared (an override previewing an edit puts a picture on a node\n * before the rebuild that would declare it has run). The error names the source, so load it and paint again.\n */\n if (frame !== undefined && this.recoverMissingAsset(e, frame)) return;\n if (issue) {\n const key = renderIssueKey(issue);\n if (this.renderErrors.some((prior) => prior.issue && renderIssueKey(prior.issue) === key)) return;\n } else if (this.renderErrors.some((prior) => !prior.issue && prior.message === e.message)) return;\n this.renderErrors.push({\n trackId: this.stateEvaluator.currentTrackId ?? \"\",\n message: e.message,\n ...(issue ? { issue, ...(issue.nodeId !== undefined && { nodeId: issue.nodeId }) } : { stack: e.stack }),\n });\n this.onRenderError?.(this.buildErrors);\n }\n\n /**\n * Widen the drawing track's index by what the draw found missing, so the next visit to this frame loads it\n * ahead. The owner is the node the error names, else whoever declared the source elsewhere in the clip.\n */\n private learnMissingAsset(error: AssetNotLoadedError, frame: number): void {\n const decl = declOf(error, this.assetCatalog);\n if (!decl) return;\n for (const trackId of [...this.stateEvaluator.activeTrackIds].reverse()) {\n const instance = this.store.instanceOf(trackId);\n const track = this.precomp.tracks.find((t) => t.id === trackId);\n if (!instance || !track) continue;\n let ownerKey: string | undefined;\n if (error.nodeId !== undefined) {\n instance.forEachOwner((node, key) => {\n if (ownerKey === undefined && node.id === error.nodeId) ownerKey = key;\n });\n }\n ownerKey ??= this.store.ownersOf(trackId, error.src).values().next().value;\n if (ownerKey === undefined) continue;\n const next = this.precomper.learn(trackId, ownerKey, decl, Math.floor(frame) - track.startFrame);\n if (next !== this.precomp) this.adoptPrecomp(next);\n return;\n }\n }\n\n /**\n * Sources already tried by {@link recoverMissingAsset}, so a picture that cannot be fetched is reported rather\n * than re-fetched every frame of a drag. Cleared by {@link clearRenderErrors}.\n */\n private readonly rescuedAssets = new Set<string>();\n\n /**\n * Deliberately narrow: only {@link AssetNotLoadedError}, only a source the catalog can describe, once per\n * source.\n */\n private recoverMissingAsset(error: Error, frame: number): boolean {\n if (!(error instanceof AssetNotLoadedError)) return false;\n // Audio is fetched on demand by the audio device, not through the storage adapter.\n if (error.assetType === \"audio\") return false;\n const token = `${error.assetType}:${error.src}`;\n if (this.rescuedAssets.has(token)) return false;\n this.rescuedAssets.add(token);\n // Once per source, like the rescue: a source that never loads would otherwise republish every frame.\n this.learnMissingAsset(error, frame);\n\n const record = this.recordFor(error.assetType, error.src, frame);\n if (!record) return false;\n\n void this.storageAdapter.loadAsset(error.src, record)\n .then(() => {\n if (this.disposed) return;\n this.renderAt(this.stateEvaluator.currentFrame);\n this.settleTrailing();\n })\n .catch((cause) => {\n if (this.disposed) return;\n // No `frame`, so it cannot come back through here a second time.\n this.captureRenderError(\n new Error(`${error.message}\\n\\nLoading it directly also failed: ${String(cause)}`),\n );\n });\n return true;\n }\n\n /** `null` when the catalog has never heard of `src`. */\n private recordFor(type: AssetNotLoadedError[\"assetType\"], src: string, frame: number): AssetRecord | null {\n try {\n if (type === \"font\") {\n // 400 is what an unsuffixed font key assumes.\n return {\n type: \"font\", src, startFrame: frame, endFrame: frame,\n fontFamily: src, fontWeight: 400,\n };\n }\n if (type === \"image\") {\n // Throws for a source the catalog has never heard of.\n this.assetCatalog.getImageMeta(src);\n return { type: \"image\", src, startFrame: frame, endFrame: frame };\n }\n this.assetCatalog.getVideoMeta(src);\n return {\n type: \"video\", src, startFrame: frame, endFrame: frame,\n trimStart: 0, trimEnd: this.assetCatalog.getVideoDuration(src),\n };\n } catch {\n return null;\n }\n }\n\n clearRenderErrors(): void {\n this.rescuedAssets.clear();\n if (this.renderErrors.length === 0) return;\n this.renderErrors.length = 0;\n this.onRenderError?.(this.buildErrors);\n }\n\n constructor(params: ControllerParams) {\n const { project } = params;\n if (project.fps === undefined || project.viewport === undefined) {\n throw new Error(\"PlaybackController takes a project whose fps and viewport are resolved — see Session.\");\n }\n this.renderContext = params.renderContext;\n this.measurer = params.measurer;\n this.masterClock = params.masterClock;\n this.storageAdapter = params.storageAdapter;\n this.audioDevice = params.audioDevice;\n this.fps = project.fps;\n this.viewport = project.viewport;\n this.precompBudgetMs = params.precompBudgetMs ?? DEFAULT_PRECOMP_BUDGET_MS;\n this.onPrecompProgress = params.onPrecompProgress;\n this.assetCatalog = params.assets;\n\n const scope = {\n registry: params.registry,\n viewport: this.viewport,\n fps: this.fps,\n assets: params.assets,\n measurer: this.measurer,\n };\n this.store = new ClipStore(project, scope, {\n profile: params.precompProfile,\n // Nothing is resident before the manager exists, which is what the first build should see.\n isReady: (key) => this.assetManager?.isReady(key) ?? false,\n });\n this.precomper = new AssetTimeline(project, scope, { store: this.store });\n /**\n * Only what frame 0 needs; the rest streams in behind the first paint, so time-to-first-frame is O(tracks on\n * screen), not O(project).\n */\n this.precomp = this.precomper.ensureCovering(0);\n this.stateEvaluator = new StateEvaluator(project, scope, this.store);\n this.assetManager = new AssetManager(\n this.precomp, this.storageAdapter, this.audioDevice,\n (error) => this.captureRenderError(error),\n );\n\n this.masterClock.setDuration(this.totalDuration);\n\n this.masterClock.onPlay((t, speed, reverse) => {\n this.audioDevice.play(t, speed, reverse);\n this.storageAdapter.setPlaying(true);\n });\n this.masterClock.onPause(() => {\n this.audioDevice.stop();\n this.storageAdapter.setPlaying(false);\n });\n this.masterClock.onTick(async (currentTime: number) => {\n /**\n * A tick is also a render pass: claim a generation so a stale paused seek cannot paint after the clock moved\n * on, and vice versa.\n */\n const gen = ++this.seekGeneration;\n const frame = clipTimeToFrame(currentTime, this.fps);\n if (frame >= this.totalFrames) this.masterClock.pause();\n this.discoverThrough(frame);\n await this.loadFrame(frame);\n if (!this.isCurrent(gen)) return;\n this.audioDevice.syncTo(currentTime);\n this.renderAt(frame);\n this.assetManager.prefetch(frame);\n this.trimAround(frame);\n });\n\n this.startBackgroundPrecomp();\n }\n\n /** Deferred behind a yield so the first frame paints before this competes for the main thread. */\n private startBackgroundPrecomp(): void {\n if (this.precompRunning || this.disposed || this.precomp.complete) return;\n this.precompRunning = true;\n void (async () => {\n try {\n await yieldToScheduler();\n /**\n * Looped: a document swapped in during the pass's last step has no yield left for the pass to notice it by.\n */\n while (!this.disposed && !this.precomp.complete) {\n const final = await this.precomper.runAsync({\n budgetMs: this.precompBudgetMs,\n isCancelled: () => this.disposed,\n onProgress: result => this.adoptPrecomp(result),\n });\n if (this.disposed) return;\n if (!this.precomp.complete) this.adoptPrecomp(final);\n }\n } finally {\n this.precompRunning = false;\n }\n })();\n }\n\n /**\n * `setPrecomp` resets the asset manager's audio signature, which reschedules audio a new result changed.\n */\n private adoptPrecomp(next: AssetTimelineResult): void {\n if (this.disposed) return;\n this.precomp = next;\n this.assetManager.setPrecomp(next);\n this.masterClock.setDuration(this.totalDuration);\n this.onPrecompProgress?.(next);\n }\n\n /**\n * A track nobody discovered has no asset windows, so its frame would reach for decodes nothing loaded. Cheap\n * once they are: runs every tick.\n */\n private discoverThrough(frame: number): void {\n const next = this.precomper.ensureCovering(Math.floor(frame));\n if (next !== this.precomp) this.adoptPrecomp(next);\n }\n\n /**\n * Also the layout gates of every track covering it: a face must be resident before text measures, whatever its\n * window says.\n */\n private async loadFrame(frame: number): Promise<void> {\n const gates: AssetRecord[] = [];\n for (const span of spansCovering(this.store.spans, Math.floor(frame))) {\n for (const record of this.store.layoutGates(span.id)) {\n if (!this.assetManager.isReady(record.src)) gates.push(record);\n }\n }\n if (gates.length === 0) {\n await this.assetManager.loadAt(frame);\n return;\n }\n await Promise.all([this.assetManager.loadAt(frame), this.assetManager.loadRecords(gates)]);\n }\n\n private trimAround(frame: number): void {\n if (Math.abs(frame - this.lastTrimFrame) < this.fps) return;\n this.lastTrimFrame = frame;\n this.store.trim(Math.floor(frame), Math.ceil(TRIM_HORIZON_SECONDS * this.fps));\n }\n\n private lastTrimFrame = 0;\n\n get isPlaying(): boolean {\n return this.masterClock.isPlaying;\n }\n\n get currentTime(): number {\n return this.masterClock.currentTime;\n }\n\n get currentFrame(): number {\n return clipTimeToFrame(this.masterClock.currentTime, this.fps);\n }\n\n onTime(cb: TimeCallback): void {\n this.masterClock.onTime(cb);\n }\n\n onPlay(cb: () => void): void {\n this.masterClock.onPlay(() => cb());\n }\n\n onPause(cb: () => void): void {\n this.masterClock.onPause(cb);\n }\n\n private isCurrent(gen: number): boolean {\n return !this.disposed && gen === this.seekGeneration;\n }\n\n private renderAt(frame: number): void {\n /**\n * A disposed controller's surface is freed; an in-flight seek (StrictMode double-mount, HMR) can resolve after\n * `dispose()`.\n */\n if (this.disposed) return;\n this.hasPainted = true;\n this.renders++;\n try {\n /** A track whose compile measured a face before it loaded builds again now that it has. */\n this.store.settleGates(spansCovering(this.store.spans, Math.floor(frame)).map((span) => span.id));\n /**\n * Inside the guard too: a command can throw at a time, and a missing font throws while measuring.\n */\n this.stateEvaluator.stateAt(frame);\n /**\n * After evaluation, before layout: an override beats what the document evaluated to, and layout sees it.\n */\n this.applyOverrides();\n this.stateEvaluator.layout(this.measurer);\n this.renderContext.execute(() => {\n this.stateEvaluator.render(this.renderContext);\n });\n for (const raw of this.renderContext.takeRenderIssues()) {\n const issue = toRenderIssue(raw);\n this.captureRenderError(new Error(issue.message), undefined, issue);\n }\n } catch (error) {\n this.captureRenderError(error, frame);\n }\n this.announcePaint(frame);\n }\n\n private announcePaint(frame: number): void {\n if (!this.onFramePainted) return;\n try {\n this.onFramePainted(Math.floor(frame));\n } catch (error) {\n console.error(\"[PlaybackController] onFramePainted listener threw:\", error);\n }\n }\n\n /** Pauses playback first. Waits for required assets before rendering, then prefetches upcoming frames. */\n async seek(frame: number): Promise<void> {\n if (this.disposed) return;\n const gen = ++this.seekGeneration;\n this.paintInFlight = gen;\n try {\n const clamped = Math.max(0, Math.min(frame, this.totalFrames));\n this.masterClock.pause();\n this.discoverThrough(clamped);\n this.masterClock.seek(clipFrameToTime(clamped, this.fps));\n await this.loadFrame(clamped);\n if (!this.isCurrent(gen)) return;\n /**\n * A cold seek can land on a video frame or image no draw has asked for yet: the render asks, the adapter\n * warms, the frame paints again.\n */\n if (await this.settle(() => this.renderAt(clamped), gen) === \"superseded\") return;\n this.assetManager.prefetch(clamped);\n this.trimAround(clamped);\n } finally {\n this.paintLanded(gen);\n }\n }\n\n /**\n * A track whose clip is unchanged keeps its tree and discovery; one whose clip patches in place re-declares\n * only the owners the edit can reach, and republishes the asset timeline only when that changed it.\n *\n * The swap does not paint: it loads the frame's assets first and the canvas keeps the last complete frame\n * until then, better than a current frame with a hole where an added picture has not arrived. See {@link\n * pendingSwap}.\n */\n setProject(next: ProjectDocument): void {\n if (this.disposed) return;\n /**\n * Claimed before anything is touched, so a seek parked on a yield unwinds rather than painting into a timeline\n * that moved under it.\n */\n const gen = ++this.seekGeneration;\n\n this.precomper.setProject(next);\n this.stateEvaluator.setProject(next);\n // Adopts only when the swap changed what is published — an edit no declaration read changes nothing.\n this.discoverThrough(this.currentFrame);\n this.clearRenderErrors();\n this.masterClock.setDuration(this.totalDuration);\n\n // The timeline may now be shorter than where the playhead sat.\n const frame = Math.min(this.currentFrame, Math.max(0, this.totalFrames - 1));\n this.pendingSwap = gen;\n this.paintInFlight = gen;\n this.lastReplacePaint = this.loadAndRepaint(frame, gen);\n this.startBackgroundPrecomp();\n }\n\n /**\n * Build every track again and repaint, as a swap to the same document would if it could tell: a clip that\n * failed for want of an entry the catalog now has builds, and one measured against an old size is measured\n * again.\n */\n reconcileCatalog(): void {\n if (this.disposed) return;\n this.store.reset();\n this.setProject(this.store.project);\n }\n\n whenReplaced(): Promise<void> {\n return this.lastReplacePaint;\n }\n\n private lastReplacePaint: Promise<void> = Promise.resolve();\n\n /**\n * The generation claimed by the swap whose paint has not landed, or `0`. {@link repaint} stands down while it\n * names the current generation: the swap owes a paint that reads every override as it stands. A generation,\n * not a flag, because a seek can supersede the swap and an uncleared flag would disable `repaint` for the\n * session.\n */\n private pendingSwap = 0;\n\n private async loadAndRepaint(frame: number, gen: number): Promise<void> {\n try {\n try {\n await this.loadFrame(frame);\n } catch (err) {\n console.error(\"[PlaybackController] swap asset load failed:\", err);\n return;\n }\n await this.settle(() => this.renderAt(frame), gen);\n } finally {\n // Only this swap's claim is released: a newer one has written its own.\n if (this.pendingSwap === gen) this.pendingSwap = 0;\n this.paintLanded(gen);\n }\n }\n\n /** Reposition the clock to `frame` without interrupting playback. */\n seekWhilePlaying(frame: number): void {\n // Invalidate any in-flight paused seek so its late render can't paint over\n // the live playback position.\n ++this.seekGeneration;\n const clamped = Math.max(0, Math.min(frame, this.totalFrames));\n this.masterClock.seek(clipFrameToTime(clamped, this.fps));\n }\n\n /**\n * Renders afresh (the drawing buffer may have been cleared since the last tick) and loads the frame's assets\n * first.\n */\n async screenshot(): Promise<string | undefined> {\n const frame = this.stateEvaluator.currentFrame;\n const gen = ++this.seekGeneration;\n this.paintInFlight = gen;\n try {\n await this.loadFrame(frame);\n if (!this.isCurrent(gen)) return undefined;\n // A capture is kept, not glanced at, so it waits for the upgrades a preview paints behind.\n if (await this.settle(() => this.renderAt(frame), gen, true) === \"superseded\") return undefined;\n return this.renderContext.screenshot();\n } finally {\n this.paintLanded(gen);\n }\n }\n\n private async settle(render: () => void, gen: number, upgrades = false): Promise<SettleOutcome> {\n const adapter = upgrades ? settlingUpgrades(this.storageAdapter) : this.storageAdapter;\n const outcome = await renderSettled(render, adapter, () => this.isCurrent(gen));\n if (outcome === \"exhausted\") {\n console.warn(`[PlaybackController] frame ${this.stateEvaluator.currentFrame} still had decodes pending after ${SETTLE_PASSES} passes`);\n }\n return outcome;\n }\n\n /**\n * The generation of the seek, swap or screenshot still on its way to its paint, or `0`. A repaint behind\n * decodes leaves that paint to it; see {@link settleTrailing}.\n */\n private paintInFlight = 0;\n\n private renders = 0;\n\n private repaintOwedSince: number | null = null;\n\n /** Unless a newer paint has claimed since; repaints behind what it drew. */\n private paintLanded(gen: number): void {\n if (this.paintInFlight !== gen || this.disposed) return;\n this.paintInFlight = 0;\n if (this.repaintOwedSince !== null) {\n const stale = this.renders === this.repaintOwedSince;\n this.repaintOwedSince = null;\n if (stale && !this.isPlaying) this.renderAt(this.stateEvaluator.currentFrame);\n }\n this.settleTrailing();\n }\n\n /**\n * With each node's frame range on the project timeline and its waveforms attached. `null` before any track is\n * built.\n */\n getTreeState(): TreeState | null {\n const instance = this.stateEvaluator.currentInstance;\n if (!instance) return null;\n const track = this.precomp.tracks.find(t => t.id === this.stateEvaluator.currentTrackId);\n const trackStart = track?.startFrame ?? 0;\n const frameCount = track?.frameCount ?? trackFrameCount(instance.duration, this.fps);\n\n const bars = new Map<string, { startFrame: number; endFrame: number }>();\n const pathOfOwner = new Map<string, string>();\n instance.forEachOwner((_node, ownerKey, span, path) => {\n pathOfOwner.set(ownerKey, path);\n const frames = spanFrames(span, this.fps, frameCount);\n if (frames) {\n bars.set(path, { startFrame: trackStart + frames.startFrame, endFrame: trackStart + frames.endFrame });\n }\n });\n const waveformsByPath = waveformsByOwner(track?.audioRequests ?? [], pathOfOwner);\n return nodeToTreeState(instance.canvas, \"\", bars, waveformsByPath);\n }\n\n getNodeState(nodeId: string): NodeState | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = findNode(canvas, nodeId);\n if (!node) return null;\n return { id: node.id, type: node.className, properties: node.properties };\n }\n\n /**\n * What a document node holds before any command acted on it, whatever frame is showing: the props an editor\n * shows for the node itself, where {@link getNodeState} is the node at this frame.\n */\n getNodeInitialProps(nodeId: string): NodeState[\"properties\"] | null {\n return this.stateEvaluator.currentInstance?.baselineProps(nodeId) ?? null;\n }\n\n getNodeBox(path: string): NodeBox | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n // Through `nodeBoxAt`, so a path naming a mesh inside a `Canvas3D`\n // resolves too — see `node-picking3d.ts`.\n return nodeBoxAt(canvas, path);\n }\n\n /** In the node's own coordinate space, the space {@link setNodeOverride} writes into. */\n getNodePropsAt(path: string): NodeState[\"properties\"] | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = nodeAt(canvas, path);\n return node ? node.properties : null;\n }\n\n getNodeBoxes(): NodeBox[] {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return [];\n const out: NodeBox[] = [];\n collectBoxes(canvas, \"\", out, true);\n return out;\n }\n\n projectNode3D(\n path: string,\n parentPoints: readonly Vector3[],\n localPoints: readonly Vector3[],\n ): Node3DFrame | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return projectNode3DAt(canvas, path, parentPoints, localPoints);\n }\n\n parentPlanePoint(path: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return parentPlanePointAt(canvas, path, point);\n }\n\n childPlanePoint(path: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return childPlanePointAt(canvas, path, point);\n }\n\n reparentPlacement(path: string, parentPath: string, offsets: readonly Vector2[]): ReparentPlacement | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return reparentPlacementAt(canvas, path, parentPath, offsets);\n }\n\n nodeHandles(path: string): NodeHandle[] | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return nodeHandlesAt(canvas, path);\n }\n\n handleValue(path: string, prop: string, point: Vector2): Vector2 | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return handleValueAt(canvas, path, prop, point);\n }\n\n /** `null` when the path does not resolve, the node is not text, or the measurer has no caret model. */\n getTextLayout(path: string): NodeTextLayout | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n const node = findNodeByPath(canvas, path);\n return node instanceof Node2D\n ? this.textLayoutOf(node, path)\n : null;\n }\n\n private textLayoutOf(node: Node2D, path: string): NodeTextLayout | null {\n const source = asTextBlockSource(this.measurer);\n return source ? nodeTextLayout(node, path, source) : null;\n }\n\n /** `tolerance` is grab-slop in scene units: the host's pixel slop divided by its preview zoom. */\n pickNode(point: Vector2, tolerance = 0): NodeBox | null {\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return null;\n return pickNode(canvas, point, tolerance);\n }\n\n /**\n * Layer transient prop values over a node, on top of what the document evaluates to, re-applied after every\n * evaluation until cleared. For an editor dragging at pointer rate without rebuilding anything; the host\n * commits to its document on drop and clears the override.\n */\n setNodeOverride(path: string, props: NodeOverride): void {\n const existing = this.overrides.get(path);\n this.overrides.set(path, existing ? { ...existing, ...props } : { ...props });\n this.applyOverrides();\n }\n\n /**\n * Drop one node's overrides, or all when `path` is omitted, and repaint.\n *\n * Rebuilds the current track's tree: an override was written straight onto a live prop, and the timeline only\n * restores what its own commands write. Cheap enough for pointer-up, the only place it belongs. `path` is\n * structural, not an id: a node a composite built for itself has no authored one.\n */\n clearNodeOverrides(path?: string): void {\n const cleared = path === undefined\n ? (this.overrides.size > 0 && (this.overrides.clear(), true))\n : this.overrides.delete(path);\n if (!cleared) return;\n this.stateEvaluator.rebuild();\n // Through `repaint` for both of its guards — see there.\n this.repaint();\n }\n\n /** Not authored, so it rides beside the document. */\n setEditorStates(trackId: string, states: NodeEditorStates | undefined): void {\n this.stateEvaluator.setEditorStates(trackId, states);\n this.repaint();\n }\n\n /**\n * Cheap enough for a pointer-rate drag loop: `stateAt` early-returns for the frame already current.\n *\n * Does nothing before the first frame has been drawn (the last complete frame is a blank surface, which should\n * stay up), nor between a swap and its paint, which owes one of its own. See {@link pendingSwap}.\n */\n repaint(): void {\n if (!this.hasPainted) return;\n if (this.pendingSwap !== 0 && this.isCurrent(this.pendingSwap)) return;\n this.renderAt(this.stateEvaluator.currentFrame);\n this.settleTrailing();\n }\n\n /**\n * Repaint a paused frame as the decodes its draw asked for land: one it could not draw at all, and an upgrade\n * of one drawn below demand, which no paint waits for. Never while playing (the next tick picks them up). A\n * seek, swap or screenshot still on its way paints for itself, and once more when it lands if an upgrade\n * arrived after its render.\n */\n private settleTrailing(): void {\n if (this.trailingSettle || this.disposed || this.isPlaying || !this.hasBackgroundDecodes()) return;\n void this.repaintBehindDecodes().catch((error) => {\n console.error(\"[PlaybackController] background decode failed:\", error);\n });\n }\n\n private trailingSettle = false;\n\n private hasBackgroundDecodes(): boolean {\n return this.storageAdapter.hasPendingDecodes() || this.storageAdapter.hasPendingUpgrades();\n }\n\n private async repaintBehindDecodes(): Promise<void> {\n // Released in `finally` on the same turn as the return, so a paint landing\n // right after this gives up can start the next one.\n this.trailingSettle = true;\n try {\n for (let pass = 0; pass < SETTLE_PASSES && this.hasBackgroundDecodes(); pass++) {\n const [decoded, upgraded] = await Promise.all([\n this.storageAdapter.warmPendingDecodes(),\n this.storageAdapter.warmPendingUpgrades(),\n ]);\n if (!(decoded || upgraded) || this.disposed || this.isPlaying) return;\n if (this.paintInFlight !== 0) {\n this.repaintOwedSince = this.renders;\n return;\n }\n this.renderAt(this.stateEvaluator.currentFrame);\n }\n } finally {\n this.trailingSettle = false;\n }\n }\n\n private applyOverrides(): void {\n if (this.overrides.size === 0) return;\n const canvas = this.stateEvaluator.currentCanvas;\n if (!canvas) return;\n for (const [path, props] of this.overrides) {\n findNodeByPath(canvas, path)?.set(props as never);\n }\n }\n\n play(speed: number = 1, reverse: boolean = false): void {\n if (this.currentFrame >= this.totalFrames) {\n this.seek(0).then(() => this.masterClock.play(speed, reverse)).catch(() => { });\n return;\n }\n this.masterClock.play(speed, reverse);\n }\n\n pause(): void {\n this.masterClock.pause();\n }\n\n setMuted(muted: boolean): void {\n this.audioDevice.setMuted(muted);\n }\n\n dispose(): void {\n this.disposed = true;\n this.masterClock.dispose();\n this.audioDevice.dispose();\n this.stateEvaluator.dispose();\n this.store.dispose();\n this.assetManager.dispose();\n }\n}\n\n/** How far from the playhead a built tree is kept, in seconds. */\nconst TRIM_HORIZON_SECONDS = 30;\n\nfunction settlingUpgrades(adapter: StorageAdapter): Pick<StorageAdapter, \"warmPendingDecodes\"> {\n return {\n async warmPendingDecodes() {\n const [decoded, upgraded] = await Promise.all([adapter.warmPendingDecodes(), adapter.warmPendingUpgrades()]);\n return decoded || upgraded;\n },\n };\n}\n\nfunction declOf(error: AssetNotLoadedError, catalog: AssetCatalog): AssetDecl | undefined {\n switch (error.assetType) {\n case \"image\":\n return { type: \"image\", src: error.src };\n case \"font\":\n return { type: \"font\", family: error.src, weight: 400 };\n case \"video\":\n try {\n return { type: \"video\", src: error.src, trimStart: 0, trimEnd: catalog.getVideoDuration(error.src) };\n } catch {\n return undefined;\n }\n default:\n return undefined;\n }\n}\n\n/**\n * Indexed over the authored child list, the one every structural-path walk reads, so selection, bars and\n * `getNodeBox` share one set of paths.\n */\nfunction nodeToTreeState(\n node: Node,\n path: string,\n bars: ReadonlyMap<string, { startFrame: number; endFrame: number }>,\n waveformsByPath: ReadonlyMap<string, WaveformInfo[]>,\n): TreeState {\n const state: TreeState = {\n id: node.id,\n path,\n type: node.className,\n children: node._allChildren.map((c, i) => nodeToTreeState(c, nodePath(path, i), bars, waveformsByPath)),\n };\n const waveform = waveformsByPath.get(path);\n if (waveform && waveform.length > 0) state.waveform = waveform;\n const bar = bars.get(path);\n if (bar) {\n state.startFrame = bar.startFrame;\n state.endFrame = bar.endFrame;\n }\n return state;\n}\n\n/**\n * Keyed by the structural path their owner has in the tree right now; a request whose owner is not in the tree\n * has no bar to land on.\n */\nfunction waveformsByOwner(\n requests: readonly AudioRequest[],\n pathOfOwner: ReadonlyMap<string, string>,\n): Map<string, WaveformInfo[]> {\n const byPath = new Map<string, WaveformInfo[]>();\n for (const req of requests) {\n const path = req.ownerId !== undefined ? pathOfOwner.get(req.ownerId) : \"\";\n if (path === undefined) continue;\n const info: WaveformInfo = {\n src: req.src,\n startTime: req.startAt,\n endTime: Number.isFinite(req.endAt) ? req.endAt : null,\n };\n const list = byPath.get(path);\n if (list) list.push(info);\n else byPath.set(path, [info]);\n }\n return byPath;\n}\n\n/** The node at a structural path (`\"\"` = root, `\"0.2\"` = third child of the first), walking the authored list. */\nfunction findNodeByPath(root: Node2D, path: string): Node | null {\n if (path === \"\") return root;\n let node: Node = root;\n for (const seg of path.split(\".\")) {\n const next = node._allChildren[Number(seg)];\n if (!next) return null;\n node = next;\n }\n return node;\n}\n\nfunction findNode(root: Node, id: string): Node | null {\n if (root.id === id) return root;\n\n for (const child of root._allChildren) {\n const found = findNode(child, id);\n if (found) return found;\n }\n\n return null;\n}\n"]}
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import { TimeCallback } from "../platform/ticker.js";
|
|
2
2
|
import { PlaybackController } from "./playback-controller.js";
|
|
3
3
|
/**
|
|
4
|
-
* Realtime transport over a `Session`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* an absence rather than a no-op: a UI wants to ask whether a transport exists
|
|
9
|
-
* (and hide its scrub bar if not) rather than call `play()` into a void.
|
|
10
|
-
*
|
|
11
|
-
* Thin on purpose. Everything here is `PlaybackController`'s; this exists so
|
|
12
|
-
* that "what a session is" and "what is currently playing it" are separable, and
|
|
13
|
-
* so the transport half can simply not exist where it makes no sense.
|
|
4
|
+
* Realtime transport over a `Session`, reached as `session.playback`. `null` when the environment has no clock
|
|
5
|
+
* (a headless export has no wall clock to sync to): an absence rather than a no-op, so a UI can ask whether a
|
|
6
|
+
* transport exists and hide its scrub bar. Thin on purpose: it is all `PlaybackController`'s, kept so "what a
|
|
7
|
+
* session is" and "what is playing it" are separable.
|
|
14
8
|
*/
|
|
15
9
|
export declare class Playback {
|
|
16
10
|
private readonly controller;
|
|
17
11
|
/** @internal — constructed by `Session`, never directly. */
|
|
18
12
|
constructor(controller: PlaybackController);
|
|
19
13
|
get isPlaying(): boolean;
|
|
20
|
-
/** The playhead, in frames. */
|
|
21
14
|
get frame(): number;
|
|
22
15
|
play(speed?: number, reverse?: boolean): void;
|
|
23
16
|
pause(): void;
|
|
24
17
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
18
|
+
* Without the await a paused scrub needs. Use `Session.seekFrame` when paused: it resolves once the frame is
|
|
19
|
+
* drawn.
|
|
27
20
|
*/
|
|
28
21
|
seekFrame(frame: number): void;
|
|
29
22
|
setMuted(muted: boolean): void;
|
|
30
|
-
/** Fires as the playhead moves, in seconds. */
|
|
31
23
|
onTime(callback: TimeCallback): void;
|
|
32
24
|
onPlay(callback: () => void): void;
|
|
33
25
|
onPause(callback: () => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playback.d.ts","sourceRoot":"","sources":["../../src/runtime/playback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"playback.d.ts","sourceRoot":"","sources":["../../src/runtime/playback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,QAAQ;IAEL,OAAO,CAAC,QAAQ,CAAC,UAAU;IADvC,4DAA4D;gBAC/B,UAAU,EAAE,kBAAkB;IAE3D,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,CAAC,KAAK,SAAI,EAAE,OAAO,UAAQ,GAAG,IAAI;IAItC,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI9B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAI9B,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAIpC,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIlC,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;CAGtC"}
|
package/dist/runtime/playback.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Realtime transport over a `Session`.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* an absence rather than a no-op: a UI wants to ask whether a transport exists
|
|
7
|
-
* (and hide its scrub bar if not) rather than call `play()` into a void.
|
|
8
|
-
*
|
|
9
|
-
* Thin on purpose. Everything here is `PlaybackController`'s; this exists so
|
|
10
|
-
* that "what a session is" and "what is currently playing it" are separable, and
|
|
11
|
-
* so the transport half can simply not exist where it makes no sense.
|
|
2
|
+
* Realtime transport over a `Session`, reached as `session.playback`. `null` when the environment has no clock
|
|
3
|
+
* (a headless export has no wall clock to sync to): an absence rather than a no-op, so a UI can ask whether a
|
|
4
|
+
* transport exists and hide its scrub bar. Thin on purpose: it is all `PlaybackController`'s, kept so "what a
|
|
5
|
+
* session is" and "what is playing it" are separable.
|
|
12
6
|
*/
|
|
13
7
|
export class Playback {
|
|
14
8
|
controller;
|
|
@@ -19,7 +13,6 @@ export class Playback {
|
|
|
19
13
|
get isPlaying() {
|
|
20
14
|
return this.controller.isPlaying;
|
|
21
15
|
}
|
|
22
|
-
/** The playhead, in frames. */
|
|
23
16
|
get frame() {
|
|
24
17
|
return this.controller.currentFrame;
|
|
25
18
|
}
|
|
@@ -30,8 +23,8 @@ export class Playback {
|
|
|
30
23
|
this.controller.pause();
|
|
31
24
|
}
|
|
32
25
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
26
|
+
* Without the await a paused scrub needs. Use `Session.seekFrame` when paused: it resolves once the frame is
|
|
27
|
+
* drawn.
|
|
35
28
|
*/
|
|
36
29
|
seekFrame(frame) {
|
|
37
30
|
this.controller.seekWhilePlaying(frame);
|
|
@@ -39,7 +32,6 @@ export class Playback {
|
|
|
39
32
|
setMuted(muted) {
|
|
40
33
|
this.controller.setMuted(muted);
|
|
41
34
|
}
|
|
42
|
-
/** Fires as the playhead moves, in seconds. */
|
|
43
35
|
onTime(callback) {
|
|
44
36
|
this.controller.onTime(callback);
|
|
45
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playback.js","sourceRoot":"","sources":["../../src/runtime/playback.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"playback.js","sourceRoot":"","sources":["../../src/runtime/playback.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,OAAO,QAAQ;IAEY;IAD7B,4DAA4D;IAC5D,YAA6B,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;IAAI,CAAC;IAEhE,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;IACrC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK;QAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,KAAa;QACnB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ,CAAC,KAAc;QACnB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,QAAoB;QACvB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,CAAC,QAAoB;QACxB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACJ","sourcesContent":["import { TimeCallback } from \"@/platform/ticker\";\nimport { PlaybackController } from \"./playback-controller\";\n\n/**\n * Realtime transport over a `Session`, reached as `session.playback`. `null` when the environment has no clock\n * (a headless export has no wall clock to sync to): an absence rather than a no-op, so a UI can ask whether a\n * transport exists and hide its scrub bar. Thin on purpose: it is all `PlaybackController`'s, kept so \"what a\n * session is\" and \"what is playing it\" are separable.\n */\nexport class Playback {\n /** @internal — constructed by `Session`, never directly. */\n constructor(private readonly controller: PlaybackController) { }\n\n get isPlaying(): boolean {\n return this.controller.isPlaying;\n }\n\n get frame(): number {\n return this.controller.currentFrame;\n }\n\n play(speed = 1, reverse = false): void {\n this.controller.play(speed, reverse);\n }\n\n pause(): void {\n this.controller.pause();\n }\n\n /**\n * Without the await a paused scrub needs. Use `Session.seekFrame` when paused: it resolves once the frame is\n * drawn.\n */\n seekFrame(frame: number): void {\n this.controller.seekWhilePlaying(frame);\n }\n\n setMuted(muted: boolean): void {\n this.controller.setMuted(muted);\n }\n\n onTime(callback: TimeCallback): void {\n this.controller.onTime(callback);\n }\n\n onPlay(callback: () => void): void {\n this.controller.onPlay(callback);\n }\n\n onPause(callback: () => void): void {\n this.controller.onPause(callback);\n }\n}\n"]}
|
|
@@ -1,35 +1,27 @@
|
|
|
1
1
|
import type { AssetCatalog } from "../assets/catalog.js";
|
|
2
2
|
import type { AssetRecord } from "../assets/record.js";
|
|
3
|
-
/**
|
|
4
|
-
* A single asset's position on the project timeline together with the
|
|
5
|
-
* load/evict windows the asset manager uses to keep memory bounded.
|
|
6
|
-
*/
|
|
3
|
+
/** With the load/evict windows the asset manager uses to keep memory bounded. */
|
|
7
4
|
export interface AssetTrack {
|
|
8
5
|
record: AssetRecord;
|
|
9
|
-
/**
|
|
6
|
+
/** Larger decodes get more lead time. Always <= startFrame. */
|
|
10
7
|
cacheAt: number;
|
|
11
|
-
/**
|
|
8
|
+
/** `null` keeps it (fonts). Always >= endFrame when set. */
|
|
12
9
|
discardAt: number | null;
|
|
13
10
|
}
|
|
14
|
-
/** What one track contributes: its clip-local records, and where the track starts. */
|
|
15
11
|
export interface TrackRecords {
|
|
16
12
|
id: string;
|
|
17
13
|
startFrame: number;
|
|
18
14
|
records: ReadonlyMap<string, AssetRecord>;
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* An edit to one track touches the keys that track's records changed, so the
|
|
25
|
-
* cost of republishing follows the edit rather than the project. The map handed
|
|
26
|
-
* out is replaced, never mutated, so a result already published stays as it was.
|
|
17
|
+
* Kept up to date key by key: an edit to one track touches only the keys its records changed, so the cost of
|
|
18
|
+
* republishing follows the edit. The map handed out is replaced, never mutated, so a result already published
|
|
19
|
+
* stays as it was.
|
|
27
20
|
*/
|
|
28
21
|
export declare class ProjectAssets {
|
|
29
22
|
private readonly _fps;
|
|
30
23
|
private readonly _catalog;
|
|
31
24
|
constructor(_fps: number, _catalog: AssetCatalog);
|
|
32
|
-
/** The merged map for `tracks` — the same object as last time when nothing in it changed. */
|
|
33
25
|
update(tracks: readonly TrackRecords[]): ReadonlyMap<string, AssetTrack>;
|
|
34
26
|
private readonly _tracks;
|
|
35
27
|
private readonly _byKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-assets.d.ts","sourceRoot":"","sources":["../../src/runtime/project-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,iBAAiB,CAAC;AAE7E
|
|
1
|
+
{"version":3,"file":"project-assets.d.ts","sourceRoot":"","sources":["../../src/runtime/project-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,iBAAiB,CAAC;AAE7E,iFAAiF;AACjF,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAC7C;AAED;;;;GAIG;AACH,qBAAa,aAAa;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAU,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAvC,IAAI,EAAE,MAAM,EAAmB,QAAQ,EAAE,YAAY;IAElF,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC;IAgDxE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IACzD,OAAO,CAAC,IAAI,CAA8C;IAE1D,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,QAAQ;CAWnB;AAsED,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAiBlE"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* An edit to one track touches the keys that track's records changed, so the
|
|
6
|
-
* cost of republishing follows the edit rather than the project. The map handed
|
|
7
|
-
* out is replaced, never mutated, so a result already published stays as it was.
|
|
2
|
+
* Kept up to date key by key: an edit to one track touches only the keys its records changed, so the cost of
|
|
3
|
+
* republishing follows the edit. The map handed out is replaced, never mutated, so a result already published
|
|
4
|
+
* stays as it was.
|
|
8
5
|
*/
|
|
9
6
|
export class ProjectAssets {
|
|
10
7
|
_fps;
|
|
@@ -13,7 +10,6 @@ export class ProjectAssets {
|
|
|
13
10
|
this._fps = _fps;
|
|
14
11
|
this._catalog = _catalog;
|
|
15
12
|
}
|
|
16
|
-
/** The merged map for `tracks` — the same object as last time when nothing in it changed. */
|
|
17
13
|
update(tracks) {
|
|
18
14
|
const touched = new Set();
|
|
19
15
|
const live = new Set();
|
|
@@ -98,13 +94,12 @@ export class ProjectAssets {
|
|
|
98
94
|
return merged && assetTrackOf(merged, this._fps, this._catalog);
|
|
99
95
|
}
|
|
100
96
|
}
|
|
101
|
-
/** Shift an asset record's frame range onto the project timeline by `offset`. */
|
|
102
97
|
function shiftRecord(record, offset) {
|
|
103
98
|
if (offset === 0)
|
|
104
99
|
return record;
|
|
105
100
|
return { ...record, startFrame: record.startFrame + offset, endFrame: record.endFrame + offset };
|
|
106
101
|
}
|
|
107
|
-
/**
|
|
102
|
+
/** An asset several tracks use resolves to one window over all of it. */
|
|
108
103
|
function mergeRecord(existing, record) {
|
|
109
104
|
if (!existing)
|
|
110
105
|
return record;
|
|
@@ -114,10 +109,7 @@ function mergeRecord(existing, record) {
|
|
|
114
109
|
endFrame: Math.max(existing.endFrame, record.endFrame),
|
|
115
110
|
};
|
|
116
111
|
}
|
|
117
|
-
/**
|
|
118
|
-
* The source's intrinsic decode, off the catalog: what a full decode costs, which
|
|
119
|
-
* is what lead time scales with. Nothing for a source the catalog cannot size.
|
|
120
|
-
*/
|
|
112
|
+
/** What a full decode costs, which lead time scales with. Nothing for a source the catalog cannot size. */
|
|
121
113
|
function intrinsicMB(record, catalog) {
|
|
122
114
|
let size;
|
|
123
115
|
try {
|
|
@@ -130,11 +122,10 @@ function intrinsicMB(record, catalog) {
|
|
|
130
122
|
return 0;
|
|
131
123
|
return decodedMB(size.width, size.height);
|
|
132
124
|
}
|
|
133
|
-
/**
|
|
125
|
+
/** Clamped: a 4K image gets about 64, a thumbnail the minimum. */
|
|
134
126
|
const LEADS_PER_MB = 2;
|
|
135
127
|
const MIN_LEAD = 2;
|
|
136
128
|
const MAX_LEAD = 120;
|
|
137
|
-
/** Frames an asset outlives its last use, for backward-scrub headroom. */
|
|
138
129
|
const TAIL_FRAMES = 30;
|
|
139
130
|
function decodedMB(width, height) {
|
|
140
131
|
return (width * height * 4) / (1024 * 1024);
|
|
@@ -142,7 +133,7 @@ function decodedMB(width, height) {
|
|
|
142
133
|
function leadFrames(mb) {
|
|
143
134
|
return Math.min(MAX_LEAD, Math.max(MIN_LEAD, Math.round(mb * LEADS_PER_MB)));
|
|
144
135
|
}
|
|
145
|
-
/**
|
|
136
|
+
/** Fonts are pinned from frame 0 and never evicted. */
|
|
146
137
|
function assetTrackOf(entry, fps, catalog) {
|
|
147
138
|
switch (entry.type) {
|
|
148
139
|
case "image": {
|