@motionscript/core 0.1.0 → 0.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
- package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/style.d.ts +38 -0
- package/dist/components/factory/style.d.ts.map +1 -0
- package/dist/components/factory/style.js +104 -0
- package/dist/components/factory/style.js.map +1 -0
- package/dist/components/factory/types.d.ts +9 -0
- package/dist/components/factory/types.d.ts.map +1 -1
- package/dist/components/factory/types.js +11 -0
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -10,62 +10,30 @@ import type { MaskOptions } from "../attributes/mask/mask.js";
|
|
|
10
10
|
import type { BooleanOperation } from "../attributes/mask/boolean.js";
|
|
11
11
|
import type { NodeEffect } from "../attributes/shape/effects/union.js";
|
|
12
12
|
import type { Size2D } from "../attributes/layout/size.js";
|
|
13
|
-
/**
|
|
14
|
-
* Where an effect scope draws: `'foreground'` warps/filters the node's *own*
|
|
15
|
-
* content (its fill, stroke and children), `'backdrop'` warps/filters the canvas
|
|
16
|
-
* content already painted *beneath* the node (clipped to its silhouette). See
|
|
17
|
-
* {@link RenderContext2D.beginEffects}.
|
|
18
|
-
*/
|
|
13
|
+
/** Where an effect scope draws: `'foreground'` filters the node's own content, `'backdrop'` the canvas content already painted beneath it (clipped to its silhouette). See {@link RenderContext2D.beginEffects}. */
|
|
19
14
|
export type EffectTarget = "foreground" | "backdrop";
|
|
20
|
-
/**
|
|
21
|
-
* Pixels produced by {@link RenderContext2D.rasterize}: RGBA8888,
|
|
22
|
-
* unpremultiplied, top-down (canvas row order). `width`/`height` are **device**
|
|
23
|
-
* px, so they reflect the pixel ratio the renderer actually used rather than the
|
|
24
|
-
* logical size that was asked for.
|
|
25
|
-
*/
|
|
15
|
+
/** Pixels from {@link RenderContext2D.rasterize}: RGBA8888, unpremultiplied, top-down. `width`/`height` are device px (the pixel ratio actually used), not the logical size asked for. */
|
|
26
16
|
export interface RasterizedSurface {
|
|
27
17
|
pixels: Uint8Array;
|
|
28
18
|
width: number;
|
|
29
19
|
height: number;
|
|
30
20
|
}
|
|
31
|
-
/**
|
|
32
|
-
* A bounding box in the current node's local space (origin = the node's
|
|
33
|
-
* layout-cell centre, the same space shapes are drawn in). `left/top` use the
|
|
34
|
-
* canvas convention (y down).
|
|
35
|
-
*/
|
|
21
|
+
/** A box in the current node's local space (origin at the layout-cell centre); `left/top` are canvas y-down. */
|
|
36
22
|
export interface SpaceRect {
|
|
37
23
|
left: number;
|
|
38
24
|
top: number;
|
|
39
25
|
right: number;
|
|
40
26
|
bottom: number;
|
|
41
27
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Reference rects a fill can resolve against, supplied per-node at `begin()`.
|
|
44
|
-
* `local` is derived from the drawn shapes themselves and `global` (the
|
|
45
|
-
* viewport) is computed by the renderer from the surface size, so only the
|
|
46
|
-
* parent frame is passed here.
|
|
47
|
-
*/
|
|
28
|
+
/** Reference rects a fill resolves against, supplied per node at `begin()`. `local` comes from the drawn shapes and `global` from the renderer's surface size, so only the parent frame is passed. */
|
|
48
29
|
export interface SpaceRects {
|
|
49
30
|
/** The parent node's content rect, in this node's local space. */
|
|
50
31
|
parent?: SpaceRect;
|
|
51
32
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Per-node state supplied to {@link RenderContext2D.begin} for the duration of a
|
|
54
|
-
* node's draw scope. Carries the node identity and gradient-space `rects` plus
|
|
55
|
-
* the node's per-frame motion, sampled at render time. Motion-driven effects
|
|
56
|
-
* (e.g. motion blur) read the current node's `velocity` from this state instead
|
|
57
|
-
* of being authored with a fixed direction.
|
|
58
|
-
*
|
|
59
|
-
* Velocity fields are `0`/`{0,0}` when the motion is unknown — the first frame a
|
|
60
|
-
* node renders, or after a time discontinuity (scrub/seek) where no trustworthy
|
|
61
|
-
* delta exists.
|
|
62
|
-
*/
|
|
33
|
+
/** Per-node state for the duration of a node's draw scope: identity, gradient-space `rects` and per-frame motion, which motion-driven effects (motion blur) read instead of a fixed authored direction. Velocity fields are 0 when unknown: the first frame, or after a scrub/seek discontinuity. */
|
|
63
34
|
export interface NodeRenderState {
|
|
64
|
-
/** Stable node identifier. */
|
|
65
35
|
id: string;
|
|
66
|
-
/** Parent / viewport rects in this node's local space. */
|
|
67
36
|
rects: SpaceRects;
|
|
68
|
-
/** How long this node has existed, in seconds (`NodeTime.elapsed`). */
|
|
69
37
|
elapsed: number;
|
|
70
38
|
/** The frame delta, in seconds, used to derive displacement from velocity. */
|
|
71
39
|
dt: number;
|
|
@@ -81,170 +49,77 @@ export interface NodeRenderState {
|
|
|
81
49
|
scaleVelocity: number;
|
|
82
50
|
}
|
|
83
51
|
/**
|
|
84
|
-
* The drawing surface a `Node2D` paints into
|
|
85
|
-
* ask of a renderer, and nothing else.**
|
|
52
|
+
* The drawing surface a `Node2D` paints into: the whole of what a node may ask of a renderer.
|
|
86
53
|
*
|
|
87
|
-
* Shapes are
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* single surface and painted together:
|
|
54
|
+
* Shapes are built with a {@link Graphics2D} command list and submitted via {@link draw}; shapes chained on one
|
|
55
|
+
* `Graphics2D` before a paint call share a single surface. It extends {@link MeasureContext2D}, so a node
|
|
56
|
+
* measures and draws through one object.
|
|
91
57
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* operations: transforms, masks, clips, camera, boolean ops, effect scopes.
|
|
97
|
-
* `begin(state)` / `end()` bracket each node's draw call so the context can
|
|
98
|
-
* track which node is active.
|
|
99
|
-
*
|
|
100
|
-
* **An interface, with `CanvasRenderContext2D` as its one base class.** What a
|
|
101
|
-
* node calls and what a *host* calls are different lists: `execute`,
|
|
102
|
-
* `screenshot`, `unmount` and `dispose` drive a render pass and have no business
|
|
103
|
-
* being reachable from inside one. Splitting them is what keeps this surface
|
|
104
|
-
* the size it is. Every real backend still extends the class, which preserves
|
|
105
|
-
* the `draw` to `drawGraphics` invariant that gives them all one implementation
|
|
106
|
-
* of text-default resolution.
|
|
107
|
-
*
|
|
108
|
-
* `RenderContext3D` is its sibling, not its subclass: the two share no members,
|
|
109
|
-
* because a 3D scene is described with lights, a camera and meshes rather than
|
|
110
|
-
* with paths and paint.
|
|
58
|
+
* An interface so node-facing and host-facing lists stay apart: `execute`, `screenshot`, `unmount` and `dispose`
|
|
59
|
+
* drive a pass and mustn't be reachable from inside one. Every real backend still extends `CanvasRenderContext2D`,
|
|
60
|
+
* keeping the `draw` to `drawGraphics` invariant that gives them one text-default resolution.
|
|
61
|
+
* `RenderContext3D` is a sibling, not a subclass: they share no members.
|
|
111
62
|
*/
|
|
112
63
|
export interface RenderContext2D extends MeasureContext2D {
|
|
113
64
|
measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;
|
|
114
65
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* `
|
|
119
|
-
*
|
|
120
|
-
* `fontFamily` and an inner scope's `fontSize` both apply, and a key set by
|
|
121
|
-
* both takes the inner value. Values are resolved (a tweened `fontSize`
|
|
122
|
-
* arrives as this frame's number), not callbacks.
|
|
123
|
-
*
|
|
124
|
-
* Pass `null` to open a scope that inherits **nothing** — not the enclosing
|
|
125
|
-
* defaults and not the project's `theme.typography.default`. That is for a
|
|
126
|
-
* node whose text is its own vocabulary rather than the document's: `Code`
|
|
127
|
-
* does it so a scene-wide serif face doesn't reflow a monospaced code block.
|
|
128
|
-
*
|
|
129
|
-
* Always pair with `popTextStyle()` in a `finally`; the stack is shared with
|
|
130
|
-
* every sibling drawn afterwards.
|
|
66
|
+
* Sets text-style defaults until the matching {@link popTextStyle} (the drawn-graphics half of `<DefaultTextStyle>`).
|
|
67
|
+
* `style` is merged per key onto the defaults in effect, so nesting accumulates and the inner value wins; values
|
|
68
|
+
* are resolved, not callbacks. `null` opens a scope inheriting nothing, not even `theme.typography.default`
|
|
69
|
+
* (`Code` does this so a serif scene face doesn't reflow monospaced code). Pair with `popTextStyle()` in a
|
|
70
|
+
* `finally`: the stack is shared with every later sibling.
|
|
131
71
|
*/
|
|
132
72
|
pushTextStyle(style: TextStyle | null): void;
|
|
133
|
-
/** Close the innermost scope opened by {@link pushTextStyle}. */
|
|
134
73
|
popTextStyle(): void;
|
|
135
|
-
/**
|
|
136
|
-
* The text-style defaults in effect right now: the innermost
|
|
137
|
-
* {@link pushTextStyle} scope, or the project's `theme.typography.default`
|
|
138
|
-
* when no scope is open — the same preset a `Text` node falls back to, so a
|
|
139
|
-
* drawn label and a node label agree on the project's base typography.
|
|
140
|
-
*/
|
|
74
|
+
/** The defaults in effect: the innermost {@link pushTextStyle} scope, else the project's `theme.typography.default` (the same preset a `Text` node falls back to). */
|
|
141
75
|
readonly defaultTextStyle: TextStyle;
|
|
142
|
-
/**
|
|
143
|
-
* Replay a built `Graphics2D` against this context.
|
|
144
|
-
*
|
|
145
|
-
* Resolves the ambient text defaults onto the op list before handing it to
|
|
146
|
-
* the backend, which is what keeps the real renderer and the precomp asset
|
|
147
|
-
* walk agreeing on which font an under-specified `text` op shapes with: a
|
|
148
|
-
* family that one resolves and the other does not is a font that never loads
|
|
149
|
-
* and glyphs that never paint.
|
|
150
|
-
*/
|
|
76
|
+
/** Replays a built `Graphics2D`. Resolves ambient text defaults onto the op list first, so the real renderer and the precomp asset walk agree on which font an under-specified `text` op uses (a family only one resolves is a font that never loads). */
|
|
151
77
|
draw(graphics: Graphics2D): void;
|
|
152
78
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
79
|
+
* Lays `state` out as it would be drawn and reports where every character landed (see {@link TextBlockLayout}
|
|
80
|
+
* for the space and caret model). Glyph positions live in the backend's shaper, so a host's own caret and
|
|
81
|
+
* selection can't compute them; DOM approximations drift once font, line height or wrapping change. Takes the
|
|
82
|
+
* whole {@link TextState} because `'autofit'`, `wrap` and `textAlign` resolve in the backend and must match what is drawn.
|
|
155
83
|
*
|
|
156
|
-
*
|
|
157
|
-
* in the backend's shaper, so a host drawing its own caret and selection has
|
|
158
|
-
* no way to compute them, and anything it approximates in the DOM disagrees
|
|
159
|
-
* with the render as soon as the font, the line height or the wrapping does.
|
|
160
|
-
*
|
|
161
|
-
* Takes the whole {@link TextState} rather than a handful of font fields
|
|
162
|
-
* because the resolution a caret has to agree with lives in the backend:
|
|
163
|
-
* `'autofit'` picks a size from the box, `wrap` turns the width into a wrap
|
|
164
|
-
* limit, and `textAlign` places the lines within it. Handing over the same
|
|
165
|
-
* descriptor that gets drawn is what keeps the two from drifting apart.
|
|
166
|
-
*
|
|
167
|
-
* Returns `null` when the backend cannot measure this — the default, so a
|
|
168
|
-
* backend that never needed glyph positions keeps working, and for cases no
|
|
169
|
-
* caret model fits: text-on-path (glyphs follow a curve, not a line box) and
|
|
170
|
-
* a block drawn in styled segments.
|
|
84
|
+
* `null` when the backend can't measure (the default) or no caret model fits: text-on-path and styled-segment blocks.
|
|
171
85
|
*/
|
|
172
86
|
layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;
|
|
173
|
-
/**
|
|
174
|
-
* Push a transform (position, rotation, scale, opacity, …) and return the
|
|
175
|
-
* context so subsequent draw calls are issued in the transformed space. The
|
|
176
|
-
* transform is popped when `end()` is called for the node that pushed it.
|
|
177
|
-
*/
|
|
87
|
+
/** Pushes a transform and returns the context for draws in the transformed space; popped by `end()` for the node that pushed it. */
|
|
178
88
|
transform(state: Partial<TransformState>): RenderContext2D;
|
|
179
|
-
/**
|
|
180
|
-
* Open a boolean-path collection scope. Shapes drawn until `endBoolean()`
|
|
181
|
-
* are gathered (fills/strokes suppressed) and combined with `op`. After
|
|
182
|
-
* `endBoolean()` the merged path is left as the active surface, so a
|
|
183
|
-
* paint-only `Graphics2D` (`new Graphics2D().fill(...).stroke(...)`)
|
|
184
|
-
* submitted via `draw()` styles the combined result.
|
|
185
|
-
*/
|
|
89
|
+
/** Opens a boolean-path scope: shapes drawn until `endBoolean()` are gathered (fills/strokes suppressed) and combined with `op`; the merged path then stays the active surface, so a paint-only `Graphics2D` submitted via `draw()` styles it. */
|
|
186
90
|
beginBoolean(op: BooleanOperation): void;
|
|
187
91
|
endBoolean(): void;
|
|
188
92
|
beginMask(options?: MaskOptions): void;
|
|
189
93
|
applyMask(): void;
|
|
190
94
|
endMask(): void;
|
|
191
|
-
/**
|
|
192
|
-
* Push a clip region built from a {@link Clip} command list. The clip's
|
|
193
|
-
* shapes are unioned (with `cut()`s subtracted) into a single path and
|
|
194
|
-
* intersected with the active clip, so children are confined to that
|
|
195
|
-
* compound outline — any silhouette, not just a rect or ellipse. Used both
|
|
196
|
-
* for a node's `clip` boundary and to confine backdrop effects (blur,
|
|
197
|
-
* magnify) to the node's exact shape. Paired with `endClip()`.
|
|
198
|
-
*/
|
|
95
|
+
/** Pushes a clip from a {@link Clip} command list: its shapes are unioned (minus `cut()`s) into one path and intersected with the active clip, so any silhouette confines children. Also confines backdrop effects to the node's exact shape. Paired with `endClip()`. */
|
|
199
96
|
beginClip(clip: Clip): void;
|
|
200
|
-
/** Pop the most-recently pushed clip region. */
|
|
201
97
|
endClip(): void;
|
|
202
98
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* `
|
|
207
|
-
*
|
|
208
|
-
* and children captured between begin/end), like blur. Used for bulge and
|
|
209
|
-
* foreground posterize.
|
|
210
|
-
* - `'backdrop'` — warps/filters the canvas content already painted *beneath*
|
|
211
|
-
* the node, clipped to the active silhouette clip, so the node's own edges
|
|
212
|
-
* stay sharp (Figma-style). Used for backdrop-flagged filters (blur,
|
|
213
|
-
* grayscale, pixelate, …), magnify, backdrop posterize, and backdrop shader.
|
|
214
|
-
*
|
|
215
|
-
* The renderer decides per effect whether to compose it as an `ImageFilter`
|
|
216
|
-
* or run it as a snapshot/redraw shader — callers never route by effect type.
|
|
217
|
-
* `width`/`height` are the node's logical size, for size-relative effects
|
|
218
|
-
* (e.g. pixelate) and shader lens boxes.
|
|
99
|
+
* Opens an effect scope over the node, paired with {@link endEffects}. `'foreground'` filters the node's own
|
|
100
|
+
* drawing (blur, bulge, foreground posterize); `'backdrop'` filters what is already painted beneath it, clipped
|
|
101
|
+
* to the active silhouette clip so the node's edges stay sharp (backdrop filters, magnify, backdrop shader).
|
|
102
|
+
* The renderer routes each effect to an `ImageFilter` or a snapshot/redraw shader; callers never do.
|
|
103
|
+
* `width`/`height` are the node's logical size, for size-relative effects (pixelate) and shader lens boxes.
|
|
219
104
|
*/
|
|
220
105
|
beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;
|
|
221
106
|
endEffects(): void;
|
|
222
107
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* This is what backs `Tex.surface`: `Canvas3D` rasterizes each of its 2D
|
|
229
|
-
* sources through here, then hands the pixels to the 3D backend as a texture.
|
|
230
|
-
* It runs *inside* the frame that consumes it, so a scrubbed frame is
|
|
231
|
-
* identical to a played one.
|
|
232
|
-
*
|
|
233
|
-
* Returns `null` when the backend cannot rasterize offscreen — the material
|
|
234
|
-
* then renders without that map. `pixelRatio` is a ceiling on the buffer's
|
|
235
|
-
* device-pixel scale, not a guarantee; the renderer may clamp it.
|
|
108
|
+
* Draws `draw` into an offscreen buffer and returns its pixels. The buffer is `width` x `height` **logical** px,
|
|
109
|
+
* origin at the centre (the space a node draws in), so `draw` can be an ordinary `render()` of a node subtree.
|
|
110
|
+
* Backs `Tex.surface`: it runs inside the consuming frame, so a scrubbed frame equals a played one.
|
|
111
|
+
* `null` when the backend can't rasterize offscreen (the material then renders without that map).
|
|
112
|
+
* `pixelRatio` is a ceiling on the device-pixel scale; the renderer may clamp it.
|
|
236
113
|
*/
|
|
237
114
|
rasterize(width: number, height: number, draw: () => void, pixelRatio?: number): RasterizedSurface | null;
|
|
238
115
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* seen through the lens. `heading` rotates the world counter to the camera
|
|
242
|
-
* angle. Paired with `endCamera()`.
|
|
116
|
+
* Pushes a camera viewport: clips to `viewport` and applies the inverse camera transform so children render as
|
|
117
|
+
* seen through the lens. Paired with `endCamera()`.
|
|
243
118
|
*
|
|
244
|
-
* @param viewport Bounding rect of the camera node in canvas space.
|
|
119
|
+
* @param viewport Bounding rect of the camera node in canvas space (centred coords).
|
|
245
120
|
* @param lookAt World-space point the camera looks at.
|
|
246
121
|
* @param zoom Uniform scale applied around `lookAt`.
|
|
247
|
-
* @param heading Camera rotation in degrees.
|
|
122
|
+
* @param heading Camera rotation in degrees; the world rotates counter to it.
|
|
248
123
|
*/
|
|
249
124
|
beginCamera(viewport: {
|
|
250
125
|
x: number;
|
|
@@ -253,58 +128,27 @@ export interface RenderContext2D extends MeasureContext2D {
|
|
|
253
128
|
height: number;
|
|
254
129
|
}, lookAt: Vector2, zoom: number, heading: number): void;
|
|
255
130
|
endCamera(): void;
|
|
256
|
-
/**
|
|
257
|
-
* Whether this context ever reads `NodeRenderState.rects`.
|
|
258
|
-
*
|
|
259
|
-
* True for anything that actually paints, since a fill with `space:'parent'`
|
|
260
|
-
* resolves against them. A context that only inspects *what* would be drawn
|
|
261
|
-
* never looks at them, and computing them costs an object allocation per node
|
|
262
|
-
* per frame. Nodes check this before doing that work; see `Node2D.renderState`.
|
|
263
|
-
*/
|
|
131
|
+
/** Whether this context reads `NodeRenderState.rects`: true for anything that paints (`space:'parent'` fills resolve against them). A context that only inspects skips them, saving an object allocation per node per frame; see `Node2D.renderState`. */
|
|
264
132
|
readonly readsSpaceRects: boolean;
|
|
265
133
|
/**
|
|
266
|
-
* Whether this context only cares about
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* A context that inspects rather than paints sets this `false`, and that is
|
|
272
|
-
* the whole reason this is a capability rather than an unconditional check:
|
|
273
|
-
* such a walk exists to discover which images, videos, fonts and effects a
|
|
274
|
-
* frame *references* — regardless of whether they can be seen. An invisible
|
|
275
|
-
* node's font still has to load, because it may fade in two frames later and
|
|
276
|
-
* glyphs that were never registered never paint. Skipping it there is not an
|
|
277
|
-
* optimisation, it is a missing asset.
|
|
278
|
-
*
|
|
279
|
-
* Same shape and same reasoning as {@link readsSpaceRects}: the context
|
|
280
|
-
* declares what it needs, and nodes check before doing work that would be
|
|
281
|
-
* thrown away. See `Node2D.render`.
|
|
134
|
+
* Whether this context only cares about visible output: true for anything that paints (a zero-opacity subtree
|
|
135
|
+
* contributes no pixels). A context that inspects rather than paints sets it `false`: its walk discovers which
|
|
136
|
+
* images, videos, fonts and effects a frame references, and an invisible node's font may fade in two frames
|
|
137
|
+
* later, so skipping it there is a missing asset, not an optimisation. See `Node2D.render`.
|
|
282
138
|
*/
|
|
283
139
|
readonly drawsVisibleOnly: boolean;
|
|
284
140
|
}
|
|
285
141
|
/**
|
|
286
|
-
* A render
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
* `begin`/`end` are `Node2D.render`'s, once per node, and they push onto a stack
|
|
291
|
-
* every fill with `space:'parent'` and every motion-driven effect reads back
|
|
292
|
-
* from. A custom node's `renderSelf` calling one would open a scope nothing
|
|
293
|
-
* closes — and since `renderSelf` is handed a {@link RenderContext2D}, it now
|
|
294
|
-
* cannot.
|
|
295
|
-
*
|
|
296
|
-
* Every backend implements this; a host driving a render pass holds one.
|
|
142
|
+
* A render pass: a {@link RenderContext2D} plus the per-node scope bracket the walk opens around each node.
|
|
143
|
+
* `begin`/`end` belong to `Node2D.render` and push onto the stack that `space:'parent'` fills and motion-driven
|
|
144
|
+
* effects read; a custom `renderSelf` calling one would open a scope nothing closes, so it is handed only a
|
|
145
|
+
* {@link RenderContext2D}.
|
|
297
146
|
*
|
|
298
147
|
* @internal
|
|
299
148
|
*/
|
|
300
149
|
export interface RenderPass2D extends RenderContext2D {
|
|
301
|
-
/**
|
|
302
|
-
* Open a node draw scope. Must be paired with `end()`, also when the scope
|
|
303
|
-
* throws. Pushes the node's id and {@link NodeRenderState} (gradient-space
|
|
304
|
-
* rects + per-frame motion) for the duration of the scope.
|
|
305
|
-
*/
|
|
150
|
+
/** Opens a node draw scope pushing the node's id and {@link NodeRenderState}; pair with `end()`, also when the scope throws. */
|
|
306
151
|
begin(state: NodeRenderState): void;
|
|
307
|
-
/** Close the innermost node draw scope opened by `begin()`. */
|
|
308
152
|
end(): void;
|
|
309
153
|
}
|
|
310
154
|
//# sourceMappingURL=render-context2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,oNAAoN;AACpN,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,UAAU,CAAC;AAErD,0LAA0L;AAC1L,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,gHAAgH;AAChH,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,sMAAsM;AACtM,MAAM,WAAW,UAAU;IACvB,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,qSAAqS;AACrS,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,QAAQ,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,eAAe,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACrD,WAAW,CACP,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,SAAS,GACtB,MAAM,CAAC;IAMV;;;;;;OAMG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IAE7C,YAAY,IAAI,IAAI,CAAC;IAErB,sKAAsK;IACtK,QAAQ,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAErC,0PAA0P;IAC1P,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;IAEjC;;;;;;;OAOG;IACH,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;IAEnE,oIAAoI;IACpI,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC;IAE3D,kPAAkP;IAClP,YAAY,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,UAAU,IAAI,IAAI,CAAC;IAMnB,SAAS,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC,SAAS,IAAI,IAAI,CAAC;IAClB,OAAO,IAAI,IAAI,CAAC;IAEhB,0QAA0Q;IAC1Q,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,OAAO,IAAI,IAAI,CAAC;IAEhB;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/F,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;;;OAMG;IACH,SAAS,CACL,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,IAAI,EAChB,UAAU,CAAC,EAAE,MAAM,GACpB,iBAAiB,GAAG,IAAI,CAAC;IAE5B;;;;;;;;OAQG;IACH,WAAW,CAAC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACrI,SAAS,IAAI,IAAI,CAAC;IAElB,0PAA0P;IAC1P,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAElC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CAEtC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAa,SAAQ,eAAe;IACjD,gIAAgI;IAChI,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAEpC,GAAG,IAAI,IAAI,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-context2d.js","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"","sourcesContent":["import type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { MeasureContext2D } from \"./measure-context\";\nimport type { TextState } from \"./descriptors/text\";\nimport type { TextBlockLayout } from \"./text-layout\";\nimport type { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\nimport type { Size2D } from \"@/attributes/layout/size\";\n\n/**\n * Where an effect scope draws: `'foreground'` warps/filters the node's *own*\n * content (its fill, stroke and children), `'backdrop'` warps/filters the canvas\n * content already painted *beneath* the node (clipped to its silhouette). See\n * {@link RenderContext2D.beginEffects}.\n */\nexport type EffectTarget = \"foreground\" | \"backdrop\";\n\n/**\n * Pixels produced by {@link RenderContext2D.rasterize}: RGBA8888,\n * unpremultiplied, top-down (canvas row order). `width`/`height` are **device**\n * px, so they reflect the pixel ratio the renderer actually used rather than the\n * logical size that was asked for.\n */\nexport interface RasterizedSurface {\n pixels: Uint8Array;\n width: number;\n height: number;\n}\n\n/**\n * A bounding box in the current node's local space (origin = the node's\n * layout-cell centre, the same space shapes are drawn in). `left/top` use the\n * canvas convention (y down).\n */\nexport interface SpaceRect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/**\n * Reference rects a fill can resolve against, supplied per-node at `begin()`.\n * `local` is derived from the drawn shapes themselves and `global` (the\n * viewport) is computed by the renderer from the surface size, so only the\n * parent frame is passed here.\n */\nexport interface SpaceRects {\n /** The parent node's content rect, in this node's local space. */\n parent?: SpaceRect;\n}\n\n/**\n * Per-node state supplied to {@link RenderContext2D.begin} for the duration of a\n * node's draw scope. Carries the node identity and gradient-space `rects` plus\n * the node's per-frame motion, sampled at render time. Motion-driven effects\n * (e.g. motion blur) read the current node's `velocity` from this state instead\n * of being authored with a fixed direction.\n *\n * Velocity fields are `0`/`{0,0}` when the motion is unknown — the first frame a\n * node renders, or after a time discontinuity (scrub/seek) where no trustworthy\n * delta exists.\n */\nexport interface NodeRenderState {\n /** Stable node identifier. */\n id: string;\n /** Parent / viewport rects in this node's local space. */\n rects: SpaceRects;\n /** How long this node has existed, in seconds (`NodeTime.elapsed`). */\n elapsed: number;\n /** The frame delta, in seconds, used to derive displacement from velocity. */\n dt: number;\n /** Translational velocity in px/sec, world space (y-down). `{0,0}` when unknown. */\n velocity: Vector2;\n /** Heading of `velocity` in degrees (`atan2(vy, vx)`). `0` when unknown. */\n direction: number;\n /** Magnitude of `velocity` in px/sec. `0` when unknown. */\n speed: number;\n /** Rotational velocity in degrees/sec. `0` when unknown. Reserved for radial motion blur. */\n angularVelocity: number;\n /** Scale velocity in scale-units/sec. `0` when unknown. Reserved for zoom motion blur. */\n scaleVelocity: number;\n}\n\n/**\n * The drawing surface a `Node2D` paints into — **the whole of what a node may\n * ask of a renderer, and nothing else.**\n *\n * Shapes are never declared directly on the context: they are built with a\n * {@link Graphics2D} command list and submitted via {@link draw}. Multiple\n * shapes chained on one `Graphics2D` before a paint call are combined into a\n * single surface and painted together:\n *\n * ctx.draw(new Graphics2D().ellipse(...).rect(...).fill(...)); // shared surface\n *\n * On top of that it carries text measurement — it extends {@link MeasureContext2D}, so\n * a node measures and draws through one object — and the higher-level scoping\n * operations: transforms, masks, clips, camera, boolean ops, effect scopes.\n * `begin(state)` / `end()` bracket each node's draw call so the context can\n * track which node is active.\n *\n * **An interface, with `CanvasRenderContext2D` as its one base class.** What a\n * node calls and what a *host* calls are different lists: `execute`,\n * `screenshot`, `unmount` and `dispose` drive a render pass and have no business\n * being reachable from inside one. Splitting them is what keeps this surface\n * the size it is. Every real backend still extends the class, which preserves\n * the `draw` to `drawGraphics` invariant that gives them all one implementation\n * of text-default resolution.\n *\n * `RenderContext3D` is its sibling, not its subclass: the two share no members,\n * because a 3D scene is described with lights, a camera and meshes rather than\n * with paths and paint.\n */\nexport interface RenderContext2D extends MeasureContext2D {\n measureText(\n text: string,\n fontSize: number,\n fontFamily: string,\n fontWeight?: number,\n letterSpacing?: number,\n fontStyle?: FontStyle,\n ): Size2D;\n\n // ---- Inherited text-style defaults ------------------------------------\n // `<DefaultTextStyle>` reaches a `Text`/`RichText` node through the context\n // map, applied once when the node binds. A raw `Graphics2D` has no node to\n // bind, so it inherits the same defaults here instead — pushed around a\n // subtree's draw scope, and folded into each `text`/`richText` op by\n // `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.\n\n /**\n * Set text-style defaults for everything drawn until the matching\n * {@link popTextStyle} — the drawn-graphics half of `<DefaultTextStyle>`.\n *\n * `style` is **merged** onto the defaults already in effect, per key, so\n * nesting accumulates the way the node channel does: an outer scope's\n * `fontFamily` and an inner scope's `fontSize` both apply, and a key set by\n * both takes the inner value. Values are resolved (a tweened `fontSize`\n * arrives as this frame's number), not callbacks.\n *\n * Pass `null` to open a scope that inherits **nothing** — not the enclosing\n * defaults and not the project's `theme.typography.default`. That is for a\n * node whose text is its own vocabulary rather than the document's: `Code`\n * does it so a scene-wide serif face doesn't reflow a monospaced code block.\n *\n * Always pair with `popTextStyle()` in a `finally`; the stack is shared with\n * every sibling drawn afterwards.\n */\n pushTextStyle(style: TextStyle | null): void;\n\n /** Close the innermost scope opened by {@link pushTextStyle}. */\n popTextStyle(): void;\n\n /**\n * The text-style defaults in effect right now: the innermost\n * {@link pushTextStyle} scope, or the project's `theme.typography.default`\n * when no scope is open — the same preset a `Text` node falls back to, so a\n * drawn label and a node label agree on the project's base typography.\n */\n readonly defaultTextStyle: TextStyle;\n\n /**\n * Replay a built `Graphics2D` against this context.\n *\n * Resolves the ambient text defaults onto the op list before handing it to\n * the backend, which is what keeps the real renderer and the precomp asset\n * walk agreeing on which font an under-specified `text` op shapes with: a\n * family that one resolves and the other does not is a font that never loads\n * and glyphs that never paint.\n */\n draw(graphics: Graphics2D): void;\n\n /**\n * Lay `state` out the way it would be drawn and report where every character\n * landed — see {@link TextBlockLayout} for the space and the caret model.\n *\n * This is what makes on-canvas text editing possible: glyph positions live\n * in the backend's shaper, so a host drawing its own caret and selection has\n * no way to compute them, and anything it approximates in the DOM disagrees\n * with the render as soon as the font, the line height or the wrapping does.\n *\n * Takes the whole {@link TextState} rather than a handful of font fields\n * because the resolution a caret has to agree with lives in the backend:\n * `'autofit'` picks a size from the box, `wrap` turns the width into a wrap\n * limit, and `textAlign` places the lines within it. Handing over the same\n * descriptor that gets drawn is what keeps the two from drifting apart.\n *\n * Returns `null` when the backend cannot measure this — the default, so a\n * backend that never needed glyph positions keeps working, and for cases no\n * caret model fits: text-on-path (glyphs follow a curve, not a line box) and\n * a block drawn in styled segments.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;\n\n /**\n * Push a transform (position, rotation, scale, opacity, …) and return the\n * context so subsequent draw calls are issued in the transformed space. The\n * transform is popped when `end()` is called for the node that pushed it.\n */\n transform(state: Partial<TransformState>): RenderContext2D;\n\n /**\n * Open a boolean-path collection scope. Shapes drawn until `endBoolean()`\n * are gathered (fills/strokes suppressed) and combined with `op`. After\n * `endBoolean()` the merged path is left as the active surface, so a\n * paint-only `Graphics2D` (`new Graphics2D().fill(...).stroke(...)`)\n * submitted via `draw()` styles the combined result.\n */\n beginBoolean(op: BooleanOperation): void;\n endBoolean(): void;\n\n // Mask scope (imperative) — used by MaskGroup and other node-level callers\n // that manage the scope with explicit begin/apply/end:\n //\n // beginMask({ mode, inverted })\n // <render mask child> // child draws its own Graphics2D\n // applyMask()\n // <render content children> // children draw their own Graphics2D\n // endMask()\n //\n // The chain-friendly form lives on `Graphics2D` (`.mask().applyMask().endMask()`)\n // for inline use within a single `draw()`.\n //\n // For `vector` mode the mask child's path is collected and used as a\n // clipPath; fills/strokes are suppressed. For `alpha` and `luminance`\n // the mask is rendered into an offscreen layer and combined with content\n // via blend modes.\n beginMask(options?: MaskOptions): void;\n applyMask(): void;\n endMask(): void;\n\n /**\n * Push a clip region built from a {@link Clip} command list. The clip's\n * shapes are unioned (with `cut()`s subtracted) into a single path and\n * intersected with the active clip, so children are confined to that\n * compound outline — any silhouette, not just a rect or ellipse. Used both\n * for a node's `clip` boundary and to confine backdrop effects (blur,\n * magnify) to the node's exact shape. Paired with `endClip()`.\n */\n beginClip(clip: Clip): void;\n /** Pop the most-recently pushed clip region. */\n endClip(): void;\n\n /**\n * Open an effect scope over the node, applying `effects` to either the node's\n * own content or the content beneath it. Paired with {@link endEffects}.\n *\n * `target`:\n * - `'foreground'` — warps/filters the node's *own* drawing (its fill, stroke\n * and children captured between begin/end), like blur. Used for bulge and\n * foreground posterize.\n * - `'backdrop'` — warps/filters the canvas content already painted *beneath*\n * the node, clipped to the active silhouette clip, so the node's own edges\n * stay sharp (Figma-style). Used for backdrop-flagged filters (blur,\n * grayscale, pixelate, …), magnify, backdrop posterize, and backdrop shader.\n *\n * The renderer decides per effect whether to compose it as an `ImageFilter`\n * or run it as a snapshot/redraw shader — callers never route by effect type.\n * `width`/`height` are the node's logical size, for size-relative effects\n * (e.g. pixelate) and shader lens boxes.\n */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;\n endEffects(): void;\n\n /**\n * Draw `draw` into an offscreen buffer instead of onto the canvas, and hand\n * back its pixels. The buffer is `width` × `height` **logical** px with its\n * origin at the centre, matching the space a node draws in — so `draw` can be\n * an ordinary `render()` call on a node subtree and needs no special casing.\n *\n * This is what backs `Tex.surface`: `Canvas3D` rasterizes each of its 2D\n * sources through here, then hands the pixels to the 3D backend as a texture.\n * It runs *inside* the frame that consumes it, so a scrubbed frame is\n * identical to a played one.\n *\n * Returns `null` when the backend cannot rasterize offscreen — the material\n * then renders without that map. `pixelRatio` is a ceiling on the buffer's\n * device-pixel scale, not a guarantee; the renderer may clamp it.\n */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null;\n\n /**\n * Push a camera viewport. Clips to `viewport` (canvas-space, centred\n * coords) and applies the inverse camera transform so children render as\n * seen through the lens. `heading` rotates the world counter to the camera\n * angle. Paired with `endCamera()`.\n *\n * @param viewport Bounding rect of the camera node in canvas space.\n * @param lookAt World-space point the camera looks at.\n * @param zoom Uniform scale applied around `lookAt`.\n * @param heading Camera rotation in degrees.\n */\n beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n endCamera(): void;\n\n /**\n * Whether this context ever reads `NodeRenderState.rects`.\n *\n * True for anything that actually paints, since a fill with `space:'parent'`\n * resolves against them. A context that only inspects *what* would be drawn\n * never looks at them, and computing them costs an object allocation per node\n * per frame. Nodes check this before doing that work; see `Node2D.renderState`.\n */\n readonly readsSpaceRects: boolean;\n\n /**\n * Whether this context only cares about *visible* output.\n *\n * True for anything that paints: a subtree at zero opacity contributes no\n * pixels, so walking it produces draw calls the rasterizer will discard.\n *\n * A context that inspects rather than paints sets this `false`, and that is\n * the whole reason this is a capability rather than an unconditional check:\n * such a walk exists to discover which images, videos, fonts and effects a\n * frame *references* — regardless of whether they can be seen. An invisible\n * node's font still has to load, because it may fade in two frames later and\n * glyphs that were never registered never paint. Skipping it there is not an\n * optimisation, it is a missing asset.\n *\n * Same shape and same reasoning as {@link readsSpaceRects}: the context\n * declares what it needs, and nodes check before doing work that would be\n * thrown away. See `Node2D.render`.\n */\n readonly drawsVisibleOnly: boolean;\n\n}\n\n/**\n * A render *pass*: a {@link RenderContext2D} plus the per-node scope bracket the\n * walk opens around each node.\n *\n * Split off from the drawing surface because the two have different callers.\n * `begin`/`end` are `Node2D.render`'s, once per node, and they push onto a stack\n * every fill with `space:'parent'` and every motion-driven effect reads back\n * from. A custom node's `renderSelf` calling one would open a scope nothing\n * closes — and since `renderSelf` is handed a {@link RenderContext2D}, it now\n * cannot.\n *\n * Every backend implements this; a host driving a render pass holds one.\n *\n * @internal\n */\nexport interface RenderPass2D extends RenderContext2D {\n /**\n * Open a node draw scope. Must be paired with `end()`, also when the scope\n * throws. Pushes the node's id and {@link NodeRenderState} (gradient-space\n * rects + per-frame motion) for the duration of the scope.\n */\n begin(state: NodeRenderState): void;\n\n /** Close the innermost node draw scope opened by `begin()`. */\n end(): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"render-context2d.js","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"","sourcesContent":["import type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { MeasureContext2D } from \"./measure-context\";\nimport type { TextState } from \"./descriptors/text\";\nimport type { TextBlockLayout } from \"./text-layout\";\nimport type { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\nimport type { Size2D } from \"@/attributes/layout/size\";\n\n/** Where an effect scope draws: `'foreground'` filters the node's own content, `'backdrop'` the canvas content already painted beneath it (clipped to its silhouette). See {@link RenderContext2D.beginEffects}. */\nexport type EffectTarget = \"foreground\" | \"backdrop\";\n\n/** Pixels from {@link RenderContext2D.rasterize}: RGBA8888, unpremultiplied, top-down. `width`/`height` are device px (the pixel ratio actually used), not the logical size asked for. */\nexport interface RasterizedSurface {\n pixels: Uint8Array;\n width: number;\n height: number;\n}\n\n/** A box in the current node's local space (origin at the layout-cell centre); `left/top` are canvas y-down. */\nexport interface SpaceRect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/** Reference rects a fill resolves against, supplied per node at `begin()`. `local` comes from the drawn shapes and `global` from the renderer's surface size, so only the parent frame is passed. */\nexport interface SpaceRects {\n /** The parent node's content rect, in this node's local space. */\n parent?: SpaceRect;\n}\n\n/** Per-node state for the duration of a node's draw scope: identity, gradient-space `rects` and per-frame motion, which motion-driven effects (motion blur) read instead of a fixed authored direction. Velocity fields are 0 when unknown: the first frame, or after a scrub/seek discontinuity. */\nexport interface NodeRenderState {\n id: string;\n rects: SpaceRects;\n elapsed: number;\n /** The frame delta, in seconds, used to derive displacement from velocity. */\n dt: number;\n /** Translational velocity in px/sec, world space (y-down). `{0,0}` when unknown. */\n velocity: Vector2;\n /** Heading of `velocity` in degrees (`atan2(vy, vx)`). `0` when unknown. */\n direction: number;\n /** Magnitude of `velocity` in px/sec. `0` when unknown. */\n speed: number;\n /** Rotational velocity in degrees/sec. `0` when unknown. Reserved for radial motion blur. */\n angularVelocity: number;\n /** Scale velocity in scale-units/sec. `0` when unknown. Reserved for zoom motion blur. */\n scaleVelocity: number;\n}\n\n/**\n * The drawing surface a `Node2D` paints into: the whole of what a node may ask of a renderer.\n *\n * Shapes are built with a {@link Graphics2D} command list and submitted via {@link draw}; shapes chained on one\n * `Graphics2D` before a paint call share a single surface. It extends {@link MeasureContext2D}, so a node\n * measures and draws through one object.\n *\n * An interface so node-facing and host-facing lists stay apart: `execute`, `screenshot`, `unmount` and `dispose`\n * drive a pass and mustn't be reachable from inside one. Every real backend still extends `CanvasRenderContext2D`,\n * keeping the `draw` to `drawGraphics` invariant that gives them one text-default resolution.\n * `RenderContext3D` is a sibling, not a subclass: they share no members.\n */\nexport interface RenderContext2D extends MeasureContext2D {\n measureText(\n text: string,\n fontSize: number,\n fontFamily: string,\n fontWeight?: number,\n letterSpacing?: number,\n fontStyle?: FontStyle,\n ): Size2D;\n\n // Inherited text-style defaults: `<DefaultTextStyle>` reaches node text through the context map; a raw `Graphics2D`\n // has no node to bind, so it inherits the same defaults (same `TextStyle` vocabulary and precedence) pushed around\n // a subtree and folded into each text op by `draw()`.\n\n /**\n * Sets text-style defaults until the matching {@link popTextStyle} (the drawn-graphics half of `<DefaultTextStyle>`).\n * `style` is merged per key onto the defaults in effect, so nesting accumulates and the inner value wins; values\n * are resolved, not callbacks. `null` opens a scope inheriting nothing, not even `theme.typography.default`\n * (`Code` does this so a serif scene face doesn't reflow monospaced code). Pair with `popTextStyle()` in a\n * `finally`: the stack is shared with every later sibling.\n */\n pushTextStyle(style: TextStyle | null): void;\n\n popTextStyle(): void;\n\n /** The defaults in effect: the innermost {@link pushTextStyle} scope, else the project's `theme.typography.default` (the same preset a `Text` node falls back to). */\n readonly defaultTextStyle: TextStyle;\n\n /** Replays a built `Graphics2D`. Resolves ambient text defaults onto the op list first, so the real renderer and the precomp asset walk agree on which font an under-specified `text` op uses (a family only one resolves is a font that never loads). */\n draw(graphics: Graphics2D): void;\n\n /**\n * Lays `state` out as it would be drawn and reports where every character landed (see {@link TextBlockLayout}\n * for the space and caret model). Glyph positions live in the backend's shaper, so a host's own caret and\n * selection can't compute them; DOM approximations drift once font, line height or wrapping change. Takes the\n * whole {@link TextState} because `'autofit'`, `wrap` and `textAlign` resolve in the backend and must match what is drawn.\n *\n * `null` when the backend can't measure (the default) or no caret model fits: text-on-path and styled-segment blocks.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;\n\n /** Pushes a transform and returns the context for draws in the transformed space; popped by `end()` for the node that pushed it. */\n transform(state: Partial<TransformState>): RenderContext2D;\n\n /** Opens a boolean-path scope: shapes drawn until `endBoolean()` are gathered (fills/strokes suppressed) and combined with `op`; the merged path then stays the active surface, so a paint-only `Graphics2D` submitted via `draw()` styles it. */\n beginBoolean(op: BooleanOperation): void;\n endBoolean(): void;\n\n // Imperative mask scope for node-level callers: beginMask, render the mask child, applyMask, render the content\n // children, endMask. The chain form lives on `Graphics2D` (`.mask().applyMask().endMask()`). `vector` mode collects\n // the mask child's path as a clipPath (fills/strokes suppressed); `alpha` and `luminance` render it into an\n // offscreen layer combined via blend modes.\n beginMask(options?: MaskOptions): void;\n applyMask(): void;\n endMask(): void;\n\n /** Pushes a clip from a {@link Clip} command list: its shapes are unioned (minus `cut()`s) into one path and intersected with the active clip, so any silhouette confines children. Also confines backdrop effects to the node's exact shape. Paired with `endClip()`. */\n beginClip(clip: Clip): void;\n endClip(): void;\n\n /**\n * Opens an effect scope over the node, paired with {@link endEffects}. `'foreground'` filters the node's own\n * drawing (blur, bulge, foreground posterize); `'backdrop'` filters what is already painted beneath it, clipped\n * to the active silhouette clip so the node's edges stay sharp (backdrop filters, magnify, backdrop shader).\n * The renderer routes each effect to an `ImageFilter` or a snapshot/redraw shader; callers never do.\n * `width`/`height` are the node's logical size, for size-relative effects (pixelate) and shader lens boxes.\n */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;\n endEffects(): void;\n\n /**\n * Draws `draw` into an offscreen buffer and returns its pixels. The buffer is `width` x `height` **logical** px,\n * origin at the centre (the space a node draws in), so `draw` can be an ordinary `render()` of a node subtree.\n * Backs `Tex.surface`: it runs inside the consuming frame, so a scrubbed frame equals a played one.\n * `null` when the backend can't rasterize offscreen (the material then renders without that map).\n * `pixelRatio` is a ceiling on the device-pixel scale; the renderer may clamp it.\n */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null;\n\n /**\n * Pushes a camera viewport: clips to `viewport` and applies the inverse camera transform so children render as\n * seen through the lens. Paired with `endCamera()`.\n *\n * @param viewport Bounding rect of the camera node in canvas space (centred coords).\n * @param lookAt World-space point the camera looks at.\n * @param zoom Uniform scale applied around `lookAt`.\n * @param heading Camera rotation in degrees; the world rotates counter to it.\n */\n beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n endCamera(): void;\n\n /** Whether this context reads `NodeRenderState.rects`: true for anything that paints (`space:'parent'` fills resolve against them). A context that only inspects skips them, saving an object allocation per node per frame; see `Node2D.renderState`. */\n readonly readsSpaceRects: boolean;\n\n /**\n * Whether this context only cares about visible output: true for anything that paints (a zero-opacity subtree\n * contributes no pixels). A context that inspects rather than paints sets it `false`: its walk discovers which\n * images, videos, fonts and effects a frame references, and an invisible node's font may fade in two frames\n * later, so skipping it there is a missing asset, not an optimisation. See `Node2D.render`.\n */\n readonly drawsVisibleOnly: boolean;\n\n}\n\n/**\n * A render pass: a {@link RenderContext2D} plus the per-node scope bracket the walk opens around each node.\n * `begin`/`end` belong to `Node2D.render` and push onto the stack that `space:'parent'` fills and motion-driven\n * effects read; a custom `renderSelf` calling one would open a scope nothing closes, so it is handed only a\n * {@link RenderContext2D}.\n *\n * @internal\n */\nexport interface RenderPass2D extends RenderContext2D {\n /** Opens a node draw scope pushing the node's id and {@link NodeRenderState}; pair with `end()`, also when the scope throws. */\n begin(state: NodeRenderState): void;\n\n end(): void;\n}\n"]}
|
package/dist/render/surface.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { Size2D } from "../attributes/layout/size.js";
|
|
2
|
-
/**
|
|
3
|
-
* The host-facing half of a render context: where pixels land, and how the
|
|
4
|
-
* preview frames them.
|
|
5
|
-
*
|
|
6
|
-
* Split out from `CanvasRenderContext2D` because a *node* never touches any of
|
|
7
|
-
* it — a node draws, and the host decides what it is drawing into. A `Session`
|
|
8
|
-
* owns one of these; a node is handed a `RenderContext2D`.
|
|
9
|
-
*
|
|
10
|
-
* **`mount` takes `unknown`, not `HTMLCanvasElement`.** `packages/core` compiles
|
|
11
|
-
* with `lib: ["ES2022"]` and no DOM, deliberately, so this layer cannot name a
|
|
12
|
-
* canvas — and it does not need to: a browser backend takes a canvas, a headless
|
|
13
|
-
* one takes a size. Each narrows the argument at its own `mount`, where the
|
|
14
|
-
* relevant types exist. A backend's context satisfies this structurally, so it
|
|
15
|
-
* never imports it.
|
|
16
|
-
*/
|
|
2
|
+
/** The host-facing half of a render context: where pixels land and how the preview frames them. Split from `CanvasRenderContext2D` because a *node* never touches it; a `Session` owns one of these, a node gets a `RenderContext2D`. `mount` takes `unknown`, not `HTMLCanvasElement`: core compiles with `lib: ["ES2022"]` and no DOM, so this layer can't name a canvas; a browser backend takes a canvas, a headless one a size, each narrowing at its own `mount`, and a backend's context satisfies this structurally. */
|
|
17
3
|
export interface RenderSurface {
|
|
18
4
|
mount(target: unknown): void;
|
|
19
5
|
unmount(): void;
|
|
@@ -28,10 +14,7 @@ export interface RenderSurface {
|
|
|
28
14
|
/** The frame's own size when the surface is a window onto it, else `null`. */
|
|
29
15
|
frame: Size2D | null;
|
|
30
16
|
clipToFrame: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* What the frame's backdrop is painted with. `"transparent"` lets whatever
|
|
33
|
-
* is behind the canvas show through where nothing was drawn.
|
|
34
|
-
*/
|
|
17
|
+
/** What the frame's backdrop is painted with; `"transparent"` lets whatever is behind the canvas show where nothing was drawn. */
|
|
35
18
|
frameBackground: "black" | "transparent";
|
|
36
19
|
}
|
|
37
20
|
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,ggBAAggB;AAChgB,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,OAAO,IAAI,IAAI,CAAC;IAChB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,8EAA8E;IAC9E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,kIAAkI;IAClI,eAAe,EAAE,OAAO,GAAG,aAAa,CAAC;CAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\n\n
|
|
1
|
+
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\n\n/** The host-facing half of a render context: where pixels land and how the preview frames them. Split from `CanvasRenderContext2D` because a *node* never touches it; a `Session` owns one of these, a node gets a `RenderContext2D`. `mount` takes `unknown`, not `HTMLCanvasElement`: core compiles with `lib: [\"ES2022\"]` and no DOM, so this layer can't name a canvas; a browser backend takes a canvas, a headless one a size, each narrowing at its own `mount`, and a backend's context satisfies this structurally. */\nexport interface RenderSurface {\n mount(target: unknown): void;\n unmount(): void;\n /** Device pixels per viewport unit. Rasterization, not zoom — see {@link view}. */\n pixelRatio: number;\n /** Preview pan/zoom over the frame. Costs a repaint, never a surface rebuild. */\n view: { zoom: number; x: number; y: number };\n /** The frame's own size when the surface is a window onto it, else `null`. */\n frame: Size2D | null;\n clipToFrame: boolean;\n /** What the frame's backdrop is painted with; `\"transparent\"` lets whatever is behind the canvas show where nothing was drawn. */\n frameBackground: \"black\" | \"transparent\";\n}\n"]}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import type { TextStyle } from "../attributes/text/types.js";
|
|
2
2
|
import { Graphics2D } from "./graphics2d.js";
|
|
3
|
-
/**
|
|
4
|
-
* `graphics` with `style` filled into every `text`/`richText` op that left a
|
|
5
|
-
* shaping field unset — the drawn-text half of `<DefaultTextStyle>`.
|
|
6
|
-
*
|
|
7
|
-
* A `Text` node inherits defaults through the context channel, once, at bind
|
|
8
|
-
* time (`applyTextDefaults`); a raw `Graphics2D` has no node to bind, so it
|
|
9
|
-
* inherits here instead, at draw time, from the scope it is drawn in. Called
|
|
10
|
-
* from `RenderContext2D.draw`, so a custom node's `ctx.draw(...)`, an offscreen
|
|
11
|
-
* rasterization and the precomp pass's asset walk all see the same resolved op
|
|
12
|
-
* list — which is what makes an inherited font actually *load* rather than
|
|
13
|
-
* merely be asked for.
|
|
14
|
-
*
|
|
15
|
-
* A key counts as unset only when it is `undefined`: an op that names a value
|
|
16
|
-
* always wins, exactly as an author-set prop beats an inherited one on a node.
|
|
17
|
-
* Returns `graphics` itself when nothing changes, which is the common case (the
|
|
18
|
-
* scene sets no defaults, or every op already names its own).
|
|
19
|
-
*/
|
|
3
|
+
/** `graphics` with `style` filled into every `text`/`richText` op that left a shaping field unset: the drawn-text half of `<DefaultTextStyle>`. A `Text` node inherits through the context channel at bind; a raw `Graphics2D` has no node to bind, so it inherits here at draw time from the scope it is drawn in. Called from `RenderContext2D.draw`, so custom `ctx.draw(...)`, offscreen rasterization and the precomp asset walk see the same resolved ops (an inherited font actually *loads*). A key is unset only when `undefined`: an op naming a value wins. Returns `graphics` itself when nothing changes. */
|
|
20
4
|
export declare function applyGraphicsTextDefaults(graphics: Graphics2D, style: TextStyle): Graphics2D;
|
|
21
5
|
//# sourceMappingURL=text-defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-defaults.d.ts","sourceRoot":"","sources":["../../src/render/text-defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoC,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAyC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"text-defaults.d.ts","sourceRoot":"","sources":["../../src/render/text-defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoC,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAyC,MAAM,cAAc,CAAC;AAejF,0lBAA0lB;AAC1lB,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,UAAU,CAoB5F"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { EMPTY_TEXT_STYLE, TEXT_SHAPING_KEYS, textOps } from "../attributes/text/ops.js";
|
|
2
|
-
/**
|
|
3
|
-
* The span-level half of {@link TEXT_SHAPING_KEYS}. A `richText` op carries its
|
|
4
|
-
* typography per span rather than on the shape, so a default has to be filled in
|
|
5
|
-
* span by span — except `lineHeight`/`textAlign`, which lay the block out as a
|
|
6
|
-
* whole and so live on the op itself.
|
|
7
|
-
*/
|
|
2
|
+
/** The span-level half of {@link TEXT_SHAPING_KEYS}: a `richText` op carries typography per span, so defaults are filled span by span, except `lineHeight`/`textAlign`, which lay out the whole block and live on the op. */
|
|
8
3
|
const SPAN_KEYS = [
|
|
9
4
|
'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'letterSpacing',
|
|
10
5
|
];
|
|
@@ -12,27 +7,9 @@ const SPAN_KEYS = [
|
|
|
12
7
|
const RICHTEXT_BLOCK_KEYS = [
|
|
13
8
|
'lineHeight', 'textAlign',
|
|
14
9
|
];
|
|
15
|
-
/**
|
|
16
|
-
* `graphics` with `style` filled into every `text`/`richText` op that left a
|
|
17
|
-
* shaping field unset — the drawn-text half of `<DefaultTextStyle>`.
|
|
18
|
-
*
|
|
19
|
-
* A `Text` node inherits defaults through the context channel, once, at bind
|
|
20
|
-
* time (`applyTextDefaults`); a raw `Graphics2D` has no node to bind, so it
|
|
21
|
-
* inherits here instead, at draw time, from the scope it is drawn in. Called
|
|
22
|
-
* from `RenderContext2D.draw`, so a custom node's `ctx.draw(...)`, an offscreen
|
|
23
|
-
* rasterization and the precomp pass's asset walk all see the same resolved op
|
|
24
|
-
* list — which is what makes an inherited font actually *load* rather than
|
|
25
|
-
* merely be asked for.
|
|
26
|
-
*
|
|
27
|
-
* A key counts as unset only when it is `undefined`: an op that names a value
|
|
28
|
-
* always wins, exactly as an author-set prop beats an inherited one on a node.
|
|
29
|
-
* Returns `graphics` itself when nothing changes, which is the common case (the
|
|
30
|
-
* scene sets no defaults, or every op already names its own).
|
|
31
|
-
*/
|
|
10
|
+
/** `graphics` with `style` filled into every `text`/`richText` op that left a shaping field unset: the drawn-text half of `<DefaultTextStyle>`. A `Text` node inherits through the context channel at bind; a raw `Graphics2D` has no node to bind, so it inherits here at draw time from the scope it is drawn in. Called from `RenderContext2D.draw`, so custom `ctx.draw(...)`, offscreen rasterization and the precomp asset walk see the same resolved ops (an inherited font actually *loads*). A key is unset only when `undefined`: an op naming a value wins. Returns `graphics` itself when nothing changes. */
|
|
32
11
|
export function applyGraphicsTextDefaults(graphics, style) {
|
|
33
|
-
// Not gated on `style` alone
|
|
34
|
-
// something to inherit even in a scope that sets nothing, so the walk has to
|
|
35
|
-
// happen either way. The lazy copy below is what keeps that cheap.
|
|
12
|
+
// Not gated on `style` alone: an op naming a `variant` has something to inherit even in a scope that sets nothing. The lazy copy below keeps the walk cheap.
|
|
36
13
|
const ambient = hasShapingDefaults(style) ? style : EMPTY_TEXT_STYLE;
|
|
37
14
|
const ops = graphics.ops();
|
|
38
15
|
let next = null;
|
|
@@ -48,23 +25,14 @@ export function applyGraphicsTextDefaults(graphics, style) {
|
|
|
48
25
|
: patchRichText(op, effective);
|
|
49
26
|
if (!patched)
|
|
50
27
|
continue;
|
|
51
|
-
// Copy lazily: an op list with nothing to fill in keeps its identity, so
|
|
52
|
-
// a fully-specified Text node allocates nothing on the way through.
|
|
28
|
+
// Copy lazily: an op list with nothing to fill in keeps its identity, so a fully specified Text node allocates nothing.
|
|
53
29
|
if (!next)
|
|
54
30
|
next = ops.slice();
|
|
55
31
|
next[i] = patched;
|
|
56
32
|
}
|
|
57
33
|
return next ? graphics._withOps(next) : graphics;
|
|
58
34
|
}
|
|
59
|
-
/**
|
|
60
|
-
* The defaults one op inherits: its `variant`'s preset laid over the enclosing
|
|
61
|
-
* scope's.
|
|
62
|
-
*
|
|
63
|
-
* That order is the node ladder one level down — an explicit value beats a
|
|
64
|
-
* variant beats an inherited `<DefaultTextStyle>` — and it is why the merge is
|
|
65
|
-
* here rather than in the caller: the ambient scope is per *subtree* while a
|
|
66
|
-
* variant is per *op*, so they cannot be flattened before the walk.
|
|
67
|
-
*/
|
|
35
|
+
/** The defaults one op inherits: its `variant`'s preset laid over the enclosing scope's (explicit beats variant beats inherited `<DefaultTextStyle>`). Merged here, not by the caller, because the ambient scope is per subtree while a variant is per op, so they can't be flattened before the walk. */
|
|
68
36
|
function effectiveStyle(variant, ambient) {
|
|
69
37
|
return textOps.mergeStyle(ambient, variant ? textOps.preset(variant) : undefined);
|
|
70
38
|
}
|
|
@@ -91,9 +59,7 @@ function patchRichText(op, style) {
|
|
|
91
59
|
function patchSpans(spans, style) {
|
|
92
60
|
if (!spans || spans.length === 0)
|
|
93
61
|
return null;
|
|
94
|
-
// A span has no autofit mode
|
|
95
|
-
// block — so an inherited `'autofit'` is skipped rather than written through
|
|
96
|
-
// as a bad number.
|
|
62
|
+
// A span has no autofit mode (it is sized by its block), so an inherited `'autofit'` is skipped rather than written through as a bad number.
|
|
97
63
|
const spanStyle = style.fontSize === "autofit" ? { ...style, fontSize: undefined } : style;
|
|
98
64
|
let next = null;
|
|
99
65
|
for (let i = 0; i < spans.length; i++) {
|