@motionscript/core 0.1.0-alpha.9 → 0.1.1-alpha.0
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 +29 -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 +35 -96
- 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-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/chunk-5TDMGUXQ.js +3 -0
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.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/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/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +41 -3
- 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 -54
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +13 -39
- 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 +15 -30
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +31 -31
- 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 +12 -18
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +29 -31
- 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 +97 -281
- 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/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 +7 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +18 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +73 -0
- package/dist/props/layout.js.map +1 -0
- 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 +1 -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-7DB6BI27.js +0 -6
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +0 -7
- package/dist/browser/chunks/chunk-IX53IFBD.js +0 -13
- package/dist/browser/chunks/chunk-IX53IFBD.js.map +0 -7
- package/dist/browser/chunks/chunk-Q55UPA3E.js +0 -3
- package/dist/browser/chunks/chunk-Q55UPA3E.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":"request.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEpF
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEpF,oTAAoT;AACpT,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,MAAM,EAAE,KAAK,CAAC;IACd,oCAAoC;IACpC,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,sQAAsQ;IACtQ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,0IAA0I;AAC1I,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAErD;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IAEZ,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAEhB,2RAA2R;IAC3R,KAAK,EAAE,MAAM,CAAC;IAEd,oTAAoT;IACpT,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,kKAAkK;IAClK,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAElB,6OAA6O;IAC7O,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,0DAA0D;IAC1D,MAAM,EAAE,KAAK,CAAC;IACd,kHAAkH;IAClH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IAEd,4EAA4E;IAC5E,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC,+LAA+L;IAC/L,GAAG,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAE9B,wMAAwM;IACxM,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oLAAoL;IACpL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { effectsKey } from "../../attributes/audio/effects/union.js";
|
|
2
2
|
import { paramKey } from "../../attributes/audio/ramp.js";
|
|
3
3
|
import { transitionKey } from "../../attributes/audio/transition.js";
|
|
4
|
-
/**
|
|
5
|
-
* Everything about a stop that changes what passes through it, as a string — so
|
|
6
|
-
* a device can tell an edited bus from the one it already built.
|
|
7
|
-
*/
|
|
4
|
+
/** Everything about a stop that changes what passes through it, as a string, so a device can tell an edited bus from the one it built. */
|
|
8
5
|
export function busStopKey(stop) {
|
|
9
6
|
return `${stop.id}:${paramKey(stop.volume)}:${paramKey(stop.pan)}:${stop.mute ? 1 : 0}:${effectsKey(stop.effects)}:${transitionKey(stop.transitionIn)}:${transitionKey(stop.transitionOut)}:${stop.startAt}:${stop.endAt}`;
|
|
10
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoB,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAc,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAwB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/attributes/audio/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoB,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAc,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAwB,MAAM,+BAA+B,CAAC;AAmBpF,0IAA0I;AAC1I,MAAM,UAAU,UAAU,CAAC,IAAkB;IACzC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;AAC/N,CAAC","sourcesContent":["import { effectsKey, type AudioEffect } from \"@/attributes/audio/effects/union\";\nimport { paramKey, type Param } from \"@/attributes/audio/ramp\";\nimport { transitionKey, type AudioTransition } from \"@/attributes/audio/transition\";\n\n/** One bus a clip's signal passes through to the master: a flattened snapshot of an {@link AudioBus} node (core describes the graph, a platform builds it). {@link id} makes it a *bus* rather than per-clip processing: clips naming the same id share one live chain, so a bus reverb is one tail fed by both. */\nexport interface AudioBusStop {\n id: string;\n /** Linear gain. A {@link Param}, so a bus fade is a ramp rather than a per-frame write. */\n volume: Param;\n /** -1 hard left … +1 hard right. */\n pan: Param;\n mute: boolean;\n /** Applied in array order, index 0 closest to the source. */\n effects?: AudioEffect[];\n transitionIn?: AudioTransition;\n transitionOut?: AudioTransition;\n /** When the bus is present, in the same seconds as the request carrying the stop: what ramps in {@link volume} or {@link effects} (and their transitions) run over. Not the clip's span, because one bus feeds many clips and its fade must mean one thing to all. */\n startAt: number;\n endAt: number;\n}\n\n/** Everything about a stop that changes what passes through it, as a string, so a device can tell an edited bus from the one it built. */\nexport function busStopKey(stop: AudioBusStop): string {\n return `${stop.id}:${paramKey(stop.volume)}:${paramKey(stop.pan)}:${stop.mute ? 1 : 0}:${effectsKey(stop.effects)}:${transitionKey(stop.transitionIn)}:${transitionKey(stop.transitionOut)}:${stop.startAt}:${stop.endAt}`;\n}\n\nexport interface AudioRequest {\n id: string;\n src: string;\n\n /** The clip timestamp when the audio should START playing. */\n startAt: number; // in seconds\n\n /** The clip timestamp when the audio STOPS. Always a number: **`Infinity` is the open sentinel**, never null/undefined (an unstopped clip carries it until {@link open} resolution pins it to the project end). Test with `Number.isFinite(endAt)`; a `?? Infinity` guard is dead code. */\n endAt: number; // in seconds\n\n /** True when started and left running at its scene's end (neither stopped nor finite-trimmed). Open requests skip the per-scene audio clamp and **continue across scene boundaries**: `assembleTimeline` shifts them to absolute time and resolves `endAt = min(startAt + mediaDuration, projectTotalDuration)`. */\n open?: boolean;\n\n /** Source media length, carried on **open** requests so the cross-scene end resolves at assembly without re-reading the catalog. Ignored for bounded requests. */\n mediaDuration?: number;\n\n /** Offset in seconds to skip ahead in the audio file. Default: 0 */\n trimStart: number;\n\n /** Out-point inside the source in seconds, carried **only by a looping request that has one**: a device loops `[trimStart, trimEnd)` instead of the whole buffer. Otherwise {@link endAt} already ends playback there and this is absent. */\n trimEnd?: number;\n\n /** Linear gain over the clip's own seconds. Default 1. */\n volume: Param;\n /** Playback rate, default 1. A ramp runs over the first {@link sourceLength} source seconds after `trimStart`. */\n speed?: Param;\n /** The source seconds a speed ramp is placed on; carried only with one, so the device and the timeline place it alike. */\n sourceLength?: number;\n loop: boolean; // Default: false\n\n /** Audio effects applied in array order (index 0 closest to the source). */\n effects?: AudioEffect[];\n /** A gain over the clip's first and last seconds, on top of {@link volume}. */\n transitionIn?: AudioTransition;\n transitionOut?: AudioTransition;\n\n /** The buses this clip feeds, **source-adjacent first** like {@link effects}, so the chain reads in signal order: clip effects, each stop, then master. Absent goes straight to the master. */\n bus?: readonly AudioBusStop[];\n\n /** The owner key of the declaring node (its document row's id, plus the path below that row for a composite's node), so a timeline can draw the waveform on that node's bar. Never affects playback. */\n ownerId?: string;\n\n /** The sound of something that is also a picture (a video's own track): a source with no audio is silence for such a request, not a failure. Not part of the request's identity. */\n optional?: boolean;\n}"]}
|
|
@@ -6,7 +6,6 @@ import type { AudioBusStop, AudioRequest } from "./request.js";
|
|
|
6
6
|
/** One clip a command's sound plays, in its clip's seconds. */
|
|
7
7
|
export interface AudioClip {
|
|
8
8
|
src: string;
|
|
9
|
-
/** When it starts. */
|
|
10
9
|
at?: number;
|
|
11
10
|
/** When it is cut, however much of it is left. */
|
|
12
11
|
until?: number;
|
|
@@ -26,11 +25,7 @@ export interface AudioClip {
|
|
|
26
25
|
/** Sound nobody asked for by name — see {@link AudioRequest.optional}. */
|
|
27
26
|
optional?: boolean;
|
|
28
27
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source
|
|
31
|
-
* seconds at `speed`. Must match the device's `playbackRate` schedule, or a
|
|
32
|
-
* request ends before or after its sound does.
|
|
33
|
-
*/
|
|
28
|
+
/** Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source seconds at `speed`; must match the device's `playbackRate` schedule or a request ends before or after its sound. */
|
|
34
29
|
export declare function clipTimeAtSource(speed: Param, sourceLength: number, sourceElapsed?: number): number;
|
|
35
30
|
/** Inverse of {@link clipTimeAtSource}: the source seconds reached `clipElapsed` clip seconds in. */
|
|
36
31
|
export declare function sourceTimeAtClip(speed: Param, sourceLength: number, clipElapsed: number): number;
|
|
@@ -40,11 +35,6 @@ export declare function clipDurationOf(clip: {
|
|
|
40
35
|
readonly trimEnd?: number;
|
|
41
36
|
readonly speed?: Param;
|
|
42
37
|
}, mediaDuration: number): number;
|
|
43
|
-
/**
|
|
44
|
-
* The request `clip` schedules.
|
|
45
|
-
*
|
|
46
|
-
* Bounded when it has an end — a trim, or an `until` — and **open** otherwise, so
|
|
47
|
-
* a bed nothing cuts continues across later tracks; see `AudioRequest.open`.
|
|
48
|
-
*/
|
|
38
|
+
/** The request `clip` schedules: bounded with an end (a trim or `until`), **open** otherwise so a bed nothing cuts continues across later tracks (see `AudioRequest.open`). */
|
|
49
39
|
export declare function requestOf(clip: AudioClip, catalog: AssetCatalog, ownerKey: string, n: number): AudioRequest;
|
|
50
40
|
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAA0E,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAA0E,KAAK,KAAK,EAAE,MAAM,QAAQ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AAG,MAAM,CAGtJ;AAED,+KAA+K;AAC/K,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CA2D3G"}
|
|
@@ -3,11 +3,7 @@ import { integrateSpeedToClipTime, isRamp, sourceTimeAtClipElapsed, staticValue
|
|
|
3
3
|
function scalarSpeed(speed) {
|
|
4
4
|
return Number.isFinite(speed) && speed > 0 ? speed : 1;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source
|
|
8
|
-
* seconds at `speed`. Must match the device's `playbackRate` schedule, or a
|
|
9
|
-
* request ends before or after its sound does.
|
|
10
|
-
*/
|
|
6
|
+
/** Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source seconds at `speed`; must match the device's `playbackRate` schedule or a request ends before or after its sound. */
|
|
11
7
|
export function clipTimeAtSource(speed, sourceLength, sourceElapsed = sourceLength) {
|
|
12
8
|
if (isRamp(speed))
|
|
13
9
|
return integrateSpeedToClipTime(speed, sourceLength, sourceElapsed);
|
|
@@ -24,12 +20,7 @@ export function clipDurationOf(clip, mediaDuration) {
|
|
|
24
20
|
const length = Math.max(0, (clip.trimEnd ?? mediaDuration) - (clip.trimStart ?? 0));
|
|
25
21
|
return clipTimeAtSource(clip.speed ?? 1, length);
|
|
26
22
|
}
|
|
27
|
-
/**
|
|
28
|
-
* The request `clip` schedules.
|
|
29
|
-
*
|
|
30
|
-
* Bounded when it has an end — a trim, or an `until` — and **open** otherwise, so
|
|
31
|
-
* a bed nothing cuts continues across later tracks; see `AudioRequest.open`.
|
|
32
|
-
*/
|
|
23
|
+
/** The request `clip` schedules: bounded with an end (a trim or `until`), **open** otherwise so a bed nothing cuts continues across later tracks (see `AudioRequest.open`). */
|
|
33
24
|
export function requestOf(clip, catalog, ownerKey, n) {
|
|
34
25
|
const at = clip.at ?? 0;
|
|
35
26
|
const until = clip.until ?? Infinity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAc,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/attributes/audio/schedule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAc,MAAM,QAAQ,CAAC;AA2B5G,SAAS,WAAW,CAAC,KAAa;IAC9B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,qMAAqM;AACrM,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,YAAoB,EAAE,gBAAwB,YAAY;IACrG,IAAI,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,wBAAwB,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IACvF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AACnF,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,YAAoB,EAAE,WAAmB;IACpF,IAAI,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IACpF,OAAO,IAAI,CAA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QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvF,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC1B,CAAC;SAAM,IAAI,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACxB,CAAC;SAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC;IAChF,CAAC;SAAM,CAAC;QACJ,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QACtD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;YACpB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC;QACpC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC","sourcesContent":["import type { AssetCatalog } from \"@/assets/catalog\";\nimport { resolveAudioEffects, type AudioEffectsInput } from \"./effects/chain\";\nimport { integrateSpeedToClipTime, isRamp, sourceTimeAtClipElapsed, staticValue, type Param } from \"./ramp\";\nimport type { AudioTransition } from \"./transition\";\nimport type { AudioBusStop, AudioRequest } from \"./request\";\n\n/** One clip a command's sound plays, in its clip's seconds. */\nexport interface AudioClip {\n src: string;\n at?: number;\n /** When it is cut, however much of it is left. */\n until?: number;\n /** In-point inside the source, in seconds. */\n trimStart?: number;\n /** Out-point inside the source. Absent plays to the source's end. */\n trimEnd?: number;\n loop?: boolean;\n volume?: Param;\n /** Playback rate; a ramp runs over source seconds after `trimStart`. */\n speed?: Param;\n effects?: AudioEffectsInput;\n transitionIn?: AudioTransition;\n transitionOut?: AudioTransition;\n /** Source-adjacent first — see {@link AudioRequest.bus}. */\n bus?: readonly AudioBusStop[];\n /** Sound nobody asked for by name — see {@link AudioRequest.optional}. */\n optional?: boolean;\n}\n\nfunction scalarSpeed(speed: number): number {\n return Number.isFinite(speed) && speed > 0 ? speed : 1;\n}\n\n/** Clip seconds spent playing the first `sourceElapsed` of `sourceLength` source seconds at `speed`; must match the device's `playbackRate` schedule or a request ends before or after its sound. */\nexport function clipTimeAtSource(speed: Param, sourceLength: number, sourceElapsed: number = sourceLength): number {\n if (isRamp(speed)) return integrateSpeedToClipTime(speed, sourceLength, sourceElapsed);\n return Math.max(0, Math.min(sourceElapsed, sourceLength)) / scalarSpeed(speed);\n}\n\n/** Inverse of {@link clipTimeAtSource}: the source seconds reached `clipElapsed` clip seconds in. */\nexport function sourceTimeAtClip(speed: Param, sourceLength: number, clipElapsed: number): number {\n if (isRamp(speed)) return sourceTimeAtClipElapsed(speed, sourceLength, clipElapsed);\n return Math.max(0, Math.min(sourceLength, clipElapsed * scalarSpeed(speed)));\n}\n\n/** How long a clip lasts on the timeline: its trimmed source at its speed. `trimEnd` absent plays to `mediaDuration`. */\nexport function clipDurationOf(clip: { readonly trimStart?: number; readonly trimEnd?: number; readonly speed?: Param }, mediaDuration: number): number {\n const length = Math.max(0, (clip.trimEnd ?? mediaDuration) - (clip.trimStart ?? 0));\n return clipTimeAtSource(clip.speed ?? 1, length);\n}\n\n/** The request `clip` schedules: bounded with an end (a trim or `until`), **open** otherwise so a bed nothing cuts continues across later tracks (see `AudioRequest.open`). */\nexport function requestOf(clip: AudioClip, catalog: AssetCatalog, ownerKey: string, n: number): AudioRequest {\n const at = clip.at ?? 0;\n const until = clip.until ?? Infinity;\n const trimStart = clip.trimStart ?? 0;\n const trimEnd = clip.trimEnd ?? Infinity;\n const loop = clip.loop ?? false;\n const effects = resolveAudioEffects(clip.effects);\n // Read even when the length goes unused: a missing file throws here, as a\n // build error, rather than playing silence.\n const mediaDuration = catalog.getMediaDuration(clip.src);\n\n let speed = clip.speed ?? 1;\n if (loop && isRamp(speed)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(`[motionscript] A speed ramp on a looping clip (${clip.src}) has no one source axis to run over; it plays at its start value.`);\n }\n speed = staticValue(speed, 1);\n }\n const sourceLength = Math.max(0, (Number.isFinite(trimEnd) ? trimEnd : mediaDuration) - trimStart);\n\n const request: AudioRequest = {\n id: `${ownerKey}|${clip.src}|${at}|${n}`,\n src: clip.src,\n startAt: at,\n endAt: Infinity,\n trimStart,\n volume: clip.volume ?? 1,\n speed,\n loop,\n ownerId: ownerKey,\n };\n if (isRamp(speed)) request.sourceLength = sourceLength;\n if (effects.length > 0) request.effects = effects;\n if (clip.transitionIn) request.transitionIn = clip.transitionIn;\n if (clip.transitionOut) request.transitionOut = clip.transitionOut;\n if (clip.bus) request.bus = clip.bus;\n if (clip.optional) request.optional = true;\n\n // A loop repeats the trimmed region, so a `trimEnd` bounds one pass and says\n // nothing about when the clip stops: only a cut (`until`) ends it, and with\n // none it runs open to the project end like any other bed.\n if (loop && trimEnd > trimStart && Number.isFinite(trimEnd)) request.trimEnd = trimEnd;\n\n if (loop && Number.isFinite(until)) {\n request.endAt = until;\n } else if (loop) {\n request.open = true;\n } else if (Number.isFinite(trimEnd)) {\n request.endAt = Math.min(until, at + clipTimeAtSource(speed, sourceLength));\n } else {\n const natural = clipTimeAtSource(speed, sourceLength);\n if (Number.isFinite(until)) {\n request.endAt = Math.min(until, at + natural);\n } else {\n request.open = true;\n request.mediaDuration = natural;\n }\n }\n return request;\n}\n"]}
|
|
@@ -10,16 +10,7 @@ interface SoundPropsBase {
|
|
|
10
10
|
/** Audio effects applied to the clip (gain, eq, tremolo, echo). */
|
|
11
11
|
effects?: AudioEffectsInput;
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Author-facing sound props. Two mutually-exclusive ways to bound the clip:
|
|
15
|
-
*
|
|
16
|
-
* - `{ trimStart?, trimEnd? }` — explicit in/out points into the source file.
|
|
17
|
-
* - `{ duration? }` — syntax sugar for a clip that runs `duration` seconds from
|
|
18
|
-
* the start (equivalent to `trimStart: 0, trimEnd: duration`).
|
|
19
|
-
*
|
|
20
|
-
* When neither `trimEnd` nor `duration` is given, the clip runs to the source's
|
|
21
|
-
* full length (resolved from the asset catalog). `trimStart` defaults to 0.
|
|
22
|
-
*/
|
|
13
|
+
/** Author-facing sound props with two mutually exclusive bounds: `{ trimStart?, trimEnd? }` (explicit in/out points into the source) or `{ duration? }` (sugar for `trimStart: 0, trimEnd: duration`). With neither `trimEnd` nor `duration` the clip runs to the source's full length (from the asset catalog); `trimStart` defaults to 0. */
|
|
23
14
|
export type SoundProps = (SoundPropsBase & {
|
|
24
15
|
trimStart?: number;
|
|
25
16
|
trimEnd?: number;
|
|
@@ -29,20 +20,7 @@ export type SoundProps = (SoundPropsBase & {
|
|
|
29
20
|
trimStart?: undefined;
|
|
30
21
|
trimEnd?: undefined;
|
|
31
22
|
});
|
|
32
|
-
/**
|
|
33
|
-
export interface ResolvedSoundProps {
|
|
34
|
-
src: string;
|
|
35
|
-
volume?: Param;
|
|
36
|
-
speed?: Param;
|
|
37
|
-
loop?: boolean;
|
|
38
|
-
trimStart?: number;
|
|
39
|
-
trimEnd?: number;
|
|
40
|
-
effects?: AudioEffect[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* A clip's resolved props, and how long it runs. What a node plays is declared
|
|
44
|
-
* through `declareAudio`; this is only the arithmetic over one clip.
|
|
45
|
-
*/
|
|
23
|
+
/** A clip's resolved props and how long it runs; what a node plays is declared through `declareAudio`, this is only the arithmetic over one clip. */
|
|
46
24
|
export declare class Sound {
|
|
47
25
|
readonly src: string;
|
|
48
26
|
volume: Param;
|
|
@@ -54,8 +32,6 @@ export declare class Sound {
|
|
|
54
32
|
constructor(props: SoundProps);
|
|
55
33
|
/** Clip seconds `trimmedSourceLength` source seconds take at this clip's speed. */
|
|
56
34
|
clipDurationFor(trimmedSourceLength: number): number;
|
|
57
|
-
/** @deprecated Renamed to {@link clipDurationFor}; kept until 1.0. */
|
|
58
|
-
sceneDurationFor(trimmedSourceLength: number): number;
|
|
59
35
|
/** Clip seconds, speed profile applied; `undefined` when nothing bounds the clip. */
|
|
60
36
|
get clipDuration(): number | undefined;
|
|
61
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/sound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,kCAAkC,CAAC;AAC/F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,UAAU,cAAc;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED
|
|
1
|
+
{"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/sound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,kCAAkC,CAAC;AAC/F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,UAAU,cAAc;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED,+UAA+U;AAC/U,MAAM,MAAM,UAAU,GAChB,CAAC,cAAc,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,GACjF,CAAC,cAAc,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAE3F,qJAAqJ;AACrJ,qBAAa,KAAK;IACd,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,EAAE,CAAC;gBAEX,KAAK,EAAE,UAAU;IAU7B,mFAAmF;IACnF,eAAe,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM;IAIpD,qFAAqF;IACrF,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAIrC;CACJ"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { resolveAudioEffects } from "../../attributes/audio/effects/chain.js";
|
|
2
2
|
import { clipTimeAtSource } from "../../attributes/audio/schedule.js";
|
|
3
|
-
/**
|
|
4
|
-
* A clip's resolved props, and how long it runs. What a node plays is declared
|
|
5
|
-
* through `declareAudio`; this is only the arithmetic over one clip.
|
|
6
|
-
*/
|
|
3
|
+
/** A clip's resolved props and how long it runs; what a node plays is declared through `declareAudio`, this is only the arithmetic over one clip. */
|
|
7
4
|
export class Sound {
|
|
8
5
|
src;
|
|
9
6
|
volume;
|
|
@@ -17,7 +14,6 @@ export class Sound {
|
|
|
17
14
|
this.volume = props.volume ?? 1;
|
|
18
15
|
this.speed = props.speed ?? 1;
|
|
19
16
|
this.loop = props.loop ?? false;
|
|
20
|
-
// `duration` is sugar for `trimStart: 0, trimEnd: duration`.
|
|
21
17
|
this.trimStart = props.trimStart ?? 0;
|
|
22
18
|
this.trimEnd = props.trimEnd ?? props.duration ?? Infinity;
|
|
23
19
|
this.effects = resolveAudioEffects(props.effects);
|
|
@@ -26,10 +22,6 @@ export class Sound {
|
|
|
26
22
|
clipDurationFor(trimmedSourceLength) {
|
|
27
23
|
return clipTimeAtSource(this.speed, trimmedSourceLength);
|
|
28
24
|
}
|
|
29
|
-
/** @deprecated Renamed to {@link clipDurationFor}; kept until 1.0. */
|
|
30
|
-
sceneDurationFor(trimmedSourceLength) {
|
|
31
|
-
return this.clipDurationFor(trimmedSourceLength);
|
|
32
|
-
}
|
|
33
25
|
/** Clip seconds, speed profile applied; `undefined` when nothing bounds the clip. */
|
|
34
26
|
get clipDuration() {
|
|
35
27
|
return this.trimEnd !== Infinity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sound.js","sourceRoot":"","sources":["../../../src/attributes/audio/sound.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sound.js","sourceRoot":"","sources":["../../../src/attributes/audio/sound.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAiB/D,qJAAqJ;AACrJ,MAAM,OAAO,KAAK;IACL,GAAG,CAAS;IACrB,MAAM,CAAQ;IACd,KAAK,CAAQ;IACb,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,OAAO,CAAgB;IAEvB,YAAY,KAAiB;QACzB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,mFAAmF;IACnF,eAAe,CAAC,mBAA2B;QACvC,OAAO,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IAC7D,CAAC;IAED,qFAAqF;IACrF,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;YAC5B,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;YACrD,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;CACJ","sourcesContent":["import type { AudioEffect } from \"@/attributes/audio/effects/union\";\nimport { type AudioEffectsInput, resolveAudioEffects } from \"@/attributes/audio/effects/chain\";\nimport type { Param } from \"@/attributes/audio/ramp\";\nimport { clipTimeAtSource } from \"@/attributes/audio/schedule\";\n\ninterface SoundPropsBase {\n src: string;\n volume?: Param;\n /** Playback rate; a ramp runs over source seconds after `trimStart`. */\n speed?: Param;\n loop?: boolean;\n /** Audio effects applied to the clip (gain, eq, tremolo, echo). */\n effects?: AudioEffectsInput;\n}\n\n/** Author-facing sound props with two mutually exclusive bounds: `{ trimStart?, trimEnd? }` (explicit in/out points into the source) or `{ duration? }` (sugar for `trimStart: 0, trimEnd: duration`). With neither `trimEnd` nor `duration` the clip runs to the source's full length (from the asset catalog); `trimStart` defaults to 0. */\nexport type SoundProps =\n | (SoundPropsBase & { trimStart?: number; trimEnd?: number; duration?: undefined })\n | (SoundPropsBase & { duration?: number; trimStart?: undefined; trimEnd?: undefined });\n\n/** A clip's resolved props and how long it runs; what a node plays is declared through `declareAudio`, this is only the arithmetic over one clip. */\nexport class Sound {\n readonly src: string;\n volume: Param;\n speed: Param;\n loop: boolean;\n trimStart: number;\n trimEnd: number;\n effects: AudioEffect[];\n\n constructor(props: SoundProps) {\n this.src = props.src;\n this.volume = props.volume ?? 1;\n this.speed = props.speed ?? 1;\n this.loop = props.loop ?? false;\n this.trimStart = props.trimStart ?? 0;\n this.trimEnd = props.trimEnd ?? props.duration ?? Infinity;\n this.effects = resolveAudioEffects(props.effects);\n }\n\n /** Clip seconds `trimmedSourceLength` source seconds take at this clip's speed. */\n clipDurationFor(trimmedSourceLength: number): number {\n return clipTimeAtSource(this.speed, trimmedSourceLength);\n }\n\n /** Clip seconds, speed profile applied; `undefined` when nothing bounds the clip. */\n get clipDuration(): number | undefined {\n return this.trimEnd !== Infinity\n ? this.clipDurationFor(this.trimEnd - this.trimStart)\n : undefined;\n }\n}\n"]}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { type EaseSpec } from "../../tween/ease/spec.js";
|
|
2
|
-
/**
|
|
3
|
-
* What happens as a clip enters (`transitionIn`) or leaves (`transitionOut`):
|
|
4
|
-
* today, a fade over its first or last `duration` clip seconds.
|
|
5
|
-
*
|
|
6
|
-
* A cross-fade is two clips that overlap, the first carrying a `transitionOut`
|
|
7
|
-
* and the second a `transitionIn` as long as the overlap; equal-power shapes
|
|
8
|
-
* are complementary, so the pair needs no link between them.
|
|
9
|
-
*/
|
|
2
|
+
/** What happens as a clip enters (`transitionIn`) or leaves (`transitionOut`): a fade over its first or last `duration` clip seconds. A cross-fade is two overlapping clips, the first with a `transitionOut` and the second a `transitionIn` as long as the overlap; equal-power shapes are complementary, so the pair needs no link. */
|
|
10
3
|
export interface AudioTransition {
|
|
11
4
|
readonly duration: number;
|
|
12
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/transition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG9D
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/attributes/audio/transition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG9D,0UAA0U;AAC1U,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC5C;AAaD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,eAAe,EAAE,aAAa,CAAC,EAAE,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAU9J;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,eAAe,EAAE,aAAa,CAAC,EAAE,eAAe,GAAG,MAAM,CAMnI;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,CAG7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.js","sourceRoot":"","sources":["../../../src/attributes/audio/transition.ts"],"names":[],"mappings":"AAAA,OAAO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I,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/I,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAuC;IACjE,IAAI,CAAC,UAAU;QAAE,OAAO,GAAG,CAAC;IAC5B,OAAO,GAAG,UAAU,CAAC,QAAQ,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,IAAI,YAAY,EAAE,CAAC;AAClJ,CAAC","sourcesContent":["import { easeOfSpec, type EaseSpec } from \"@/tween/ease/spec\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\n\n/** What happens as a clip enters (`transitionIn`) or leaves (`transitionOut`): a fade over its first or last `duration` clip seconds. A cross-fade is two overlapping clips, the first with a `transitionOut` and the second a `transitionIn` as long as the overlap; equal-power shapes are complementary, so the pair needs no link. */\nexport interface AudioTransition {\n readonly duration: number;\n /**\n * Progress through the transition (x, 0→1) to how far it has come (y, the\n * gain for a fade), read as entering; a `transitionOut` plays it backwards.\n * Default `\"equalPower\"`, sin(πx/2).\n */\n readonly curve?: \"equalPower\" | EaseSpec;\n}\n\nconst EQUAL_POWER: EasingFunction = (x) => Math.sin((Math.max(0, Math.min(1, x)) * Math.PI) / 2);\nconst shapes = new WeakMap<EaseSpec, EasingFunction>();\n\nfunction shapeOf(transition: AudioTransition): EasingFunction {\n const curve = transition.curve;\n if (curve === undefined || curve === \"equalPower\") return EQUAL_POWER;\n let shape = shapes.get(curve);\n if (!shape) shapes.set(curve, (shape = easeOfSpec(curve)));\n return shape;\n}\n\n/**\n * The two transitions' durations on a clip `length` seconds long: shrunk in\n * proportion when together they would overrun it.\n */\nexport function transitionSpans(length: number, transitionIn?: AudioTransition, transitionOut?: AudioTransition): { readonly in: number; readonly out: number } {\n const wanted = { in: Math.max(0, transitionIn?.duration ?? 0), out: Math.max(0, transitionOut?.duration ?? 0) };\n if (!Number.isFinite(length)) return { in: wanted.in, out: 0 };\n const total = wanted.in + wanted.out;\n if (total <= length || total === 0) return wanted;\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(`[motionscript] Transitions of ${total.toFixed(3)}s overrun a ${length.toFixed(3)}s clip; both are shortened to fit.`);\n }\n const scale = Math.max(0, length) / total;\n return { in: wanted.in * scale, out: wanted.out * scale };\n}\n\n/**\n * The gain the transitions put on a clip at `t` of its `length` seconds: 1\n * outside both. An open clip (`length` not finite) has no end to leave from.\n */\nexport function transitionGainAt(t: number, length: number, transitionIn?: AudioTransition, transitionOut?: AudioTransition): number {\n const spans = transitionSpans(length, transitionIn, transitionOut);\n let gain = 1;\n if (transitionIn && spans.in > 0 && t < spans.in) gain *= Math.max(0, shapeOf(transitionIn)(Math.max(0, t) / spans.in));\n if (transitionOut && spans.out > 0 && t > length - spans.out) gain *= Math.max(0, shapeOf(transitionOut)(Math.max(0, length - t) / spans.out));\n return gain;\n}\n\nexport function transitionKey(transition: AudioTransition | undefined): string {\n if (!transition) return \"_\";\n return `${transition.duration}:${typeof transition.curve === \"object\" ? JSON.stringify(transition.curve) : transition.curve ?? \"equalPower\"}`;\n}\n"]}
|
|
@@ -1,57 +1,25 @@
|
|
|
1
1
|
import { Vector2 } from "./vector2.js";
|
|
2
2
|
import { BoxBounds } from "../../layout/bounds.js";
|
|
3
3
|
import type { AttributeOps } from "../../attributes/shared/operators.js";
|
|
4
|
-
/**
|
|
5
|
-
* Named positions inside a box: the nine alignment keys (`center`, `topLeft`, …).
|
|
6
|
-
* Each maps to a per-axis point in `[-1, 1]`: x is -1 (left) … +1 (right), y is
|
|
7
|
-
* -1 (bottom) … +1 (top) — the y-up convention used throughout layout.
|
|
8
|
-
*/
|
|
4
|
+
/** The nine named positions inside a box (`center`, `topLeft`, …), each a per-axis point in `[-1, 1]` (x -1 left … +1 right, y -1 bottom … +1 top: layout's y-up convention). */
|
|
9
5
|
export type AlignmentKey = "center" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter" | "centerLeft" | "centerRight";
|
|
10
|
-
/**
|
|
11
|
-
* A normalised point inside a box — the single value type behind every "which
|
|
12
|
-
* point of this thing" prop: `Node2D.pivot` (what it rotates about), a container's
|
|
13
|
-
* `align` (where children sit), a gradient's `center` (where it emits from) and
|
|
14
|
-
* an image fill's `anchor` (which point of the source meets the box).
|
|
15
|
-
*
|
|
16
|
-
* Those props keep distinct names because they position *different things*; what
|
|
17
|
-
* they share is this type, this `[-1, 1]` y-up space, and this vocabulary — so a
|
|
18
|
-
* value read off one can be handed to another and mean the same place.
|
|
19
|
-
*
|
|
20
|
-
* Accepts a named position (`'center'`) or an explicit {@link Vector2}.
|
|
21
|
-
*/
|
|
6
|
+
/** A normalised point inside a box: the one type behind every "which point of this thing" prop (`Node2D.pivot`, a container's `align`, a gradient's `center`, an image fill's `anchor`). They keep distinct names because they position different things, but share this `[-1, 1]` y-up space so a value read off one can be handed to another. A named position or a {@link Vector2}. */
|
|
22
7
|
export type Alignment = AlignmentKey | Vector2;
|
|
23
|
-
/**
|
|
24
|
-
* The alignment attribute's op set: `pivot`, `align`, `center` and `anchor` all
|
|
25
|
-
* use `resolve`/`lerp`. The rest is the shared alignment-*positioning* math for
|
|
26
|
-
* `Node2D` — used by both the constructor (reactive binding form) and a `to()`
|
|
27
|
-
* step (one-shot form): a named alignment (`'topRight'`, `'centerLeft'`, …)
|
|
28
|
-
* resolves to a normalised pivot `a` in `[-1, 1]` (y-up), and landing that
|
|
29
|
-
* alignment on a target scene-space point means the node's centre sits at
|
|
30
|
-
* `target - a·(size/2)` — the inverse of the offset from centre to the
|
|
31
|
-
* alignment. Kept here rather than duplicated between `Node2D`'s constructor
|
|
32
|
-
* and `_prepareStep`.
|
|
33
|
-
*/
|
|
8
|
+
/** The alignment attribute's op set: `resolve`/`lerp` for `pivot`, `align`, `center` and `anchor`, plus the shared alignment-*positioning* math for `Node2D` (constructor binding and one-shot `to()`): landing a named alignment (pivot `a`, y-up) on a target scene-space point puts the node's centre at `target - a·(size/2)`. */
|
|
34
9
|
export type AlignmentOps = {
|
|
35
10
|
/** The nine named keys in reading order, top-left to bottom-right. */
|
|
36
11
|
readonly keys: readonly AlignmentKey[];
|
|
37
|
-
/** Whether `value` is one of the nine named keys — the strings `resolve` accepts. */
|
|
38
12
|
isKey(value: unknown): value is AlignmentKey;
|
|
39
|
-
/**
|
|
40
|
-
* alignment cannot be combined with an explicit `pivot` (the alignment derives one). */
|
|
13
|
+
/** Validates a node's alignment props: at most one named alignment, never combined with an explicit `pivot` (the alignment derives one). */
|
|
41
14
|
validateProps(props: Record<string, unknown>): void;
|
|
42
|
-
/** The first named alignment key present in `props`, or `undefined` if none. */
|
|
43
15
|
findKey(props: Record<string, unknown>): AlignmentKey | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* concrete layout rect. Used by the one-shot `to()` path: returns the pivot to
|
|
46
|
-
* apply plus the absolute `x`/`y` the node's centre must move to. */
|
|
16
|
+
/** Resolves a named alignment and the centre offset that lands it on `target` for a concrete layout rect (one-shot `to()`): the pivot plus the absolute `x`/`y` the centre moves to. */
|
|
47
17
|
resolveTargetOnce(alignmentKey: AlignmentKey, rect: BoxBounds, target: Vector2): {
|
|
48
18
|
pivot: Vector2;
|
|
49
19
|
x: number;
|
|
50
20
|
y: number;
|
|
51
21
|
};
|
|
52
|
-
/** Reactive
|
|
53
|
-
* accessor and a live layout-rect accessor, returns the pivot to write plus `x`/`y`
|
|
54
|
-
* binding callbacks that re-evaluate whenever the target or the node's layout changes. */
|
|
22
|
+
/** Reactive form for the constructor: returns the pivot to write plus `x`/`y` binding callbacks that re-evaluate when the target or the node's layout changes. */
|
|
55
23
|
bindTarget(alignmentKey: AlignmentKey, getTarget: () => Vector2, getRect: () => BoxBounds): {
|
|
56
24
|
pivot: Vector2;
|
|
57
25
|
x: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/alignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"alignment.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/alignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,iLAAiL;AACjL,MAAM,MAAM,YAAY,GAClB,QAAQ,GACR,SAAS,GACT,UAAU,GACV,YAAY,GACZ,aAAa,GACb,WAAW,GACX,cAAc,GACd,YAAY,GACZ,aAAa,CAAC;AAEpB,0XAA0X;AAC1X,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;AA+B/C,sUAAsU;AAEtU,MAAM,MAAM,YAAY,GAAG;IACvB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IACvC,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAAC;IAC7C,4IAA4I;IAC5I,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACpD,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,GAAG,SAAS,CAAC;IAClE,wLAAwL;IACxL,iBAAiB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1H,kKAAkK;IAClK,UAAU,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,CAAC,EAAE,MAAM,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,MAAM,CAAA;KAAE,CAAC;CACpJ,CAAA;AACD,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,YAwC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.js","sourceRoot":"","sources":["../../../src/attributes/layout/alignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"alignment.js","sourceRoot":"","sources":["../../../src/attributes/layout/alignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,WAAW,CAAC;AAmBjD,MAAM,UAAU,GAAkC;IAC9C,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACxB,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACzB,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAC3B,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACtB,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,EAA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AE,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;SACxD,CAAC;IACN,CAAC;CACJ,CAAC","sourcesContent":["import { Vector2, lerpVector2 } from \"./vector2\";\nimport { BoxBounds } from \"@/layout/bounds\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\n/** The nine named positions inside a box (`center`, `topLeft`, …), each a per-axis point in `[-1, 1]` (x -1 left … +1 right, y -1 bottom … +1 top: layout's y-up convention). */\nexport type AlignmentKey =\n | \"center\"\n | \"topLeft\"\n | \"topRight\"\n | \"bottomLeft\"\n | \"bottomRight\"\n | \"topCenter\"\n | \"bottomCenter\"\n | \"centerLeft\"\n | \"centerRight\";\n\n/** A normalised point inside a box: the one type behind every \"which point of this thing\" prop (`Node2D.pivot`, a container's `align`, a gradient's `center`, an image fill's `anchor`). They keep distinct names because they position different things, but share this `[-1, 1]` y-up space so a value read off one can be handed to another. A named position or a {@link Vector2}. */\nexport type Alignment = AlignmentKey | Vector2;\n\nconst ALIGNMENTS: Record<AlignmentKey, Vector2> = {\n topLeft: { x: -1, y: 1 },\n topCenter: { x: 0, y: 1 },\n topRight: { x: 1, y: 1 },\n centerLeft: { x: -1, y: 0 },\n center: { x: 0, y: 0 },\n centerRight: { x: 1, y: 0 },\n bottomLeft: { x: -1, y: -1 },\n bottomCenter: { x: 0, y: -1 },\n bottomRight: { x: 1, y: -1 },\n};\n\n/** The nine named alignment keys in reading order: top row left to right, then\n * the middle row, then the bottom row. */\nconst ALIGNMENT_KEYS: readonly AlignmentKey[] = Object.keys(ALIGNMENTS) as AlignmentKey[];\n\n// `resolve`'s own logic, pulled out only so the alignment-positioning helpers\n// below can reach it without going through a `this`-bound method call.\nfunction resolveOne(value: Alignment): Vector2 {\n if (typeof value === \"string\") {\n const named = Object.hasOwn(ALIGNMENTS, value) ? ALIGNMENTS[value] : undefined;\n if (!named) {\n throw new Error(`Unknown alignment value: '${value}'`);\n }\n return { ...named };\n }\n return { x: value.x, y: value.y };\n}\n\n/** The alignment attribute's op set: `resolve`/`lerp` for `pivot`, `align`, `center` and `anchor`, plus the shared alignment-*positioning* math for `Node2D` (constructor binding and one-shot `to()`): landing a named alignment (pivot `a`, y-up) on a target scene-space point puts the node's centre at `target - a·(size/2)`. */\n\nexport type AlignmentOps = {\n /** The nine named keys in reading order, top-left to bottom-right. */\n readonly keys: readonly AlignmentKey[];\n isKey(value: unknown): value is AlignmentKey;\n /** Validates a node's alignment props: at most one named alignment, never combined with an explicit `pivot` (the alignment derives one). */\n validateProps(props: Record<string, unknown>): void;\n findKey(props: Record<string, unknown>): AlignmentKey | undefined;\n /** Resolves a named alignment and the centre offset that lands it on `target` for a concrete layout rect (one-shot `to()`): the pivot plus the absolute `x`/`y` the centre moves to. */\n resolveTargetOnce(alignmentKey: AlignmentKey, rect: BoxBounds, target: Vector2): { pivot: Vector2; x: number; y: number };\n /** Reactive form for the constructor: returns the pivot to write plus `x`/`y` binding callbacks that re-evaluate when the target or the node's layout changes. */\n bindTarget(alignmentKey: AlignmentKey, getTarget: () => Vector2, getRect: () => BoxBounds): { pivot: Vector2; x: () => number; y: () => number };\n}\nexport const alignmentOps: AttributeOps<Alignment, Vector2> & AlignmentOps = {\n resolve: resolveOne,\n lerp: lerpVector2,\n keys: ALIGNMENT_KEYS,\n\n isKey(value): value is AlignmentKey {\n return typeof value === \"string\" && Object.hasOwn(ALIGNMENTS, value);\n },\n\n validateProps(props) {\n const present = ALIGNMENT_KEYS.filter(k => props[k] !== undefined);\n if (present.length > 1) {\n throw new Error(`Cannot set multiple alignment props at once: ${present.join(', ')}`);\n }\n if (present.length === 1 && props['pivot'] !== undefined) {\n throw new Error(`Cannot set both alignment prop '${present[0]}' and 'pivot' at the same time`);\n }\n },\n\n findKey(props) {\n return ALIGNMENT_KEYS.find(k => props[k] !== undefined);\n },\n\n resolveTargetOnce(alignmentKey, rect, target) {\n const a = resolveOne(alignmentKey);\n return {\n pivot: a,\n x: target.x - a.x * (rect.width / 2),\n y: target.y - a.y * (rect.height / 2),\n };\n },\n\n bindTarget(alignmentKey, getTarget, getRect) {\n const a = resolveOne(alignmentKey);\n return {\n pivot: a,\n x: () => getTarget().x - a.x * (getRect().width / 2),\n y: () => getTarget().y - a.y * (getRect().height / 2),\n };\n },\n};\n"]}
|
|
@@ -12,34 +12,9 @@ export type InsetsProps = number | Partial<InsetsResolved> & {
|
|
|
12
12
|
horizontal?: number;
|
|
13
13
|
vertical?: number;
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
* Accepted shapes for a four-sided inset prop.
|
|
17
|
-
*
|
|
18
|
-
* The type is named for the shape (four edge insets), not for one use of it:
|
|
19
|
-
* `Node2D.padding` insets a layout box in pixels, an image fill's `crop` insets a
|
|
20
|
-
* source in fractions. Same value, same shorthands, same tween — different roles,
|
|
21
|
-
* and each prop names its own.
|
|
22
|
-
*
|
|
23
|
-
* Mirrors {@link Fill}: the loose author-facing {@link InsetsProps} (a number or
|
|
24
|
-
* per-side/symmetric object) plus the strict {@link InsetsResolved} — a read-back
|
|
25
|
-
* resolved value structurally satisfies `InsetsProps`, so it passes through
|
|
26
|
-
* `insetsOps.resolve` idempotently and can be assigned straight back.
|
|
27
|
-
*
|
|
28
|
-
* node.padding = 3 // uniform
|
|
29
|
-
* node.padding = { horizontal: 8, top: 4 } // mixed
|
|
30
|
-
* node.padding = otherNode.padding // resolved passes through
|
|
31
|
-
*/
|
|
15
|
+
/** Accepted shapes for a four-sided inset prop, named for the shape, not one use (`Node2D.padding` insets a layout box in px, an image fill's `crop` a source in fractions). The loose {@link InsetsProps} (a number or per-side/symmetric object) plus the strict {@link InsetsResolved}; a read-back resolved value satisfies `InsetsProps`, so it passes through `insetsOps.resolve` idempotently. */
|
|
32
16
|
export type Insets = InsetsProps | InsetsResolved;
|
|
33
|
-
/**
|
|
34
|
-
* The insets attribute's op set — used by `insetsProperty` and anywhere else a
|
|
35
|
-
* four-sided inset (padding, an image fill's `crop`, …) resolves and tweens.
|
|
36
|
-
*
|
|
37
|
-
* `insetBounds` computes the inner content area produced by subtracting a
|
|
38
|
-
* resolved inset from an outer size — pure, works for any width/height pair,
|
|
39
|
-
* with `x`/`y` carrying the offset of the inner-area center relative to the
|
|
40
|
-
* outer-area center. `outsetSize` is its inverse: adds padding back onto
|
|
41
|
-
* an inner size to get the outer size that contains it.
|
|
42
|
-
*/
|
|
17
|
+
/** The insets attribute's op set (padding, an image fill's `crop`, …). `insetBounds` subtracts a resolved inset from an outer size, with `x`/`y` the offset of the inner centre from the outer centre; `outsetSize` is its inverse. */
|
|
43
18
|
export interface InsetsOps {
|
|
44
19
|
insetBounds(outerWidth: number, outerHeight: number, pad: InsetsResolved): BoxBounds;
|
|
45
20
|
outsetSize(innerWidth: number, innerHeight: number, pad: InsetsResolved): Size2D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insets.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/insets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"insets.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/insets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,yYAAyY;AACzY,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,cAAc,CAAC;AAGlD,uOAAuO;AAEvO,MAAM,WAAW,SAAS;IAEtB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,SAAS,CAAC;IACrF,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAAC;CACpF;AAED,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,SAgCnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insets.js","sourceRoot":"","sources":["../../../src/attributes/layout/insets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"insets.js","sourceRoot":"","sources":["../../../src/attributes/layout/insets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+B1C,MAAM,CAAC,MAAM,SAAS,GAA0D;IAC5E,OAAO,EAAE,CAAC,K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AAG,CAAC,CAAC,EAAE,UAAU,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;QACrD,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;QACvD,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC;QAC7B,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC;KAChC,CAAC;IACF,UAAU,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC3C,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK;QACxC,MAAM,EAAE,WAAW,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM;KAC7C,CAAC;CACL,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\nimport type { BoxBounds } from \"@/layout/bounds\";\nimport { Size2D } from \"./size\";\n\n/** Fully resolved per-side edge insets. */\nexport interface InsetsResolved {\n left: number;\n right: number;\n top: number;\n bottom: number;\n}\n\n\nexport type InsetsProps = number | Partial<InsetsResolved> & {\n horizontal?: number;\n vertical?: number;\n};\n\n/** Accepted shapes for a four-sided inset prop, named for the shape, not one use (`Node2D.padding` insets a layout box in px, an image fill's `crop` a source in fractions). The loose {@link InsetsProps} (a number or per-side/symmetric object) plus the strict {@link InsetsResolved}; a read-back resolved value satisfies `InsetsProps`, so it passes through `insetsOps.resolve` idempotently. */\nexport type Insets = InsetsProps | InsetsResolved;\n\n\n/** The insets attribute's op set (padding, an image fill's `crop`, …). `insetBounds` subtracts a resolved inset from an outer size, with `x`/`y` the offset of the inner centre from the outer centre; `outsetSize` is its inverse. */\n\nexport interface InsetsOps {\n\n insetBounds(outerWidth: number, outerHeight: number, pad: InsetsResolved): BoxBounds;\n outsetSize(innerWidth: number, innerHeight: number, pad: InsetsResolved): Size2D;\n}\n\nexport const insetsOps: AttributeOps<InsetsProps, InsetsResolved> & InsetsOps = {\n resolve: (value: InsetsProps, previous?: InsetsResolved): InsetsResolved => {\n if (typeof value === \"number\") {\n return { left: value, right: value, top: value, bottom: value };\n }\n\n // Fallback resolution order: Specific side -> Symmetric shortcut -> Previous fallback -> Default 0\n return {\n left: value.left ?? value.horizontal ?? previous?.left ?? 0,\n right: value.right ?? value.horizontal ?? previous?.right ?? 0,\n top: value.top ?? value.vertical ?? previous?.top ?? 0,\n bottom: value.bottom ?? value.vertical ?? previous?.bottom ?? 0,\n };\n },\n lerp: (from: InsetsResolved, to: InsetsResolved, t: number): InsetsResolved => {\n return {\n left: lerpNumber(from.left, to.left, t),\n right: lerpNumber(from.right, to.right, t),\n top: lerpNumber(from.top, to.top, t),\n bottom: lerpNumber(from.bottom, to.bottom, t),\n };\n },\n insetBounds: (outerWidth, outerHeight, pad) => ({\n width: Math.max(0, outerWidth - pad.left - pad.right),\n height: Math.max(0, outerHeight - pad.top - pad.bottom),\n x: (pad.left - pad.right) / 2,\n y: (pad.top - pad.bottom) / 2,\n }),\n outsetSize: (innerWidth, innerHeight, pad) => ({\n width: innerWidth + pad.left + pad.right,\n height: innerHeight + pad.top + pad.bottom,\n }),\n};\n"]}
|