@motionscript/core 0.1.0 → 0.1.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -11,60 +11,23 @@ import { TextState } from "./descriptors/text.js";
|
|
|
11
11
|
import { TextBlockLayout } from "./text-layout.js";
|
|
12
12
|
import type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from "./render-context2d.js";
|
|
13
13
|
import type { NodeEffect } from "../attributes/shape/effects/union.js";
|
|
14
|
-
/**
|
|
15
|
-
* The base every {@link RenderContext2D} backend extends.
|
|
16
|
-
*
|
|
17
|
-
* It owns the parts of a render context that are the *same* whatever is being
|
|
18
|
-
* rasterized — the text-default stack, the node scope stack, disposal — plus
|
|
19
|
-
* the host-facing half of the surface (`execute`, `screenshot`, `unmount`),
|
|
20
|
-
* which the {@link RenderContext2D} interface deliberately leaves out because a
|
|
21
|
-
* node has no business driving a render pass from inside one.
|
|
22
|
-
*
|
|
23
|
-
* **`draw` is final by convention.** It resolves the ambient text defaults onto
|
|
24
|
-
* the op list and hands the result to {@link drawGraphics}, which is where a
|
|
25
|
-
* backend does its actual drawing. Owning that step here rather than in each
|
|
26
|
-
* backend is what keeps the real renderer and the precomp asset walk agreeing
|
|
27
|
-
* on which font an under-specified `text` op shapes with: a family that one
|
|
28
|
-
* resolves and the other does not is a font that never loads and glyphs that
|
|
29
|
-
* never paint.
|
|
30
|
-
*/
|
|
14
|
+
/** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */
|
|
31
15
|
export declare abstract class CanvasRenderContext2D implements RenderPass2D {
|
|
32
16
|
abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;
|
|
33
|
-
/**
|
|
34
|
-
* Defaults in effect for the current draw scope, innermost last. Each entry
|
|
35
|
-
* is **already merged** onto the one below it (see {@link pushTextStyle}), so
|
|
36
|
-
* the top of the stack is the effective style and reading it costs nothing.
|
|
37
|
-
*/
|
|
17
|
+
/** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */
|
|
38
18
|
private readonly textStyleStack;
|
|
39
|
-
/** See {@link RenderContext2D.pushTextStyle}. */
|
|
40
19
|
pushTextStyle(style: TextStyle | null): void;
|
|
41
|
-
/** Close the innermost scope opened by {@link pushTextStyle}. */
|
|
42
20
|
popTextStyle(): void;
|
|
43
|
-
/**
|
|
44
|
-
* The text-style defaults in effect right now — the innermost
|
|
45
|
-
* {@link pushTextStyle} scope, or the project's `theme.typography.default`
|
|
46
|
-
* when no scope is open.
|
|
47
|
-
*
|
|
48
|
-
* Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a
|
|
49
|
-
* `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`
|
|
50
|
-
* stay a node-level concern.
|
|
51
|
-
*/
|
|
21
|
+
/** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */
|
|
52
22
|
get defaultTextStyle(): TextStyle;
|
|
53
23
|
/** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */
|
|
54
24
|
draw(graphics: Graphics2D): void;
|
|
55
25
|
/** Paint a `Graphics2D` whose text ops have already been resolved against the
|
|
56
26
|
* ambient defaults. Backends implement this instead of {@link draw}. */
|
|
57
27
|
protected abstract drawGraphics(graphics: Graphics2D): void;
|
|
58
|
-
/**
|
|
59
|
-
* See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,
|
|
60
|
-
* and `null` by default, so a backend that has no need to report glyph
|
|
61
|
-
* positions is unaffected — the only thing it gives up is on-canvas text
|
|
62
|
-
* editing in a host built on it.
|
|
63
|
-
*/
|
|
28
|
+
/** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */
|
|
64
29
|
layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;
|
|
65
|
-
/** Stack of node ids currently being drawn, innermost last. */
|
|
66
30
|
protected currentNodeStack: string[];
|
|
67
|
-
/** Returns the id of the innermost node currently being drawn. */
|
|
68
31
|
protected currentNodeId(): string;
|
|
69
32
|
/** Remove all renderer-side resources for the current node (called on unmount). */
|
|
70
33
|
abstract unmount(): void;
|
|
@@ -72,19 +35,9 @@ export declare abstract class CanvasRenderContext2D implements RenderPass2D {
|
|
|
72
35
|
/** `true` after `dispose()` — the context must not be used after this point. */
|
|
73
36
|
isDisposed(): boolean;
|
|
74
37
|
dispose(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Execute `callback`, which issues shape/paint calls, and flush the result
|
|
77
|
-
* to the underlying render target (canvas, SVG document, etc.). A callback
|
|
78
|
-
* that throws still throws, and the next pass starts from a clean context.
|
|
79
|
-
*/
|
|
38
|
+
/** Runs `callback`, which issues shape/paint calls, then flushes to the render target. A throwing callback still throws, and the next pass starts clean. */
|
|
80
39
|
abstract execute(callback: () => void): void;
|
|
81
|
-
/**
|
|
82
|
-
* What the frames since the last call drew without failing but not as the
|
|
83
|
-
* document says (a blend mode the backend lacks, a shader that does not
|
|
84
|
-
* compile, a lost GPU device), once per kind, feature and node. The
|
|
85
|
-
* playback controller reports them as render errors; an export hands them
|
|
86
|
-
* to its `onIssue`. A bare string is a `shader` issue.
|
|
87
|
-
*/
|
|
40
|
+
/** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */
|
|
88
41
|
takeRenderIssues(): Array<RenderIssue | string>;
|
|
89
42
|
/** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */
|
|
90
43
|
abstract screenshot(): string | undefined;
|
|
@@ -108,30 +61,17 @@ export declare abstract class CanvasRenderContext2D implements RenderPass2D {
|
|
|
108
61
|
height: number;
|
|
109
62
|
}, lookAt: Vector2, zoom: number, heading: number): void;
|
|
110
63
|
abstract endCamera(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Per-node render state for each node on the draw stack, in push order
|
|
113
|
-
* (innermost last). Kept parallel to `currentNodeStack` so fills with
|
|
114
|
-
* `space: 'parent'` can resolve their reference rect and so
|
|
115
|
-
* motion-driven effects can read the current node's velocity.
|
|
116
|
-
*/
|
|
64
|
+
/** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */
|
|
117
65
|
protected renderStateStack: NodeRenderState[];
|
|
118
|
-
/** See {@link RenderContext2D.readsSpaceRects}. */
|
|
119
66
|
readonly readsSpaceRects: boolean;
|
|
120
|
-
/** See {@link RenderContext2D.drawsVisibleOnly}. */
|
|
121
67
|
readonly drawsVisibleOnly: boolean;
|
|
122
|
-
/** See {@link RenderPass2D.begin}. */
|
|
123
68
|
begin(state: NodeRenderState): void;
|
|
124
|
-
/** Close the innermost node draw scope opened by `begin()`. */
|
|
125
69
|
end(): void;
|
|
126
70
|
/** Reference rects for the node currently being drawn (parent / viewport). */
|
|
127
71
|
protected currentSpaceRects(): SpaceRects;
|
|
128
72
|
/** Full render state (incl. velocity) for the node currently being drawn, if any. */
|
|
129
73
|
protected currentRenderState(): NodeRenderState | undefined;
|
|
130
|
-
/**
|
|
131
|
-
* Close every node and text-style scope still open. A backend calls this
|
|
132
|
-
* when a pass ends, so a pass that threw cannot leave the next one inside
|
|
133
|
-
* its scopes.
|
|
134
|
-
*/
|
|
74
|
+
/** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */
|
|
135
75
|
protected _resetScopes(): void;
|
|
136
76
|
}
|
|
137
77
|
//# sourceMappingURL=canvas-render-context2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,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,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtI,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"canvas-render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,52 +1,17 @@
|
|
|
1
1
|
import { EMPTY_TEXT_STYLE, textOps } from "../attributes/text/ops.js";
|
|
2
2
|
import { applyGraphicsTextDefaults } from "./text-defaults.js";
|
|
3
|
-
/**
|
|
4
|
-
* The base every {@link RenderContext2D} backend extends.
|
|
5
|
-
*
|
|
6
|
-
* It owns the parts of a render context that are the *same* whatever is being
|
|
7
|
-
* rasterized — the text-default stack, the node scope stack, disposal — plus
|
|
8
|
-
* the host-facing half of the surface (`execute`, `screenshot`, `unmount`),
|
|
9
|
-
* which the {@link RenderContext2D} interface deliberately leaves out because a
|
|
10
|
-
* node has no business driving a render pass from inside one.
|
|
11
|
-
*
|
|
12
|
-
* **`draw` is final by convention.** It resolves the ambient text defaults onto
|
|
13
|
-
* the op list and hands the result to {@link drawGraphics}, which is where a
|
|
14
|
-
* backend does its actual drawing. Owning that step here rather than in each
|
|
15
|
-
* backend is what keeps the real renderer and the precomp asset walk agreeing
|
|
16
|
-
* on which font an under-specified `text` op shapes with: a family that one
|
|
17
|
-
* resolves and the other does not is a font that never loads and glyphs that
|
|
18
|
-
* never paint.
|
|
19
|
-
*/
|
|
3
|
+
/** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */
|
|
20
4
|
export class CanvasRenderContext2D {
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
// map, applied once when the node binds. A raw `Graphics2D` has no node to
|
|
24
|
-
// bind, so it inherits the same defaults here instead — pushed around a
|
|
25
|
-
// subtree's draw scope, and folded into each `text`/`richText` op by
|
|
26
|
-
// `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.
|
|
27
|
-
/**
|
|
28
|
-
* Defaults in effect for the current draw scope, innermost last. Each entry
|
|
29
|
-
* is **already merged** onto the one below it (see {@link pushTextStyle}), so
|
|
30
|
-
* the top of the stack is the effective style and reading it costs nothing.
|
|
31
|
-
*/
|
|
5
|
+
// Inherited text-style defaults (see RenderContext2D.pushTextStyle).
|
|
6
|
+
/** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */
|
|
32
7
|
textStyleStack = [];
|
|
33
|
-
/** See {@link RenderContext2D.pushTextStyle}. */
|
|
34
8
|
pushTextStyle(style) {
|
|
35
9
|
this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));
|
|
36
10
|
}
|
|
37
|
-
/** Close the innermost scope opened by {@link pushTextStyle}. */
|
|
38
11
|
popTextStyle() {
|
|
39
12
|
this.textStyleStack.pop();
|
|
40
13
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The text-style defaults in effect right now — the innermost
|
|
43
|
-
* {@link pushTextStyle} scope, or the project's `theme.typography.default`
|
|
44
|
-
* when no scope is open.
|
|
45
|
-
*
|
|
46
|
-
* Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a
|
|
47
|
-
* `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`
|
|
48
|
-
* stay a node-level concern.
|
|
49
|
-
*/
|
|
14
|
+
/** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */
|
|
50
15
|
get defaultTextStyle() {
|
|
51
16
|
return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset("default");
|
|
52
17
|
}
|
|
@@ -54,18 +19,11 @@ export class CanvasRenderContext2D {
|
|
|
54
19
|
draw(graphics) {
|
|
55
20
|
this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));
|
|
56
21
|
}
|
|
57
|
-
/**
|
|
58
|
-
* See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,
|
|
59
|
-
* and `null` by default, so a backend that has no need to report glyph
|
|
60
|
-
* positions is unaffected — the only thing it gives up is on-canvas text
|
|
61
|
-
* editing in a host built on it.
|
|
62
|
-
*/
|
|
22
|
+
/** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */
|
|
63
23
|
layoutTextBlock(state) {
|
|
64
24
|
return null;
|
|
65
25
|
}
|
|
66
|
-
/** Stack of node ids currently being drawn, innermost last. */
|
|
67
26
|
currentNodeStack = [];
|
|
68
|
-
/** Returns the id of the innermost node currently being drawn. */
|
|
69
27
|
currentNodeId() {
|
|
70
28
|
if (this.currentNodeStack.length === 0) {
|
|
71
29
|
throw new Error("No current node in context");
|
|
@@ -80,13 +38,7 @@ export class CanvasRenderContext2D {
|
|
|
80
38
|
dispose() {
|
|
81
39
|
this._disposed = true;
|
|
82
40
|
}
|
|
83
|
-
/**
|
|
84
|
-
* What the frames since the last call drew without failing but not as the
|
|
85
|
-
* document says (a blend mode the backend lacks, a shader that does not
|
|
86
|
-
* compile, a lost GPU device), once per kind, feature and node. The
|
|
87
|
-
* playback controller reports them as render errors; an export hands them
|
|
88
|
-
* to its `onIssue`. A bare string is a `shader` issue.
|
|
89
|
-
*/
|
|
41
|
+
/** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */
|
|
90
42
|
takeRenderIssues() {
|
|
91
43
|
return [];
|
|
92
44
|
}
|
|
@@ -97,23 +49,14 @@ export class CanvasRenderContext2D {
|
|
|
97
49
|
rasterize(width, height, draw, pixelRatio) {
|
|
98
50
|
return null;
|
|
99
51
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Per-node render state for each node on the draw stack, in push order
|
|
102
|
-
* (innermost last). Kept parallel to `currentNodeStack` so fills with
|
|
103
|
-
* `space: 'parent'` can resolve their reference rect and so
|
|
104
|
-
* motion-driven effects can read the current node's velocity.
|
|
105
|
-
*/
|
|
52
|
+
/** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */
|
|
106
53
|
renderStateStack = [];
|
|
107
|
-
/** See {@link RenderContext2D.readsSpaceRects}. */
|
|
108
54
|
readsSpaceRects = true;
|
|
109
|
-
/** See {@link RenderContext2D.drawsVisibleOnly}. */
|
|
110
55
|
drawsVisibleOnly = true;
|
|
111
|
-
/** See {@link RenderPass2D.begin}. */
|
|
112
56
|
begin(state) {
|
|
113
57
|
this.currentNodeStack.push(state.id);
|
|
114
58
|
this.renderStateStack.push(state);
|
|
115
59
|
}
|
|
116
|
-
/** Close the innermost node draw scope opened by `begin()`. */
|
|
117
60
|
end() {
|
|
118
61
|
this.currentNodeStack.pop();
|
|
119
62
|
this.renderStateStack.pop();
|
|
@@ -126,11 +69,7 @@ export class CanvasRenderContext2D {
|
|
|
126
69
|
currentRenderState() {
|
|
127
70
|
return this.renderStateStack[this.renderStateStack.length - 1];
|
|
128
71
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Close every node and text-style scope still open. A backend calls this
|
|
131
|
-
* when a pass ends, so a pass that threw cannot leave the next one inside
|
|
132
|
-
* its scopes.
|
|
133
|
-
*/
|
|
72
|
+
/** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */
|
|
134
73
|
_resetScopes() {
|
|
135
74
|
this.textStyleStack.length = 0;
|
|
136
75
|
this.currentNodeStack.length = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"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","sourcesContent":["import { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { RenderIssue } from \"./render-issue\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport { TextState } from \"./descriptors/text\";\nimport { TextBlockLayout } from \"./text-layout\";\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\n\n/**\n * The base every {@link RenderContext2D} backend extends.\n *\n * It owns the parts of a render context that are the *same* whatever is being\n * rasterized — the text-default stack, the node scope stack, disposal — plus\n * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),\n * which the {@link RenderContext2D} interface deliberately leaves out because a\n * node has no business driving a render pass from inside one.\n *\n * **`draw` is final by convention.** It resolves the ambient text defaults onto\n * the op list and hands the result to {@link drawGraphics}, which is where a\n * backend does its actual drawing. Owning that step here rather than in each\n * backend is what keeps the real renderer and the precomp asset walk agreeing\n * on which font an under-specified `text` op shapes with: a family that one\n * resolves and the other does not is a font that never loads and glyphs that\n * never paint.\n */\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): 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 * Defaults in effect for the current draw scope, innermost last. Each entry\n * is **already merged** onto the one below it (see {@link pushTextStyle}), so\n * the top of the stack is the effective style and reading it costs nothing.\n */\n private readonly textStyleStack: TextStyle[] = [];\n\n /** See {@link RenderContext2D.pushTextStyle}. */\n pushTextStyle(style: TextStyle | null): void {\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\n }\n\n /** Close the innermost scope opened by {@link pushTextStyle}. */\n popTextStyle(): void {\n this.textStyleStack.pop();\n }\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.\n *\n * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a\n * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`\n * stay a node-level concern.\n */\n get defaultTextStyle(): TextStyle {\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\n }\n\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\n draw(graphics: Graphics2D): void {\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\n }\n\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\n * ambient defaults. Backends implement this instead of {@link draw}. */\n protected abstract drawGraphics(graphics: Graphics2D): void;\n\n /**\n * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,\n * and `null` by default, so a backend that has no need to report glyph\n * positions is unaffected — the only thing it gives up is on-canvas text\n * editing in a host built on it.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\n return null;\n }\n\n /** Stack of node ids currently being drawn, innermost last. */\n protected currentNodeStack: string[] = [];\n\n /** Returns the id of the innermost node currently being drawn. */\n protected currentNodeId(): string {\n if (this.currentNodeStack.length === 0) {\n throw new Error(\"No current node in context\");\n }\n\n return this.currentNodeStack[this.currentNodeStack.length - 1];\n }\n\n /** Remove all renderer-side resources for the current node (called on unmount). */\n abstract unmount(): void;\n\n private _disposed = false;\n /** `true` after `dispose()` — the context must not be used after this point. */\n isDisposed(): boolean {\n return this._disposed;\n }\n dispose(): void {\n this._disposed = true;\n }\n\n /**\n * Execute `callback`, which issues shape/paint calls, and flush the result\n * to the underlying render target (canvas, SVG document, etc.). A callback\n * that throws still throws, and the next pass starts from a clean context.\n */\n abstract execute(callback: () => void): void;\n /**\n * What the frames since the last call drew without failing but not as the\n * document says (a blend mode the backend lacks, a shader that does not\n * compile, a lost GPU device), once per kind, feature and node. The\n * playback controller reports them as render errors; an export hands them\n * to its `onIssue`. A bare string is a `shader` issue.\n */\n takeRenderIssues(): Array<RenderIssue | string> {\n return [];\n }\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\n abstract screenshot(): string | undefined;\n\n abstract transform(state: Partial<TransformState>): RenderContext2D;\n\n abstract beginBoolean(op: BooleanOperation): void;\n abstract endBoolean(): void;\n\n abstract beginMask(options?: MaskOptions): void;\n abstract applyMask(): void;\n abstract endMask(): void;\n\n abstract beginClip(clip: Clip): void;\n abstract endClip(): void;\n\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\n endEffects(): void { }\n\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null {\n return null;\n }\n\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n abstract endCamera(): void;\n\n /**\n * Per-node render state for each node on the draw stack, in push order\n * (innermost last). Kept parallel to `currentNodeStack` so fills with\n * `space: 'parent'` can resolve their reference rect and so\n * motion-driven effects can read the current node's velocity.\n */\n protected renderStateStack: NodeRenderState[] = [];\n\n /** See {@link RenderContext2D.readsSpaceRects}. */\n readonly readsSpaceRects: boolean = true;\n\n /** See {@link RenderContext2D.drawsVisibleOnly}. */\n readonly drawsVisibleOnly: boolean = true;\n\n /** See {@link RenderPass2D.begin}. */\n begin(state: NodeRenderState): void {\n this.currentNodeStack.push(state.id);\n this.renderStateStack.push(state);\n }\n\n /** Close the innermost node draw scope opened by `begin()`. */\n end(): void {\n this.currentNodeStack.pop();\n this.renderStateStack.pop();\n }\n\n /** Reference rects for the node currently being drawn (parent / viewport). */\n protected currentSpaceRects(): SpaceRects {\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\n }\n\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\n protected currentRenderState(): NodeRenderState | undefined {\n return this.renderStateStack[this.renderStateStack.length - 1];\n }\n\n /**\n * Close every node and text-style scope still open. A backend calls this\n * when a pass ends, so a pass that threw cannot leave the next one inside\n * its scopes.\n */\n protected _resetScopes(): void {\n this.textStyleStack.length = 0;\n this.currentNodeStack.length = 0;\n this.renderStateStack.length = 0;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"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","sourcesContent":["import { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { RenderIssue } from \"./render-issue\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport { TextState } from \"./descriptors/text\";\nimport { TextBlockLayout } from \"./text-layout\";\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\n\n/** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;\n\n // Inherited text-style defaults (see RenderContext2D.pushTextStyle).\n\n /** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */\n private readonly textStyleStack: TextStyle[] = [];\n\n pushTextStyle(style: TextStyle | null): void {\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\n }\n\n popTextStyle(): void {\n this.textStyleStack.pop();\n }\n\n /** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */\n get defaultTextStyle(): TextStyle {\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\n }\n\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\n draw(graphics: Graphics2D): void {\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\n }\n\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\n * ambient defaults. Backends implement this instead of {@link draw}. */\n protected abstract drawGraphics(graphics: Graphics2D): void;\n\n /** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\n return null;\n }\n\n protected currentNodeStack: string[] = [];\n\n protected currentNodeId(): string {\n if (this.currentNodeStack.length === 0) {\n throw new Error(\"No current node in context\");\n }\n\n return this.currentNodeStack[this.currentNodeStack.length - 1];\n }\n\n /** Remove all renderer-side resources for the current node (called on unmount). */\n abstract unmount(): void;\n\n private _disposed = false;\n /** `true` after `dispose()` — the context must not be used after this point. */\n isDisposed(): boolean {\n return this._disposed;\n }\n dispose(): void {\n this._disposed = true;\n }\n\n /** Runs `callback`, which issues shape/paint calls, then flushes to the render target. A throwing callback still throws, and the next pass starts clean. */\n abstract execute(callback: () => void): void;\n /** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */\n takeRenderIssues(): Array<RenderIssue | string> {\n return [];\n }\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\n abstract screenshot(): string | undefined;\n\n abstract transform(state: Partial<TransformState>): RenderContext2D;\n\n abstract beginBoolean(op: BooleanOperation): void;\n abstract endBoolean(): void;\n\n abstract beginMask(options?: MaskOptions): void;\n abstract applyMask(): void;\n abstract endMask(): void;\n\n abstract beginClip(clip: Clip): void;\n abstract endClip(): void;\n\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\n endEffects(): void { }\n\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null {\n return null;\n }\n\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n abstract endCamera(): void;\n\n /** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */\n protected renderStateStack: NodeRenderState[] = [];\n\n readonly readsSpaceRects: boolean = true;\n\n readonly drawsVisibleOnly: boolean = true;\n\n begin(state: NodeRenderState): void {\n this.currentNodeStack.push(state.id);\n this.renderStateStack.push(state);\n }\n\n end(): void {\n this.currentNodeStack.pop();\n this.renderStateStack.pop();\n }\n\n /** Reference rects for the node currently being drawn (parent / viewport). */\n protected currentSpaceRects(): SpaceRects {\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\n }\n\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\n protected currentRenderState(): NodeRenderState | undefined {\n return this.renderStateStack[this.renderStateStack.length - 1];\n }\n\n /** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */\n protected _resetScopes(): void {\n this.textStyleStack.length = 0;\n this.currentNodeStack.length = 0;\n this.renderStateStack.length = 0;\n }\n}\n"]}
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { Vector2 } from "../attributes/layout/vector2.js";
|
|
2
2
|
import { Clip, ClipOp } from "./clip.js";
|
|
3
|
-
/**
|
|
4
|
-
* Whether `point` falls inside the region a {@link Clip} describes, within
|
|
5
|
-
* `tolerance` scene units of its edge.
|
|
6
|
-
*
|
|
7
|
-
* Shape ops union; a `cut` subtracts the immediately preceding shape from
|
|
8
|
-
* everything declared before it, mirroring how the renderer replays the op list.
|
|
9
|
-
* `tolerance` widens each shape outward — including a cutter, which therefore
|
|
10
|
-
* takes a slightly larger bite, keeping the test forgiving in both directions
|
|
11
|
-
* rather than making a hole's rim unpickable.
|
|
12
|
-
*/
|
|
3
|
+
/** Whether `point` is inside the region a {@link Clip} describes, within `tolerance` scene units of its edge. Shape ops union; a `cut` subtracts the preceding shape from everything before it, as the renderer replays. `tolerance` widens each shape outward, a cutter included (a slightly larger bite), keeping the test forgiving rather than making a hole's rim unpickable. */
|
|
13
4
|
export declare function containsClip(clip: Clip, point: Vector2, tolerance?: number): boolean;
|
|
14
|
-
/** {@link containsClip} over a raw op list. */
|
|
15
5
|
export declare function containsOps(ops: readonly ClipOp[], point: Vector2, tolerance?: number): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Vertices of a regular polygon inscribed in `width`×`height`, y-up author
|
|
18
|
-
* space. The renderer starts at the top vertex and steps clockwise in canvas
|
|
19
|
-
* space; in y-up that is `+π/2` stepping negative.
|
|
20
|
-
*/
|
|
6
|
+
/** Vertices of a regular polygon inscribed in `width` x `height`, y-up. The renderer starts at the top vertex and steps clockwise in canvas space; in y-up that is `+π/2` stepping negative. */
|
|
21
7
|
export declare function polygonVertices(width: number, height: number, sides: number): Vector2[];
|
|
22
8
|
/** Vertices of a star polygon: outer radius 1 alternating with inner radius `ratio`. */
|
|
23
9
|
export declare function polygramVertices(width: number, height: number, sides: number, ratio: number): Vector2[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip-contains.d.ts","sourceRoot":"","sources":["../../src/render/clip-contains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"clip-contains.d.ts","sourceRoot":"","sources":["../../src/render/clip-contains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAkBnD,sXAAsX;AACtX,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAE/E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAsB1F;AAmJD,gMAAgM;AAChM,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAWvF;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAavG;AAQD,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAW7E;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAQ7G;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAQ5E"}
|
|
@@ -5,40 +5,20 @@ import { withPolygramDescriptor } from "./descriptors/polygram.js";
|
|
|
5
5
|
import { withLineDescriptor } from "./descriptors/line.js";
|
|
6
6
|
import { cornerRadiusOps } from "../attributes/shape/corners/corner-radius.js";
|
|
7
7
|
/**
|
|
8
|
-
* Point-in-region tests for {@link Clip},
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* record of primitives rather than a built path. That is what lets hit testing
|
|
13
|
-
* live in `core` and share one outline definition with clipping and backdrop
|
|
14
|
-
* effects: a shape declares its outline once, in `clipSelf()`, and both the
|
|
15
|
-
* pixels and the grab region derive from it.
|
|
16
|
-
*
|
|
17
|
-
* Every point and every descriptor coordinate here is in **y-up author space**
|
|
18
|
-
* (the space `Graphics2D`/`Clip` descriptors are written in; the renderer flips to
|
|
19
|
-
* canvas y-down at draw time — see `flipPositionY`). Angles follow from that:
|
|
8
|
+
* Point-in-region tests for {@link Clip}, so a click follows a shape's silhouette rather than its bounding box.
|
|
9
|
+
* Geometry only, since a `Clip` is a declarative record of primitives rather than a built path: a shape declares its
|
|
10
|
+
* outline once in `clipSelf()` and both the pixels and the grab region derive from it. Points and descriptor
|
|
11
|
+
* coordinates are **y-up author space** (the renderer flips at draw time, see `flipPositionY`), so
|
|
20
12
|
* `startAngle`/`sweep` measure counter-clockwise from +x.
|
|
21
13
|
*/
|
|
22
|
-
/** Guard against divide-by-zero on collapsed geometry. */
|
|
23
14
|
const EPS = 1e-9;
|
|
24
|
-
/**
|
|
25
|
-
* Whether `point` falls inside the region a {@link Clip} describes, within
|
|
26
|
-
* `tolerance` scene units of its edge.
|
|
27
|
-
*
|
|
28
|
-
* Shape ops union; a `cut` subtracts the immediately preceding shape from
|
|
29
|
-
* everything declared before it, mirroring how the renderer replays the op list.
|
|
30
|
-
* `tolerance` widens each shape outward — including a cutter, which therefore
|
|
31
|
-
* takes a slightly larger bite, keeping the test forgiving in both directions
|
|
32
|
-
* rather than making a hole's rim unpickable.
|
|
33
|
-
*/
|
|
15
|
+
/** Whether `point` is inside the region a {@link Clip} describes, within `tolerance` scene units of its edge. Shape ops union; a `cut` subtracts the preceding shape from everything before it, as the renderer replays. `tolerance` widens each shape outward, a cutter included (a slightly larger bite), keeping the test forgiving rather than making a hole's rim unpickable. */
|
|
34
16
|
export function containsClip(clip, point, tolerance = 0) {
|
|
35
17
|
return containsOps(clip.ops(), point, tolerance);
|
|
36
18
|
}
|
|
37
|
-
/** {@link containsClip} over a raw op list. */
|
|
38
19
|
export function containsOps(ops, point, tolerance = 0) {
|
|
39
20
|
let inside = false;
|
|
40
|
-
//
|
|
41
|
-
// following `cut` can subtract it instead of unioning it.
|
|
21
|
+
// Held back so a following `cut` can subtract it instead of unioning it.
|
|
42
22
|
let pending = null;
|
|
43
23
|
const flush = () => {
|
|
44
24
|
if (pending && containsShape(pending, point, tolerance))
|
|
@@ -47,8 +27,7 @@ export function containsOps(ops, point, tolerance = 0) {
|
|
|
47
27
|
};
|
|
48
28
|
for (const op of ops) {
|
|
49
29
|
if (op.kind === "cut") {
|
|
50
|
-
// The pending shape is the cutter: it never joins the union
|
|
51
|
-
// punches whatever was accumulated before it.
|
|
30
|
+
// The pending shape is the cutter: it never joins the union and punches what came before.
|
|
52
31
|
if (pending && containsShape(pending, point, tolerance))
|
|
53
32
|
inside = false;
|
|
54
33
|
pending = null;
|
|
@@ -60,11 +39,7 @@ export function containsOps(ops, point, tolerance = 0) {
|
|
|
60
39
|
flush();
|
|
61
40
|
return inside;
|
|
62
41
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Dispatch one shape op to its own containment test, after undoing the shape's
|
|
65
|
-
* local rotation/scale about its pivot — mirroring `BaseShape.applyShapeTransform`,
|
|
66
|
-
* which bakes that same transform into the drawn path.
|
|
67
|
-
*/
|
|
42
|
+
/** Dispatches a shape op to its containment test after undoing its local rotation/scale about its pivot, mirroring `BaseShape.applyShapeTransform`. */
|
|
68
43
|
function containsShape(op, point, tolerance) {
|
|
69
44
|
switch (op.kind) {
|
|
70
45
|
case "rect": {
|
|
@@ -92,37 +67,27 @@ function containsShape(op, point, tolerance) {
|
|
|
92
67
|
const p = toShapeLocal(point, s, s.width, s.height);
|
|
93
68
|
if (p === null || s.points.length === 0)
|
|
94
69
|
return false;
|
|
95
|
-
// As a clip region a polyline is filled with its contour implicitly
|
|
96
|
-
// closed, whether or not `closed` was set — so test the enclosed area
|
|
97
|
-
// first, then fall back to the band around the stroke itself.
|
|
70
|
+
// As a clip region a polyline is filled with its contour implicitly closed, so test the enclosed area first, then the band around the stroke.
|
|
98
71
|
if (s.points.length >= 3 && containsPolyline(p, s.points, true, tolerance))
|
|
99
72
|
return true;
|
|
100
73
|
return nearPolyline(p, s.points, s.closed, tolerance);
|
|
101
74
|
}
|
|
102
75
|
case "path": {
|
|
103
|
-
//
|
|
104
|
-
// built-in shape emits a `path` clip — only a hand-built `Clip` can.
|
|
105
|
-
// Fall back to the declared box.
|
|
76
|
+
// A Bézier winding test isn't worth carrying and no built-in shape emits a `path` clip, only a hand-built `Clip`; fall back to the declared box.
|
|
106
77
|
const s = op.state;
|
|
107
78
|
const local = { x: point.x - (s.x ?? 0), y: point.y - (s.y ?? 0) };
|
|
108
79
|
return containsRect(local, s.width ?? 0, s.height ?? 0, cornerRadiusOps.resolve(0), tolerance);
|
|
109
80
|
}
|
|
110
81
|
}
|
|
111
82
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Map `point` out of the shape's own `x`/`y`/`rotation`/`scale` (about its
|
|
114
|
-
* pivot) and into the shape's un-transformed, centred frame. Returns `null` when
|
|
115
|
-
* the scale is zero — the shape has collapsed and encloses nothing.
|
|
116
|
-
*/
|
|
83
|
+
/** Maps `point` out of the shape's `x`/`y`/`rotation`/`scale` (about its pivot) into its un-transformed, centred frame; `null` when scale is zero (collapsed, encloses nothing). */
|
|
117
84
|
function toShapeLocal(point, s, width, height) {
|
|
118
85
|
if (s.scale === 0)
|
|
119
86
|
return null;
|
|
120
87
|
const pivot = s.pivot;
|
|
121
|
-
// Pivot is normalised [-1, 1] about the
|
|
122
|
-
// renderer negates its y because it works in canvas space).
|
|
88
|
+
// Pivot is normalised [-1, 1] about the centre, y-up here (the renderer negates y in canvas space).
|
|
123
89
|
const px = pivot.x * (width / 2);
|
|
124
90
|
const py = pivot.y * (height / 2);
|
|
125
|
-
// Relative to the pivot, in the parent's (unrotated) frame.
|
|
126
91
|
const dx = point.x - (s.x + px);
|
|
127
92
|
const dy = point.y - (s.y + py);
|
|
128
93
|
// Undo the clockwise rotation: in y-up space the forward map is
|
|
@@ -132,31 +97,22 @@ function toShapeLocal(point, s, width, height) {
|
|
|
132
97
|
const sin = Math.sin(rad);
|
|
133
98
|
const rx = (cos * dx - sin * dy) / s.scale;
|
|
134
99
|
const ry = (sin * dx + cos * dy) / s.scale;
|
|
135
|
-
// Back to centre-relative: the pivot sits (px, py) from the centre.
|
|
136
100
|
return { x: rx + px, y: ry + py };
|
|
137
101
|
}
|
|
138
|
-
/**
|
|
139
|
-
* Axis-aligned box centred on the origin, with per-corner rounding. A corner is
|
|
140
|
-
* only excluded when the point sits beyond that corner's quarter-circle, so a
|
|
141
|
-
* plain rect (all radii 0) reduces to the box test exactly. `cornerStyle` is not
|
|
142
|
-
* consulted: an `'angled'` chamfer cuts strictly inside the arc, so testing the
|
|
143
|
-
* arc over-estimates by a sliver — the forgiving direction for a grab test.
|
|
144
|
-
*/
|
|
102
|
+
/** Box centred on the origin with per-corner rounding; a corner excludes the point only beyond its quarter-circle, so a plain rect reduces to the box test. `cornerStyle` is ignored: an `'angled'` chamfer cuts inside the arc, so the arc over-estimates by a sliver, the forgiving direction for a grab. */
|
|
145
103
|
function containsRect(p, width, height, radius, tolerance) {
|
|
146
104
|
const halfW = width / 2 + tolerance;
|
|
147
105
|
const halfH = height / 2 + tolerance;
|
|
148
106
|
if (Math.abs(p.x) > halfW || Math.abs(p.y) > halfH)
|
|
149
107
|
return false;
|
|
150
|
-
//
|
|
151
|
-
// the way any rounded-rect rasteriser clamps them: never past half the side.
|
|
108
|
+
// Test the nearest corner's arc; radii clamp to half the side as any rounded-rect rasteriser clamps them.
|
|
152
109
|
const maxR = Math.min(width, height) / 2;
|
|
153
110
|
const r = Math.min(maxR, p.x <= 0
|
|
154
111
|
? (p.y >= 0 ? radius.topLeft : radius.bottomLeft)
|
|
155
112
|
: (p.y >= 0 ? radius.topRight : radius.bottomRight));
|
|
156
113
|
if (r <= 0)
|
|
157
114
|
return true;
|
|
158
|
-
// Centre of that corner's arc, then the
|
|
159
|
-
// check — which only bites inside the corner square itself.
|
|
115
|
+
// Centre of that corner's arc, then the "outside the quarter-circle" check, which only bites inside the corner square.
|
|
160
116
|
const sx = Math.sign(p.x || 1);
|
|
161
117
|
const sy = Math.sign(p.y || 1);
|
|
162
118
|
const dx = p.x - sx * (width / 2 - r);
|
|
@@ -166,14 +122,9 @@ function containsRect(p, width, height, radius, tolerance) {
|
|
|
166
122
|
return dx * dx + dy * dy <= (r + tolerance) * (r + tolerance);
|
|
167
123
|
}
|
|
168
124
|
/**
|
|
169
|
-
* Ellipse
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* - `ratio` ≤ 0 → solid disk, or a wedge for a partial sweep
|
|
174
|
-
* - 0 < `ratio` < 1 → annulus / annular sector (the hole is not hittable)
|
|
175
|
-
* - `ratio` ≥ 1 → the band has collapsed to the bare outer curve, so only
|
|
176
|
-
* points near that curve hit
|
|
125
|
+
* Ellipse with the `ratio`/`sweep`/`startAngle` family the renderer draws (see `EllipseShape.buildSVGPath`), so the
|
|
126
|
+
* grab region is what was painted: `ratio` <= 0 is a disk (or wedge for a partial sweep); 0 < `ratio` < 1 an annulus /
|
|
127
|
+
* annular sector (the hole is not hittable); `ratio` >= 1 collapses to the bare outer curve, hit only near it.
|
|
177
128
|
*/
|
|
178
129
|
function containsEllipse(p, width, height, ratio, sweep, startAngle, tolerance) {
|
|
179
130
|
const rx = width / 2;
|
|
@@ -198,11 +149,7 @@ function containsEllipse(p, width, height, ratio, sweep, startAngle, tolerance)
|
|
|
198
149
|
function norm(p, rx, ry) {
|
|
199
150
|
return Math.hypot(p.x / rx, p.y / ry);
|
|
200
151
|
}
|
|
201
|
-
/**
|
|
202
|
-
* Whether `angleDeg` lies within the arc `[startAngle, startAngle + sweep]`,
|
|
203
|
-
* with `tolerance` converted to angular slack at the point's own radius so
|
|
204
|
-
* grab-slop widens the wedge's straight edges too. Handles negative sweeps.
|
|
205
|
-
*/
|
|
152
|
+
/** Whether `angleDeg` is in the arc `[startAngle, startAngle + sweep]` (negative sweeps handled), with `tolerance` converted to angular slack at the point's radius so grab-slop widens the wedge's straight edges too. */
|
|
206
153
|
function withinSweep(angleDeg, startAngle, sweep, p, tolerance) {
|
|
207
154
|
const lo = sweep >= 0 ? startAngle : startAngle + sweep;
|
|
208
155
|
const span = Math.abs(sweep);
|
|
@@ -217,11 +164,7 @@ function withinSweep(angleDeg, startAngle, sweep, p, tolerance) {
|
|
|
217
164
|
// Accept the wrap-around side within slack as well.
|
|
218
165
|
return delta <= span + slack || delta >= 360 - slack;
|
|
219
166
|
}
|
|
220
|
-
/**
|
|
221
|
-
* Vertices of a regular polygon inscribed in `width`×`height`, y-up author
|
|
222
|
-
* space. The renderer starts at the top vertex and steps clockwise in canvas
|
|
223
|
-
* space; in y-up that is `+π/2` stepping negative.
|
|
224
|
-
*/
|
|
167
|
+
/** Vertices of a regular polygon inscribed in `width` x `height`, y-up. The renderer starts at the top vertex and steps clockwise in canvas space; in y-up that is `+π/2` stepping negative. */
|
|
225
168
|
export function polygonVertices(width, height, sides) {
|
|
226
169
|
const n = Math.max(3, Math.round(sides));
|
|
227
170
|
const rx = width / 2;
|
|
@@ -249,11 +192,7 @@ export function polygramVertices(width, height, sides, ratio) {
|
|
|
249
192
|
}
|
|
250
193
|
return out;
|
|
251
194
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Even-odd crossing test against a polygon, widened by `tolerance`: a point just
|
|
254
|
-
* outside an edge still counts. `closed` also closes the last→first segment for
|
|
255
|
-
* the tolerance band.
|
|
256
|
-
*/
|
|
195
|
+
/** Even-odd crossing test against a polygon, widened by `tolerance` (a point just outside an edge counts). `closed` also closes the last-to-first segment for the tolerance band. */
|
|
257
196
|
function containsPolyline(p, verts, closed, tolerance) {
|
|
258
197
|
if (verts.length >= 3 && pointInPolygon(p, verts))
|
|
259
198
|
return true;
|