@motionscript/core 0.1.0 → 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 +10 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-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 +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +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-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
package/dist/tween/loop.d.ts
CHANGED
|
@@ -1,65 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Repetition
|
|
3
|
-
* goes
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `duration` — it says when the command is running, never what it does. That is
|
|
7
|
-
* why it lives out here rather than in any one command's args: the wrapper goes
|
|
8
|
-
* *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom
|
|
9
|
-
* `command()` nobody has written yet all loop by the same code, with nothing to
|
|
10
|
-
* forward and nothing to forget.
|
|
11
|
-
*
|
|
12
|
-
* And it stays seekable. A looped command is still a pure function of its own
|
|
13
|
-
* normalized time — `at(t)` maps `t` onto a pass and asks the inner command for
|
|
14
|
-
* that pass's frame — so scrubbing into the fourth repetition costs the same as
|
|
15
|
-
* scrubbing into the first, which is the whole reason commands are values here.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Which way a pass runs.
|
|
19
|
-
*
|
|
20
|
-
* `alternate` is the reason this is three values rather than a boolean: a
|
|
21
|
-
* bounce — out and back — is one command with two passes, not two commands whose
|
|
22
|
-
* `at`s have to be kept in step by hand.
|
|
2
|
+
* Repetition as data: how many times a command runs and which way each pass goes. A loop is a **placement** property
|
|
3
|
+
* like `at` and `duration` (when it runs, never what it does), so the wrapper goes around a built `Command` and `to`,
|
|
4
|
+
* `fillTo`, `countTo` and custom commands all loop by the same code. It stays seekable: `at(t)` maps `t` onto a pass
|
|
5
|
+
* and asks the inner command for that pass's frame, so scrubbing into the fourth repetition costs the same as the first.
|
|
23
6
|
*/
|
|
7
|
+
/** Which way a pass runs. `alternate` makes a bounce (out and back) one command with two passes, not two commands kept in step by hand. */
|
|
24
8
|
export type LoopDirection = "normal" | "reverse" | "alternate";
|
|
25
|
-
/**
|
|
26
|
-
* How a command repeats. Absent on a command is "runs once".
|
|
27
|
-
*/
|
|
9
|
+
/** How a command repeats. Absent on a command is "runs once". */
|
|
28
10
|
export interface LoopSpec {
|
|
29
11
|
/** Absent is `"normal"`. */
|
|
30
12
|
direction?: LoopDirection;
|
|
31
|
-
/**
|
|
32
|
-
* How many times to repeat **after** the first pass: `0` is no repeat (the
|
|
33
|
-
* same as no loop at all), `3` plays four passes, and `null` repeats for as
|
|
34
|
-
* long as there is clip left to fill.
|
|
35
|
-
*
|
|
36
|
-
* Repeats rather than total passes so that the value reads as what the word
|
|
37
|
-
* says — "repeat twice" is `2` — and so that the no-op is `0` rather than a
|
|
38
|
-
* `1` that looks like it should do something.
|
|
39
|
-
*/
|
|
13
|
+
/** Repeats **after** the first pass: `0` is no loop, `3` plays four passes, `null` repeats for as long as there is clip left to fill. (Repeats, not total passes, so "repeat twice" is `2` and the no-op is `0`.) */
|
|
40
14
|
count: number | null;
|
|
41
15
|
}
|
|
42
16
|
/** Total passes: repeats plus the first one, or `Infinity` for an unlimited loop. */
|
|
43
17
|
export declare function loopPasses(loop: LoopSpec): number;
|
|
44
18
|
/** Whether a loop changes anything: an unlimited one always does, a counted one only past zero. */
|
|
45
19
|
export declare function loopRepeats(loop: LoopSpec | undefined): loop is LoopSpec;
|
|
46
|
-
/**
|
|
47
|
-
* Seconds a looped command occupies.
|
|
48
|
-
*
|
|
49
|
-
* `fill` is what an unlimited loop is given to cover — the clip's remaining time,
|
|
50
|
-
* where a timeline places one. An unlimited loop does not *define* a length the
|
|
51
|
-
* way a counted one does: a background that turns forever should fill the scene
|
|
52
|
-
* it is in, not stretch it, so `documentDuration` counts one pass of it and this
|
|
53
|
-
* stretches it to whatever that came to.
|
|
54
|
-
*/
|
|
20
|
+
/** Seconds a looped command occupies. `fill` is what an unlimited loop covers (the clip's remaining time): it does not *define* a length, so `documentDuration` counts one pass and this stretches it. */
|
|
55
21
|
export declare function loopSpan(loop: LoopSpec, duration: number, fill?: number): number;
|
|
56
|
-
/**
|
|
57
|
-
* Where in one pass `elapsed` lands, as normalized time for the inner command.
|
|
58
|
-
*
|
|
59
|
-
* Past the last pass of a counted loop it holds at that pass's end rather than
|
|
60
|
-
* wrapping to the start — the same rule a finished command follows everywhere
|
|
61
|
-
* else, and what keeps the value a loop leaves behind the value the next command
|
|
62
|
-
* tweens from.
|
|
63
|
-
*/
|
|
22
|
+
/** Where in one pass `elapsed` lands, as normalized time for the inner command. Past the last pass of a counted loop it holds at that pass's end, so the value a loop leaves is the value the next command tweens from. */
|
|
64
23
|
export declare function loopPhase(loop: LoopSpec, elapsed: number, duration: number): number;
|
|
65
24
|
//# sourceMappingURL=loop.d.ts.map
|
package/dist/tween/loop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,2IAA2I;AAC3I,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/D,iEAAiE;AACjE,MAAM,WAAW,QAAQ;IACrB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,qNAAqN;IACrN,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,qFAAqF;AACrF,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,IAAI,QAAQ,CAExE;AAED,0MAA0M;AAC1M,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,SAAW,GAAG,MAAM,CAIlF;AAED,2NAA2N;AAC3N,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAcnF"}
|
package/dist/tween/loop.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Repetition
|
|
3
|
-
* goes
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `duration` — it says when the command is running, never what it does. That is
|
|
7
|
-
* why it lives out here rather than in any one command's args: the wrapper goes
|
|
8
|
-
* *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom
|
|
9
|
-
* `command()` nobody has written yet all loop by the same code, with nothing to
|
|
10
|
-
* forward and nothing to forget.
|
|
11
|
-
*
|
|
12
|
-
* And it stays seekable. A looped command is still a pure function of its own
|
|
13
|
-
* normalized time — `at(t)` maps `t` onto a pass and asks the inner command for
|
|
14
|
-
* that pass's frame — so scrubbing into the fourth repetition costs the same as
|
|
15
|
-
* scrubbing into the first, which is the whole reason commands are values here.
|
|
2
|
+
* Repetition as data: how many times a command runs and which way each pass goes. A loop is a **placement** property
|
|
3
|
+
* like `at` and `duration` (when it runs, never what it does), so the wrapper goes around a built `Command` and `to`,
|
|
4
|
+
* `fillTo`, `countTo` and custom commands all loop by the same code. It stays seekable: `at(t)` maps `t` onto a pass
|
|
5
|
+
* and asks the inner command for that pass's frame, so scrubbing into the fourth repetition costs the same as the first.
|
|
16
6
|
*/
|
|
17
7
|
import { clamp01 } from "../util/clamp.js";
|
|
18
8
|
/** Total passes: repeats plus the first one, or `Infinity` for an unlimited loop. */
|
|
@@ -23,15 +13,7 @@ export function loopPasses(loop) {
|
|
|
23
13
|
export function loopRepeats(loop) {
|
|
24
14
|
return loop !== undefined && (loop.count === null || loop.count >= 1);
|
|
25
15
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Seconds a looped command occupies.
|
|
28
|
-
*
|
|
29
|
-
* `fill` is what an unlimited loop is given to cover — the clip's remaining time,
|
|
30
|
-
* where a timeline places one. An unlimited loop does not *define* a length the
|
|
31
|
-
* way a counted one does: a background that turns forever should fill the scene
|
|
32
|
-
* it is in, not stretch it, so `documentDuration` counts one pass of it and this
|
|
33
|
-
* stretches it to whatever that came to.
|
|
34
|
-
*/
|
|
16
|
+
/** Seconds a looped command occupies. `fill` is what an unlimited loop covers (the clip's remaining time): it does not *define* a length, so `documentDuration` counts one pass and this stretches it. */
|
|
35
17
|
export function loopSpan(loop, duration, fill = duration) {
|
|
36
18
|
if (duration <= 0)
|
|
37
19
|
return duration;
|
|
@@ -39,14 +21,7 @@ export function loopSpan(loop, duration, fill = duration) {
|
|
|
39
21
|
return Math.max(duration, fill);
|
|
40
22
|
return duration * loopPasses(loop);
|
|
41
23
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Where in one pass `elapsed` lands, as normalized time for the inner command.
|
|
44
|
-
*
|
|
45
|
-
* Past the last pass of a counted loop it holds at that pass's end rather than
|
|
46
|
-
* wrapping to the start — the same rule a finished command follows everywhere
|
|
47
|
-
* else, and what keeps the value a loop leaves behind the value the next command
|
|
48
|
-
* tweens from.
|
|
49
|
-
*/
|
|
24
|
+
/** Where in one pass `elapsed` lands, as normalized time for the inner command. Past the last pass of a counted loop it holds at that pass's end, so the value a loop leaves is the value the next command tweens from. */
|
|
50
25
|
export function loopPhase(loop, elapsed, duration) {
|
|
51
26
|
if (duration <= 0)
|
|
52
27
|
return 1;
|
package/dist/tween/loop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.js","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"loop.js","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC,qFAAqF;AACrF,MAAM,UAAU,UAAU,CAAC,IAAc;IACrC,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,WAAW,CAAC,IAA0B;IAClD,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,0MAA0M;AAC1M,MAAM,UAAU,QAAQ,CAAC,IAAc,EAAE,QAAgB,EAAE,IAAI,GAAG,QAAQ;IACtE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IACnC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,2NAA2N;AAC3N,MAAM,UAAU,SAAS,CAAC,IAAc,EAAE,OAAe,EAAE,QAAgB;IACvE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,4EAA4E;IAC5E,sEAAsE;IACtE,kCAAkC;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAClC,QAAQ,IAAI,CAAC,SAAS,IAAI,QAAQ,EAAE,CAAC;QACjC,KAAK,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,KAAK,WAAW,CAAC,CAAC,OAAO,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;AACL,CAAC","sourcesContent":["/**\n * Repetition as data: how many times a command runs and which way each pass goes. A loop is a **placement** property\n * like `at` and `duration` (when it runs, never what it does), so the wrapper goes around a built `Command` and `to`,\n * `fillTo`, `countTo` and custom commands all loop by the same code. It stays seekable: `at(t)` maps `t` onto a pass\n * and asks the inner command for that pass's frame, so scrubbing into the fourth repetition costs the same as the first.\n */\n\nimport { clamp01 } from \"@/util/clamp\";\n\n/** Which way a pass runs. `alternate` makes a bounce (out and back) one command with two passes, not two commands kept in step by hand. */\nexport type LoopDirection = \"normal\" | \"reverse\" | \"alternate\";\n\n/** How a command repeats. Absent on a command is \"runs once\". */\nexport interface LoopSpec {\n /** Absent is `\"normal\"`. */\n direction?: LoopDirection;\n /** Repeats **after** the first pass: `0` is no loop, `3` plays four passes, `null` repeats for as long as there is clip left to fill. (Repeats, not total passes, so \"repeat twice\" is `2` and the no-op is `0`.) */\n count: number | null;\n}\n\n/** Total passes: repeats plus the first one, or `Infinity` for an unlimited loop. */\nexport function loopPasses(loop: LoopSpec): number {\n return loop.count === null ? Infinity : Math.max(0, Math.floor(loop.count)) + 1;\n}\n\n/** Whether a loop changes anything: an unlimited one always does, a counted one only past zero. */\nexport function loopRepeats(loop: LoopSpec | undefined): loop is LoopSpec {\n return loop !== undefined && (loop.count === null || loop.count >= 1);\n}\n\n/** Seconds a looped command occupies. `fill` is what an unlimited loop covers (the clip's remaining time): it does not *define* a length, so `documentDuration` counts one pass and this stretches it. */\nexport function loopSpan(loop: LoopSpec, duration: number, fill = duration): number {\n if (duration <= 0) return duration;\n if (loop.count === null) return Math.max(duration, fill);\n return duration * loopPasses(loop);\n}\n\n/** Where in one pass `elapsed` lands, as normalized time for the inner command. Past the last pass of a counted loop it holds at that pass's end, so the value a loop leaves is the value the next command tweens from. */\nexport function loopPhase(loop: LoopSpec, elapsed: number, duration: number): number {\n if (duration <= 0) return 1;\n const passes = loopPasses(loop);\n const capped = Math.min(Math.max(elapsed, 0) / duration, passes);\n // `passes - 1` holds the final pass at its end instead of rolling over to a\n // pass that does not exist. `Infinity - 1` is still `Infinity`, so an\n // unlimited loop is never capped.\n const index = Math.min(Math.floor(capped), passes - 1);\n const t = clamp01(capped - index);\n switch (loop.direction ?? \"normal\") {\n case \"reverse\": return 1 - t;\n case \"alternate\": return index % 2 === 0 ? t : 1 - t;\n default: return t;\n }\n}\n"]}
|
package/dist/tween/prepare.d.ts
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
import type { PropSlot } from "../props/slot.js";
|
|
2
|
-
/**
|
|
3
|
-
* Snapshots the current numeric property values on `target` for the keys
|
|
4
|
-
* present in `to`, then returns a lerp callback that writes interpolated values
|
|
5
|
-
* back each frame.
|
|
6
|
-
*
|
|
7
|
-
* The snapshot is taken at call time, so invoke this immediately before the
|
|
8
|
-
* animation starts (not lazily) to capture the correct `from` state.
|
|
9
|
-
*
|
|
10
|
-
* @param target - The object whose properties will be animated.
|
|
11
|
-
* @param to - Desired end values keyed by property name. Keys with
|
|
12
|
-
* `undefined` values are ignored.
|
|
13
|
-
* @returns A function `(t: number) => void` that writes `lerp(from, to, t)`
|
|
14
|
-
* for each key. `t` must already be eased by the caller.
|
|
15
|
-
*/
|
|
2
|
+
/** Snapshots the numeric property values on `target` for the keys in `to` and returns a lerp callback writing interpolated values back each frame. The snapshot is taken at call time, so call it immediately before the animation starts. Keys with `undefined` are ignored; `t` must already be eased by the caller. */
|
|
16
3
|
/** @internal */
|
|
17
4
|
export declare function prepareNumericTween<T extends object>(target: T, to: Partial<Record<keyof T, number>>): (t: number) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Like {@link prepareNumericTween}, but bypasses property setters and writes
|
|
20
|
-
* directly to the backing {@link PropSlot}s.
|
|
21
|
-
*
|
|
22
|
-
* Skipping the setter avoids the mapper-lookup and `_writeProp` indirection on
|
|
23
|
-
* every frame step. Only valid for numeric properties whose `end` is already in
|
|
24
|
-
* stored space — the caller is responsible for resolving the slots, mapping the
|
|
25
|
-
* destination and capturing the `from`/`end` values before calling this.
|
|
26
|
-
*
|
|
27
|
-
* - `cells[i]` — the slot for the i-th animated property.
|
|
28
|
-
* - `from[i]` — start value for that property.
|
|
29
|
-
* - `end[i]` — end value for that property.
|
|
30
|
-
*
|
|
31
|
-
* The arrays are captured by the returned closure and reused each step, so the
|
|
32
|
-
* per-frame cost is one `slot.set(number)` per property with no allocation.
|
|
33
|
-
*/
|
|
5
|
+
/** Like {@link prepareNumericTween}, but writes directly to the backing {@link PropSlot}s, skipping the mapper lookup and `_writeProp` indirection per step. Only valid for numeric props whose `end` is already in stored space: the caller resolves slots, maps the destination and captures `from`/`end` (`cells[i]`, `from[i]`, `end[i]`). The arrays are reused each step, so the cost is one `slot.set(number)` per property with no allocation. */
|
|
34
6
|
/** @internal */
|
|
35
7
|
export declare function prepareNumericCellTween(cells: PropSlot<number>[], from: number[], end: number[]): (t: number) => void;
|
|
36
8
|
//# sourceMappingURL=prepare.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/tween/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/tween/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,0TAA0T;AAC1T,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAChD,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACrC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAarB;AAED,0bAA0b;AAC1b,gBAAgB;AAChB,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EACzB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EAAE,GACd,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAMrB"}
|
package/dist/tween/prepare.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Snapshots the current numeric property values on `target` for the keys
|
|
3
|
-
* present in `to`, then returns a lerp callback that writes interpolated values
|
|
4
|
-
* back each frame.
|
|
5
|
-
*
|
|
6
|
-
* The snapshot is taken at call time, so invoke this immediately before the
|
|
7
|
-
* animation starts (not lazily) to capture the correct `from` state.
|
|
8
|
-
*
|
|
9
|
-
* @param target - The object whose properties will be animated.
|
|
10
|
-
* @param to - Desired end values keyed by property name. Keys with
|
|
11
|
-
* `undefined` values are ignored.
|
|
12
|
-
* @returns A function `(t: number) => void` that writes `lerp(from, to, t)`
|
|
13
|
-
* for each key. `t` must already be eased by the caller.
|
|
14
|
-
*/
|
|
1
|
+
/** Snapshots the numeric property values on `target` for the keys in `to` and returns a lerp callback writing interpolated values back each frame. The snapshot is taken at call time, so call it immediately before the animation starts. Keys with `undefined` are ignored; `t` must already be eased by the caller. */
|
|
15
2
|
/** @internal */
|
|
16
3
|
export function prepareNumericTween(target, to) {
|
|
17
4
|
const keys = Object.keys(to).filter((k) => to[k] !== undefined);
|
|
@@ -27,22 +14,7 @@ export function prepareNumericTween(target, to) {
|
|
|
27
14
|
}
|
|
28
15
|
};
|
|
29
16
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Like {@link prepareNumericTween}, but bypasses property setters and writes
|
|
32
|
-
* directly to the backing {@link PropSlot}s.
|
|
33
|
-
*
|
|
34
|
-
* Skipping the setter avoids the mapper-lookup and `_writeProp` indirection on
|
|
35
|
-
* every frame step. Only valid for numeric properties whose `end` is already in
|
|
36
|
-
* stored space — the caller is responsible for resolving the slots, mapping the
|
|
37
|
-
* destination and capturing the `from`/`end` values before calling this.
|
|
38
|
-
*
|
|
39
|
-
* - `cells[i]` — the slot for the i-th animated property.
|
|
40
|
-
* - `from[i]` — start value for that property.
|
|
41
|
-
* - `end[i]` — end value for that property.
|
|
42
|
-
*
|
|
43
|
-
* The arrays are captured by the returned closure and reused each step, so the
|
|
44
|
-
* per-frame cost is one `slot.set(number)` per property with no allocation.
|
|
45
|
-
*/
|
|
17
|
+
/** Like {@link prepareNumericTween}, but writes directly to the backing {@link PropSlot}s, skipping the mapper lookup and `_writeProp` indirection per step. Only valid for numeric props whose `end` is already in stored space: the caller resolves slots, maps the destination and captures `from`/`end` (`cells[i]`, `from[i]`, `end[i]`). The arrays are reused each step, so the cost is one `slot.set(number)` per property with no allocation. */
|
|
46
18
|
/** @internal */
|
|
47
19
|
export function prepareNumericCellTween(cells, from, end) {
|
|
48
20
|
return (t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../src/tween/prepare.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../src/tween/prepare.ts"],"names":[],"mappings":"AAEA,0TAA0T;AAC1T,gBAAgB;AAChB,MAAM,UAAU,mBAAmB,CAC/B,MAAS,EACT,EAAoC;IAEpC,MAAM,IAAI,GAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IACjF,MAAM,IAAI,GAAG,IAAI,KAAK,CAAS,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAI,KAAK,CAAS,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,CAAC,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAW,CAAC;QAC7C,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAW,CAAC;IACnC,CAAC;IACD,OAAO,CAAC,CAAS,EAAE,EAAE;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,MAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAChE,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AAED,0bAA0b;AAC1b,gBAAgB;AAChB,MAAM,UAAU,uBAAuB,CACnC,KAAyB,EACzB,IAAc,EACd,GAAa;IAEb,OAAO,CAAC,CAAS,EAAE,EAAE;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,CAAC;IACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import type { PropSlot } from \"@/props/slot\";\n\n/** Snapshots the numeric property values on `target` for the keys in `to` and returns a lerp callback writing interpolated values back each frame. The snapshot is taken at call time, so call it immediately before the animation starts. Keys with `undefined` are ignored; `t` must already be eased by the caller. */\n/** @internal */\nexport function prepareNumericTween<T extends object>(\n target: T,\n to: Partial<Record<keyof T, number>>,\n): (t: number) => void {\n const keys = (Object.keys(to) as (keyof T)[]).filter((k) => to[k] !== undefined);\n const from = new Array<number>(keys.length);\n const end = new Array<number>(keys.length);\n for (let i = 0; i < keys.length; i++) {\n from[i] = (target as any)[keys[i]] as number;\n end[i] = to[keys[i]] as number;\n }\n return (t: number) => {\n for (let i = 0; i < keys.length; i++) {\n (target as any)[keys[i]] = from[i] + (end[i] - from[i]) * t;\n }\n };\n}\n\n/** Like {@link prepareNumericTween}, but writes directly to the backing {@link PropSlot}s, skipping the mapper lookup and `_writeProp` indirection per step. Only valid for numeric props whose `end` is already in stored space: the caller resolves slots, maps the destination and captures `from`/`end` (`cells[i]`, `from[i]`, `end[i]`). The arrays are reused each step, so the cost is one `slot.set(number)` per property with no allocation. */\n/** @internal */\nexport function prepareNumericCellTween(\n cells: PropSlot<number>[],\n from: number[],\n end: number[],\n): (t: number) => void {\n return (t: number) => {\n for (let i = 0; i < cells.length; i++) {\n cells[i].set(from[i] + (end[i] - from[i]) * t);\n }\n };\n}\n"]}
|
package/dist/tween/stepper.d.ts
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A flat animation driver. `advance(dt)` moves the animation forward by `dt`
|
|
3
|
-
* seconds and returns `true` once it has completed (and applied its final
|
|
4
|
-
* value). It must be primed at t=0 before the first `advance` so the starting
|
|
5
|
-
* frame is correct — callers apply the initial value via `seek(0)`.
|
|
6
|
-
*
|
|
7
|
-
* `seek(elapsed)` is the absolute-time half, and is what a {@link Command}'s
|
|
8
|
-
* `at` is built on: a stepper can be asked for any time, in any order, which is
|
|
9
|
-
* what lets a timeline evaluate a frame without having played the ones before
|
|
10
|
-
* it.
|
|
11
|
-
*/
|
|
1
|
+
/** A flat animation driver. `advance(dt)` moves forward `dt` seconds and returns `true` once complete (final value applied); prime it at t=0 via `seek(0)` before the first `advance`. `seek(elapsed)` is the absolute-time half a {@link Command}'s `at` is built on: any time, in any order, so a timeline can evaluate a frame without playing the ones before it. */
|
|
12
2
|
/** @internal */
|
|
13
3
|
export interface TweenStepper {
|
|
14
|
-
/**
|
|
15
|
-
* Jump to the value corresponding to `elapsed` seconds from the start.
|
|
16
|
-
* Call with `0` to prime the stepper before the first {@link advance}.
|
|
17
|
-
*/
|
|
4
|
+
/** Jumps to the value at `elapsed` seconds; `0` primes the stepper before the first {@link advance}. */
|
|
18
5
|
seek(elapsed: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Advance the animation by `dt` seconds.
|
|
21
|
-
* @returns `true` when the animation has finished and its final value has
|
|
22
|
-
* been applied; `false` if it is still running.
|
|
23
|
-
*/
|
|
6
|
+
/** Advances by `dt` seconds; returns `true` when finished and the final value is applied. */
|
|
24
7
|
advance(dt: number): boolean;
|
|
25
8
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Implemented by anything that can produce a {@link TweenStepper} — a
|
|
28
|
-
* {@link Command}, and anything a host drives directly.
|
|
29
|
-
*/
|
|
9
|
+
/** Implemented by anything that can produce a {@link TweenStepper}: a {@link Command}, or anything a host drives directly. */
|
|
30
10
|
export interface Steppable {
|
|
31
|
-
/** Return a fresh stepper for a single playthrough of this animation. */
|
|
32
11
|
_stepper(): TweenStepper;
|
|
33
12
|
}
|
|
34
13
|
export declare function isSteppable(x: unknown): x is Steppable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/tween/stepper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/tween/stepper.ts"],"names":[],"mappings":"AAAA,yWAAyW;AACzW,gBAAgB;AAChB,MAAM,WAAW,YAAY;IACzB,wGAAwG;IACxG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,6FAA6F;IAC7F,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,8HAA8H;AAC9H,MAAM,WAAW,SAAS;IACtB,QAAQ,IAAI,YAAY,CAAC;CAC5B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAEtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../src/tween/stepper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../src/tween/stepper.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,WAAW,CAAC,CAAU;IAClC,OAAO,OAAQ,CAAe,EAAE,QAAQ,KAAK,UAAU,CAAC;AAC5D,CAAC","sourcesContent":["/** A flat animation driver. `advance(dt)` moves forward `dt` seconds and returns `true` once complete (final value applied); prime it at t=0 via `seek(0)` before the first `advance`. `seek(elapsed)` is the absolute-time half a {@link Command}'s `at` is built on: any time, in any order, so a timeline can evaluate a frame without playing the ones before it. */\n/** @internal */\nexport interface TweenStepper {\n /** Jumps to the value at `elapsed` seconds; `0` primes the stepper before the first {@link advance}. */\n seek(elapsed: number): void;\n /** Advances by `dt` seconds; returns `true` when finished and the final value is applied. */\n advance(dt: number): boolean;\n}\n\n/** Implemented by anything that can produce a {@link TweenStepper}: a {@link Command}, or anything a host drives directly. */\nexport interface Steppable {\n _stepper(): TweenStepper;\n}\n\nexport function isSteppable(x: unknown): x is Steppable {\n return typeof (x as Steppable)?._stepper === \"function\";\n}\n"]}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { EasingFunction } from "../tween/ease/type.js";
|
|
2
2
|
import { TweenStepper } from "../tween/stepper.js";
|
|
3
3
|
import { Command } from "./command.js";
|
|
4
|
-
/**
|
|
5
|
-
* Interface a node (or other host) implements to be driven by {@link toCommand}.
|
|
6
|
-
*
|
|
7
|
-
* `_prepareStep` resolves one tween into a flat, mutation-driving
|
|
8
|
-
* {@link TweenStepper} — the same primitive both the flat `parallel` fast path
|
|
9
|
-
* and the command's own evaluation are built from.
|
|
10
|
-
*/
|
|
4
|
+
/** Implemented by a node (or other host) to be driven by {@link toCommand}: `_prepareStep` resolves one tween into a flat, mutation-driving {@link TweenStepper}, the primitive both the flat `parallel` fast path and the command's evaluation are built from. */
|
|
11
5
|
export interface AnimationTarget<P> {
|
|
12
6
|
_prepareStep(props: Partial<P>, duration: number, easing?: EasingFunction): TweenStepper;
|
|
13
7
|
}
|
|
14
|
-
/** Build the {@link Command} `node.to(...)` returns. */
|
|
15
8
|
export declare function toCommand<P>(target: AnimationTarget<P>, props: Partial<P>, duration: number, easing?: EasingFunction): Command<P>;
|
|
16
9
|
//# sourceMappingURL=to-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-command.d.ts","sourceRoot":"","sources":["../../src/tween/to-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAa,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"to-command.d.ts","sourceRoot":"","sources":["../../src/tween/to-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAa,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,mQAAmQ;AACnQ,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,YAAY,CAAC;CAC5F;AA6BD,wBAAgB,SAAS,CAAC,CAAC,EACvB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
package/dist/tween/to-command.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import { clamp01 } from "../util/clamp.js";
|
|
2
|
-
/**
|
|
3
|
-
* The {@link Command} `node.to(...)` returns: one tween on one target, and
|
|
4
|
-
* nothing else.
|
|
5
|
-
*
|
|
6
|
-
* **Single, not chainable.** `to()` used to return a builder whose own `to()`
|
|
7
|
-
* appended another step and returned `this`, so `node.to(a, 1).to(b, 1)` read as
|
|
8
|
-
* a sequence. Sequencing is now a property of the timeline — a command carries
|
|
9
|
-
* its own `at`, so "after this one" is `at + duration` — and one command shape
|
|
10
|
-
* means a host reading a `Command` off a node knows exactly what it holds.
|
|
11
|
-
*
|
|
12
|
-
* Implements {@link Command} (a host can ask what it looks like at a time) and
|
|
13
|
-
* {@link Steppable} (the flat driver).
|
|
14
|
-
*
|
|
15
|
-
* `at` and `_stepper` each keep their **own** prepared stepper: preparing is
|
|
16
|
-
* what snapshots the tween's `from` (it reads the live target), so two drivers
|
|
17
|
-
* must never fight over one mutable stepper.
|
|
18
|
-
*/
|
|
2
|
+
/** The {@link Command} `node.to(...)` returns: one tween on one target, **single, not chainable** (sequencing is the timeline's: a command carries its own `at`). Implements {@link Command} and {@link Steppable} (the flat driver). `at` and `_stepper` each keep their **own** prepared stepper: preparing snapshots the tween's `from` from the live target, so two drivers must never fight over one mutable stepper. */
|
|
19
3
|
class ToCommand {
|
|
20
4
|
target;
|
|
21
5
|
props;
|
|
@@ -28,13 +12,7 @@ class ToCommand {
|
|
|
28
12
|
this.duration = duration;
|
|
29
13
|
this.easing = easing;
|
|
30
14
|
}
|
|
31
|
-
/**
|
|
32
|
-
* The props this command writes at normalized `t`. Applied as a side effect
|
|
33
|
-
* (direct cell writes through the prepared stepper, exactly like
|
|
34
|
-
* `driveCommand`) rather than returned — a tween may carry a custom tween
|
|
35
|
-
* function or a mapped prop, and only the target's own `_prepareStep` knows
|
|
36
|
-
* how to apply those correctly.
|
|
37
|
-
*/
|
|
15
|
+
/** The props this command writes at normalized `t`, applied as a side effect (direct cell writes through the prepared stepper, like `driveCommand`) rather than returned: only the target's `_prepareStep` knows how to apply a custom tween function or mapped prop correctly. */
|
|
38
16
|
at(t) {
|
|
39
17
|
if (!this.atPrepared)
|
|
40
18
|
this.atPrepared = this.prepare();
|
|
@@ -48,7 +26,6 @@ class ToCommand {
|
|
|
48
26
|
return this.target._prepareStep(this.props, this.duration, this.easing);
|
|
49
27
|
}
|
|
50
28
|
}
|
|
51
|
-
/** Build the {@link Command} `node.to(...)` returns. */
|
|
52
29
|
export function toCommand(target, props, duration, easing) {
|
|
53
30
|
return new ToCommand(target, props, duration, easing);
|
|
54
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-command.js","sourceRoot":"","sources":["../../src/tween/to-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"to-command.js","sourceRoot":"","sources":["../../src/tween/to-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAUvC,8ZAA8Z;AAC9Z,MAAM,SAAS;IAIU;IACA;IACR;IACQ;IANb,UAAU,GAAwB,IAAI,CAAC;IAE/C,YACqB,MAA0B,EAC1B,KAAiB,EACzB,QAAgB,EACR,MAAuB;QAHvB,WAAM,GAAN,MAAM,CAAoB;QAC1B,UAAK,GAAL,KAAK,CAAY;QACzB,aAAQ,GAAR,QAAQ,CAAQ;QACR,WAAM,GAAN,MAAM,CAAiB;IACxC,CAAC;IAEL,mRAAmR;IACnR,EAAE,CAAC,CAAS;QACR,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACvD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,OAAO,EAAE,CAAC;IACd,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAEO,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACJ;AAED,MAAM,UAAU,SAAS,CACrB,MAA0B,EAC1B,KAAiB,EACjB,QAAgB,EAChB,MAAuB;IAEvB,OAAO,IAAI,SAAS,CAAI,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { EasingFunction } from \"@/tween/ease/type\";\nimport { Steppable, TweenStepper } from \"@/tween/stepper\";\nimport { Command } from \"./command\";\n\n/** Implemented by a node (or other host) to be driven by {@link toCommand}: `_prepareStep` resolves one tween into a flat, mutation-driving {@link TweenStepper}, the primitive both the flat `parallel` fast path and the command's evaluation are built from. */\nexport interface AnimationTarget<P> {\n _prepareStep(props: Partial<P>, duration: number, easing?: EasingFunction): TweenStepper;\n}\n\n/** The {@link Command} `node.to(...)` returns: one tween on one target, **single, not chainable** (sequencing is the timeline's: a command carries its own `at`). Implements {@link Command} and {@link Steppable} (the flat driver). `at` and `_stepper` each keep their **own** prepared stepper: preparing snapshots the tween's `from` from the live target, so two drivers must never fight over one mutable stepper. */\nclass ToCommand<P> implements Command<P>, Steppable {\n private atPrepared: TweenStepper | null = null;\n\n constructor(\n private readonly target: AnimationTarget<P>,\n private readonly props: Partial<P>,\n readonly duration: number,\n private readonly easing?: EasingFunction,\n ) { }\n\n /** The props this command writes at normalized `t`, applied as a side effect (direct cell writes through the prepared stepper, like `driveCommand`) rather than returned: only the target's `_prepareStep` knows how to apply a custom tween function or mapped prop correctly. */\n at(t: number): Partial<P> {\n if (!this.atPrepared) this.atPrepared = this.prepare();\n this.atPrepared.seek(clamp01(t) * this.duration);\n return {};\n }\n\n _stepper(): TweenStepper {\n return this.prepare();\n }\n\n private prepare(): TweenStepper {\n return this.target._prepareStep(this.props, this.duration, this.easing);\n }\n}\n\nexport function toCommand<P>(\n target: AnimationTarget<P>,\n props: Partial<P>,\n duration: number,\n easing?: EasingFunction,\n): Command<P> {\n return new ToCommand<P>(target, props, duration, easing);\n}\n"]}
|
package/dist/util/context.d.ts
CHANGED
|
@@ -1,49 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed context tokens for passing inherited data down the node tree —
|
|
3
|
-
* analogous to React's `createContext` / `useContext`, but resolved over the
|
|
4
|
-
* scene-node tree rather than a render tree.
|
|
5
|
-
*
|
|
6
|
-
* A {@link Context} is an opaque token carrying a phantom type `T` and a
|
|
7
|
-
* default value. Providers attach a value for a token to the {@link ContextMap}
|
|
8
|
-
* pushed to their descendants; a descendant reads the nearest ancestor's value
|
|
9
|
-
* (or the token's default) via `node.useContext(token)`.
|
|
10
|
-
*
|
|
11
|
-
* Mirrors the {@link createRef} factory style: a small typed helper rather than
|
|
12
|
-
* a class the author has to instantiate.
|
|
13
|
-
*/
|
|
1
|
+
/** Typed context tokens for passing inherited data down the node tree, like React's `createContext` / `useContext` but resolved over the scene-node tree. A {@link Context} is an opaque token with a phantom type `T` and a default; providers attach a value to the {@link ContextMap} pushed to descendants, and `node.useContext(token)` reads the nearest ancestor's value or the default. */
|
|
14
2
|
export interface Context<T> {
|
|
15
3
|
/** Identity used as the map key. Unique per `createContext` call. */
|
|
16
4
|
readonly id: symbol;
|
|
17
5
|
/** Value returned by `useContext` when no ancestor provides this token. */
|
|
18
6
|
readonly defaultValue: T;
|
|
19
|
-
/** Optional label, surfaced on the symbol for debugging. */
|
|
20
7
|
readonly name?: string;
|
|
21
8
|
}
|
|
22
9
|
/**
|
|
23
|
-
* Create a typed context token.
|
|
24
|
-
*
|
|
25
10
|
* @example
|
|
26
|
-
* ```ts
|
|
27
11
|
* const Money = createContext<number>(0, "money");
|
|
28
|
-
* // provide:
|
|
29
|
-
* // consume:
|
|
30
|
-
* ```
|
|
12
|
+
* // provide: <Provider context={Money} value={500}>…</Provider>
|
|
13
|
+
* // consume: init() { const m = this.useContext(Money); } // m: number
|
|
31
14
|
*/
|
|
32
15
|
export declare function createContext<T>(defaultValue: T, name?: string): Context<T>;
|
|
33
|
-
/**
|
|
34
|
-
* An immutable, layered token→value map carried down the node tree. Each
|
|
35
|
-
* provider derives a child map from its parent's via {@link with}, overriding a
|
|
36
|
-
* single token — so a deeper provider naturally shadows a shallower one
|
|
37
|
-
* (nearest-ancestor-wins) without any stack bookkeeping.
|
|
38
|
-
*/
|
|
16
|
+
/** An immutable, layered token→value map carried down the tree. Each provider derives a child map via {@link with}, so a deeper provider shadows a shallower one (nearest-ancestor-wins) with no stack bookkeeping. */
|
|
39
17
|
export declare class ContextMap {
|
|
40
18
|
private readonly entries;
|
|
41
19
|
private constructor();
|
|
42
|
-
/** The empty map — every token resolves to its own default. */
|
|
43
20
|
static readonly EMPTY: ContextMap;
|
|
44
|
-
/** Return a new map identical to this one but with `ctx` set to `value`. */
|
|
45
21
|
with<T>(ctx: Context<T>, value: T): ContextMap;
|
|
46
|
-
/** Resolve `ctx`'s value, falling back to its default when unset. */
|
|
47
22
|
get<T>(ctx: Context<T>): T;
|
|
48
23
|
}
|
|
49
24
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/util/context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/util/context.ts"],"names":[],"mappings":"AAAA,mYAAmY;AACnY,MAAM,WAAW,OAAO,CAAC,CAAC;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAE3E;AAED,uNAAuN;AACvN,qBAAa,UAAU;IACC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAA5C,OAAO;IAEP,MAAM,CAAC,QAAQ,CAAC,KAAK,aAA6B;IAElD,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU;IAM9C,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;CAG7B"}
|
package/dist/util/context.js
CHANGED
|
@@ -1,36 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Create a typed context token.
|
|
3
|
-
*
|
|
4
2
|
* @example
|
|
5
|
-
* ```ts
|
|
6
3
|
* const Money = createContext<number>(0, "money");
|
|
7
|
-
* // provide:
|
|
8
|
-
* // consume:
|
|
9
|
-
* ```
|
|
4
|
+
* // provide: <Provider context={Money} value={500}>…</Provider>
|
|
5
|
+
* // consume: init() { const m = this.useContext(Money); } // m: number
|
|
10
6
|
*/
|
|
11
7
|
export function createContext(defaultValue, name) {
|
|
12
8
|
return { id: Symbol(name ?? "context"), defaultValue, name };
|
|
13
9
|
}
|
|
14
|
-
/**
|
|
15
|
-
* An immutable, layered token→value map carried down the node tree. Each
|
|
16
|
-
* provider derives a child map from its parent's via {@link with}, overriding a
|
|
17
|
-
* single token — so a deeper provider naturally shadows a shallower one
|
|
18
|
-
* (nearest-ancestor-wins) without any stack bookkeeping.
|
|
19
|
-
*/
|
|
10
|
+
/** An immutable, layered token→value map carried down the tree. Each provider derives a child map via {@link with}, so a deeper provider shadows a shallower one (nearest-ancestor-wins) with no stack bookkeeping. */
|
|
20
11
|
export class ContextMap {
|
|
21
12
|
entries;
|
|
22
13
|
constructor(entries) {
|
|
23
14
|
this.entries = entries;
|
|
24
15
|
}
|
|
25
|
-
/** The empty map — every token resolves to its own default. */
|
|
26
16
|
static EMPTY = new ContextMap(new Map());
|
|
27
|
-
/** Return a new map identical to this one but with `ctx` set to `value`. */
|
|
28
17
|
with(ctx, value) {
|
|
29
18
|
const next = new Map(this.entries);
|
|
30
19
|
next.set(ctx.id, value);
|
|
31
20
|
return new ContextMap(next);
|
|
32
21
|
}
|
|
33
|
-
/** Resolve `ctx`'s value, falling back to its default when unset. */
|
|
34
22
|
get(ctx) {
|
|
35
23
|
return this.entries.has(ctx.id) ? this.entries.get(ctx.id) : ctx.defaultValue;
|
|
36
24
|
}
|
package/dist/util/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/util/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/util/context.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAI,YAAe,EAAE,IAAa;IAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AACjE,CAAC;AAED,uNAAuN;AACvN,MAAM,OAAO,UAAU;IACkB;IAArC,YAAqC,OAAqC;QAArC,YAAO,GAAP,OAAO,CAA8B;IAAI,CAAC;IAE/E,MAAM,CAAU,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAElD,IAAI,CAAI,GAAe,EAAE,KAAQ;QAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACxB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,GAAG,CAAI,GAAe;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAO,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;IACzF,CAAC","sourcesContent":["/** Typed context tokens for passing inherited data down the node tree, like React's `createContext` / `useContext` but resolved over the scene-node tree. A {@link Context} is an opaque token with a phantom type `T` and a default; providers attach a value to the {@link ContextMap} pushed to descendants, and `node.useContext(token)` reads the nearest ancestor's value or the default. */\nexport interface Context<T> {\n /** Identity used as the map key. Unique per `createContext` call. */\n readonly id: symbol;\n /** Value returned by `useContext` when no ancestor provides this token. */\n readonly defaultValue: T;\n readonly name?: string;\n}\n\n/**\n * @example\n * const Money = createContext<number>(0, \"money\");\n * // provide: <Provider context={Money} value={500}>…</Provider>\n * // consume: init() { const m = this.useContext(Money); } // m: number\n */\nexport function createContext<T>(defaultValue: T, name?: string): Context<T> {\n return { id: Symbol(name ?? \"context\"), defaultValue, name };\n}\n\n/** An immutable, layered token→value map carried down the tree. Each provider derives a child map via {@link with}, so a deeper provider shadows a shallower one (nearest-ancestor-wins) with no stack bookkeeping. */\nexport class ContextMap {\n private constructor(private readonly entries: ReadonlyMap<symbol, unknown>) { }\n\n static readonly EMPTY = new ContextMap(new Map());\n\n with<T>(ctx: Context<T>, value: T): ContextMap {\n const next = new Map(this.entries);\n next.set(ctx.id, value);\n return new ContextMap(next);\n }\n\n get<T>(ctx: Context<T>): T {\n return this.entries.has(ctx.id) ? (this.entries.get(ctx.id) as T) : ctx.defaultValue;\n }\n}\n"]}
|
package/dist/util/csv.d.ts
CHANGED
|
@@ -5,38 +5,13 @@ export type DataRecord = Record<string, string | number | boolean>;
|
|
|
5
5
|
export interface ParseCSVOptions {
|
|
6
6
|
/** Field separator. Default: ','. */
|
|
7
7
|
delimiter?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Which columns to coerce to `number`. An explicit list forces just those
|
|
10
|
-
* columns; `false` disables coercion entirely (every cell stays a string).
|
|
11
|
-
* Default (omitted/`true`): auto-detect — a column becomes numeric only if
|
|
12
|
-
* every non-empty cell in it parses as a finite number, so a text column
|
|
13
|
-
* that happens to contain a numeric-looking value here and there is left
|
|
14
|
-
* alone rather than partially coerced.
|
|
15
|
-
*/
|
|
8
|
+
/** Columns to coerce to `number`: an explicit list forces just those, `false` disables coercion, and the default auto-detects (numeric only if every non-empty cell parses as a finite number, so a text column with a stray numeric-looking value isn't partially coerced). */
|
|
16
9
|
numeric?: string[] | boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Which columns to coerce to `boolean`, same shape/semantics as
|
|
19
|
-
* {@link numeric}. Default (omitted/`true`): auto-detect — a column
|
|
20
|
-
* becomes boolean only if every non-empty cell is exactly `"true"` or
|
|
21
|
-
* `"false"`. Never applied to a column already coerced to numeric.
|
|
22
|
-
*/
|
|
10
|
+
/** Columns to coerce to `boolean`, as {@link numeric}; auto-detect makes a column boolean only if every non-empty cell is exactly `"true"` or `"false"`. Never applied to a column already numeric. */
|
|
23
11
|
boolean?: string[] | boolean;
|
|
24
12
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Parse CSV text into an array of row records keyed by the header row.
|
|
27
|
-
* Handles quoted fields (embedded delimiters, newlines, and `""` escapes) and
|
|
28
|
-
* both CRLF/LF line endings. Synchronous and dependency-free, so it's safe to
|
|
29
|
-
* call at module-eval time on text pulled in via a `?raw` import.
|
|
30
|
-
*/
|
|
13
|
+
/** Parses CSV text into row records keyed by the header row. Handles quoted fields (embedded delimiters, newlines, `""` escapes) and CRLF/LF. Synchronous and dependency-free, so safe at module-eval time on `?raw` text. */
|
|
31
14
|
export declare function parseCSV(text: string, options?: ParseCSVOptions): DataRecord[];
|
|
32
|
-
/**
|
|
33
|
-
* `parseData` only ever runs as an inlined literal — the
|
|
34
|
-
* `@motionscript/vite-plugin` build-time macro replaces
|
|
35
|
-
* `parseData("file.csv")` call sites with the already-parsed rows before this
|
|
36
|
-
* body ever executes. This implementation exists purely so the call
|
|
37
|
-
* type-checks and so an unresolved call site (missing plugin, or a
|
|
38
|
-
* non-literal argument the macro couldn't statically inline) fails loudly
|
|
39
|
-
* instead of silently returning nothing.
|
|
40
|
-
*/
|
|
15
|
+
/** Only ever an inlined literal: the `@motionscript/vite-plugin` macro replaces `parseData("file.csv")` call sites with the parsed rows before this runs. This body exists so the call type-checks and an unresolved call site (no plugin, non-literal argument) fails loudly instead of returning nothing. */
|
|
41
16
|
export declare function parseData(file: string, _options?: ParseCSVOptions): DataRecord[];
|
|
42
17
|
//# sourceMappingURL=csv.d.ts.map
|
package/dist/util/csv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/util/csv.ts"],"names":[],"mappings":"AAAA;;wCAEwC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC5B,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB
|
|
1
|
+
{"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/util/csv.ts"],"names":[],"mappings":"AAAA;;wCAEwC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC5B,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gRAAgR;IAChR,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC7B,uMAAuM;IACvM,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC;AAED,8NAA8N;AAC9N,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,UAAU,EAAE,CAgClF;AAED,+SAA+S;AAC/S,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,UAAU,EAAE,CAOhF"}
|