@motionscript/core 0.1.0-alpha.0 → 0.1.0-alpha.10
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 +356 -0
- package/NOTICE +49 -0
- package/README.md +29 -10
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +7 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +99 -15
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/scope.d.ts +4 -4
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +52 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +10 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +26 -24
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +51 -30
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +18 -13
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +13 -11
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +8 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +7 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +1 -1
- package/dist/attributes/layout/size.js +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +56 -12
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +59 -19
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +27 -141
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +24 -106
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +117 -522
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +102 -364
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +98 -28
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +21 -7
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +82 -34
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +57 -34
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +6 -8
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +34 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +157 -112
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +102 -50
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +2 -2
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +9 -1
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +12 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +7 -17
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +3 -19
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
- 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/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +3 -3
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +6 -6
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +12 -13
- 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.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +1 -2
- 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/shaders/index.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- package/dist/attributes/shape/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js +2 -0
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js +3 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +5 -5
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -19
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -19
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.d.ts +5 -5
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.js +4 -15
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.d.ts +1 -1
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.js +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.d.ts +10 -12
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.js +10 -12
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.d.ts +2 -2
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.js +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +453 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.d.ts +4 -4
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.js +3 -4
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.d.ts +2 -2
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.js +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.d.ts +3 -3
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.js +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-render.js +10 -23
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.d.ts +3 -3
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.js +4 -4
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.d.ts +2 -2
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.js +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.d.ts +206 -185
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.js +296 -324
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.d.ts +25 -15
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.js +30 -35
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.d.ts +9 -10
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.js +16 -13
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.d.ts +3 -3
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.js +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.d.ts +1 -1
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.js +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node.d.ts +46 -82
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node.js +89 -114
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.d.ts +16 -15
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.js +40 -85
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.d.ts +65 -25
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.js +78 -76
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +18 -42
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +23 -5
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +72 -10
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +2 -2
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +10 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +6 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-decorator.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +32 -3
- 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 +71 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +4 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +71 -44
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +94 -35
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +57 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +264 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +145 -20
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +478 -80
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +30 -44
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +20 -8
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +195 -52
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +82 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +34 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +26 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +6 -1
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +29 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +84 -0
- package/dist/props/layout.js.map +1 -0
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +19 -3
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +20 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -9
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +11 -5
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/render-context2d.d.ts +8 -8
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- package/dist/render/surface.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +21 -23
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +85 -34
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/resources.d.ts +2 -2
- package/dist/render3d/resources.js +2 -2
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- 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 +12 -1
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +40 -7
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +11 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +20 -3
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +29 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -19
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +13 -6
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +34 -12
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +20 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +132 -27
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +13 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +6 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +45 -4
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +127 -13
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +14 -6
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +32 -3
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +78 -11
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +16 -10
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +23 -8
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +6 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +70 -38
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +71 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +21 -8
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +12 -23
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +13 -1
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +17 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +41 -0
- package/dist/tween/ease/describe.js.map +1 -0
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/index.d.ts +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +8 -10
- package/dist/attributes/audio/filters/chain.d.ts +0 -113
- package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/chain.js +0 -104
- package/dist/attributes/audio/filters/chain.js.map +0 -1
- package/dist/attributes/audio/filters/curve.d.ts +0 -152
- package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
- package/dist/attributes/audio/filters/curve.js +0 -249
- package/dist/attributes/audio/filters/curve.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
- package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
- package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
- package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.js +0 -6
- package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
- package/dist/attributes/audio/filters/index.d.ts +0 -22
- package/dist/attributes/audio/filters/index.d.ts.map +0 -1
- package/dist/attributes/audio/filters/index.js +0 -8
- package/dist/attributes/audio/filters/index.js.map +0 -1
- package/dist/attributes/audio/filters/registry.d.ts +0 -36
- package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
- package/dist/attributes/audio/filters/registry.js +0 -82
- package/dist/attributes/audio/filters/registry.js.map +0 -1
- package/dist/attributes/audio/filters/union.d.ts +0 -18
- package/dist/attributes/audio/filters/union.d.ts.map +0 -1
- package/dist/attributes/audio/filters/union.js +0 -28
- package/dist/attributes/audio/filters/union.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
- package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.js +0 -0
- package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-P3XQCHDW.js +0 -16
- package/dist/browser/chunks/chunk-P3XQCHDW.js.map +0 -7
- package/dist/browser/chunks/chunk-VJQMKHGQ.js +0 -3
- package/dist/browser/chunks/chunk-VJQMKHGQ.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -19
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -16
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js.map +0 -1
- package/dist/nodes/2d/node-render.d.ts +0 -44
- package/dist/nodes/2d/node-render.d.ts.map +0 -1
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -115
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -190
- package/dist/nodes/2d/paint-node.js.map +0 -1
- package/dist/nodes/audio/audio-bus.d.ts +0 -28
- package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
- package/dist/nodes/audio/audio-bus.js +0 -33
- package/dist/nodes/audio/audio-bus.js.map +0 -1
- package/dist/nodes/audio/index.d.ts +0 -4
- package/dist/nodes/audio/index.d.ts.map +0 -1
- package/dist/nodes/audio/index.js +0 -4
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -40
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -68
- package/dist/nodes/audio/sound-node.js.map +0 -1
- package/dist/nodes/geometry/boolean-node.d.ts +0 -28
- package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
- package/dist/nodes/geometry/boolean-node.js +0 -81
- package/dist/nodes/geometry/boolean-node.js.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
- package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.js +0 -181
- package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
- package/dist/nodes/geometry/box-path-node.d.ts +0 -89
- package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/box-path-node.js +0 -116
- package/dist/nodes/geometry/box-path-node.js.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
- package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
- package/dist/nodes/geometry/ellipse-node.js +0 -45
- package/dist/nodes/geometry/ellipse-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/mask-node.d.ts +0 -33
- package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
- package/dist/nodes/geometry/mask-node.js +0 -66
- package/dist/nodes/geometry/mask-node.js.map +0 -1
- package/dist/nodes/geometry/path-node.d.ts +0 -26
- package/dist/nodes/geometry/path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/path-node.js +0 -52
- package/dist/nodes/geometry/path-node.js.map +0 -1
- package/dist/nodes/geometry/polygon-node.d.ts +0 -26
- package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygon-node.js +0 -47
- package/dist/nodes/geometry/polygon-node.js.map +0 -1
- package/dist/nodes/geometry/polygram-node.d.ts +0 -33
- package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygram-node.js +0 -52
- package/dist/nodes/geometry/polygram-node.js.map +0 -1
- package/dist/nodes/geometry/rect-node.d.ts +0 -38
- package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
- package/dist/nodes/geometry/rect-node.js +0 -56
- package/dist/nodes/geometry/rect-node.js.map +0 -1
- package/dist/nodes/geometry/shape-node.d.ts +0 -71
- package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-node.js +0 -140
- package/dist/nodes/geometry/shape-node.js.map +0 -1
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -46
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -54
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -71
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -118
- package/dist/nodes/layout/camera-node.js.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
- package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.js +0 -118
- package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
- package/dist/nodes/layout/rotated-box.d.ts +0 -20
- package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
- package/dist/nodes/layout/rotated-box.js +0 -76
- package/dist/nodes/layout/rotated-box.js.map +0 -1
- package/dist/nodes/media/video-node.d.ts +0 -229
- package/dist/nodes/media/video-node.d.ts.map +0 -1
- package/dist/nodes/media/video-node.js +0 -348
- package/dist/nodes/media/video-node.js.map +0 -1
- package/dist/nodes/node/declare-paints.d.ts +0 -19
- package/dist/nodes/node/declare-paints.d.ts.map +0 -1
- package/dist/nodes/node/declare-paints.js +0 -27
- package/dist/nodes/node/declare-paints.js.map +0 -1
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts +0 -47
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js +0 -63
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts +0 -29
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js +0 -43
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -100
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -140
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js.map +0 -1
- package/dist/nodes/text/number-node.d.ts +0 -94
- package/dist/nodes/text/number-node.d.ts.map +0 -1
- package/dist/nodes/text/number-node.js +0 -86
- package/dist/nodes/text/number-node.js.map +0 -1
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -73
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -144
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -135
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -504
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-node.d.ts +0 -84
- package/dist/nodes/text/text-node.d.ts.map +0 -1
- package/dist/nodes/text/text-node.js +0 -188
- package/dist/nodes/text/text-node.js.map +0 -1
- package/dist/nodes/text/text-selection.d.ts +0 -125
- package/dist/nodes/text/text-selection.d.ts.map +0 -1
- package/dist/nodes/text/text-selection.js +0 -209
- package/dist/nodes/text/text-selection.js.map +0 -1
- package/dist/nodes/three/camera-nodes.d.ts +0 -91
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -71
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -270
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -438
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -159
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -254
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -100
- package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
- package/dist/nodes/three/environment-nodes.js +0 -134
- package/dist/nodes/three/environment-nodes.js.map +0 -1
- package/dist/nodes/three/geometry-nodes.d.ts +0 -197
- package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
- package/dist/nodes/three/geometry-nodes.js +0 -322
- package/dist/nodes/three/geometry-nodes.js.map +0 -1
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js.map +0 -1
- package/dist/nodes/three/group3d.d.ts +0 -23
- package/dist/nodes/three/group3d.d.ts.map +0 -1
- package/dist/nodes/three/group3d.js +0 -21
- package/dist/nodes/three/group3d.js.map +0 -1
- package/dist/nodes/three/light-nodes.d.ts +0 -120
- package/dist/nodes/three/light-nodes.d.ts.map +0 -1
- package/dist/nodes/three/light-nodes.js +0 -173
- package/dist/nodes/three/light-nodes.js.map +0 -1
- package/dist/nodes/three/mesh3d.d.ts +0 -117
- package/dist/nodes/three/mesh3d.d.ts.map +0 -1
- package/dist/nodes/three/mesh3d.js +0 -147
- package/dist/nodes/three/mesh3d.js.map +0 -1
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js.map +0 -1
- package/dist/render/descriptors/latex.d.ts +0 -6
- package/dist/render/descriptors/latex.d.ts.map +0 -1
- package/dist/render/descriptors/latex.js +0 -2
- package/dist/render/descriptors/latex.js.map +0 -1
- package/dist/tween/seekable.d.ts +0 -70
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -122
- package/dist/tween/seekable.js.map +0 -1
- /package/dist/{nodes → components/builtins}/text/number-pattern.d.ts +0 -0
- /package/dist/{nodes → components/builtins}/text/number-pattern.js +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.d.ts +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three.d.ts","sourceRoot":"","sources":["../../../../src/components/builtins/three/three.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjT,O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AC;CAC/B;AAID,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACnD;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;OAGG;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,sFAAsF;IACtF,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,mEAAmE;IACnE,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { ORBIT_CAMERA_DEFAULTS } from "../../../render3d/camera.js";
|
|
2
|
+
import { lerpFill3D } from "../../../render3d/fill3d.js";
|
|
3
|
+
import { Graphics3D } from "../../../render3d/graphics3d.js";
|
|
4
|
+
import { component3d } from "../../../components/factory/component3d.js";
|
|
5
|
+
import { Types } from "../../../components/factory/types.js";
|
|
6
|
+
import * as Material from "../../../components/modules/material.js";
|
|
7
|
+
import { defined, optional, optionalColor, optionalNumber, optionalVector3, stated } from "../../../components/modules/three-entries.js";
|
|
8
|
+
/**
|
|
9
|
+
* The 3D tree: groups, meshes and the other drawables, lights, the camera, fog
|
|
10
|
+
* and the environment. Each draws the `Graphics3D` or scene call its class did.
|
|
11
|
+
*/
|
|
12
|
+
export const Group3D = component3d({ key: "group3d" });
|
|
13
|
+
// ---- meshes -----------------------------------------------------------------
|
|
14
|
+
const mesh = { geometry: optional(), ...Material.state };
|
|
15
|
+
export const Mesh3D = component3d({
|
|
16
|
+
key: "mesh3d",
|
|
17
|
+
state: mesh,
|
|
18
|
+
render: (ctx, s) => ctx.draw(Material.mesh(s, s.geometry)),
|
|
19
|
+
});
|
|
20
|
+
const sweep = { startAngle: optional(), sweep: optional() };
|
|
21
|
+
const SWEEP_KEYS = ["startAngle", "sweep"];
|
|
22
|
+
/** A mesh of one built-in shape: `keys` are the entries its geometry descriptor takes. */
|
|
23
|
+
function shape3d(key, type, own, keys) {
|
|
24
|
+
return component3d({
|
|
25
|
+
key,
|
|
26
|
+
state: { ...mesh, ...own },
|
|
27
|
+
render: (ctx, s) => ctx.draw(Material.mesh(s, stated(type, s, keys))),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export const Box3D = shape3d("box3d", "box", {
|
|
31
|
+
width: optional(), height: optional(), depth: optional(),
|
|
32
|
+
cornerRadius: optional(), segments: optional(),
|
|
33
|
+
}, ["width", "height", "depth", "cornerRadius", "segments"]);
|
|
34
|
+
export const Sphere3D = shape3d("sphere3d", "sphere", {
|
|
35
|
+
radius: optional(), segments: optional(), ...sweep,
|
|
36
|
+
startLatitude: optional(), latitudeSweep: optional(),
|
|
37
|
+
}, ["radius", "segments", "startLatitude", "latitudeSweep", ...SWEEP_KEYS]);
|
|
38
|
+
export const Plane3D = shape3d("plane3d", "plane", {
|
|
39
|
+
width: optional(), height: optional(), segments: optional(),
|
|
40
|
+
}, ["width", "height", "segments"]);
|
|
41
|
+
export const Cylinder3D = shape3d("cylinder3d", "cylinder", {
|
|
42
|
+
radius: optional(), height: optional(),
|
|
43
|
+
segments: optional(), capped: optional(), ...sweep,
|
|
44
|
+
}, ["radius", "height", "segments", "capped", ...SWEEP_KEYS]);
|
|
45
|
+
export const Cone3D = shape3d("cone3d", "cone", {
|
|
46
|
+
radius: optional(), height: optional(), segments: optional(), capped: optional(), ...sweep,
|
|
47
|
+
}, ["radius", "height", "segments", "capped", ...SWEEP_KEYS]);
|
|
48
|
+
export const Torus3D = shape3d("torus3d", "torus", {
|
|
49
|
+
radius: optional(), thickness: optional(), segments: optional(), ...sweep,
|
|
50
|
+
}, ["radius", "thickness", "segments", ...SWEEP_KEYS]);
|
|
51
|
+
export const TorusKnot3D = shape3d("torus-knot3d", "torusKnot", {
|
|
52
|
+
radius: optional(), thickness: optional(), segments: optional(),
|
|
53
|
+
windings: optional(),
|
|
54
|
+
}, ["radius", "thickness", "segments", "windings"]);
|
|
55
|
+
export const Circle3D = shape3d("circle3d", "circle", {
|
|
56
|
+
radius: optional(), segments: optional(), ...sweep,
|
|
57
|
+
}, ["radius", "segments", ...SWEEP_KEYS]);
|
|
58
|
+
export const Ring3D = shape3d("ring3d", "ring", {
|
|
59
|
+
radius: optional(), innerRadius: optional(), segments: optional(), ...sweep,
|
|
60
|
+
}, ["radius", "innerRadius", "segments", ...SWEEP_KEYS]);
|
|
61
|
+
export const Capsule3D = shape3d("capsule3d", "capsule", {
|
|
62
|
+
radius: optional(), height: optional(), segments: optional(),
|
|
63
|
+
}, ["radius", "height", "segments"]);
|
|
64
|
+
export const Polyhedron3D = component3d({
|
|
65
|
+
key: "polyhedron3d",
|
|
66
|
+
state: { ...mesh, shape: Types.custom("icosahedron"), radius: optional(), segments: optional() },
|
|
67
|
+
render: (ctx, s) => ctx.draw(Material.mesh(s, stated("polyhedron", s, ["shape", "radius", "segments"]))),
|
|
68
|
+
});
|
|
69
|
+
export const Extrude3D = shape3d("extrude3d", "extrude", {
|
|
70
|
+
path: optional(), depth: optional(), segments: optional(), bevel: optional(),
|
|
71
|
+
}, ["path", "depth", "segments", "bevel"]);
|
|
72
|
+
export const Lathe3D = shape3d("lathe3d", "lathe", {
|
|
73
|
+
points: optional(), segments: optional(), ...sweep,
|
|
74
|
+
}, ["points", "segments", ...SWEEP_KEYS]);
|
|
75
|
+
export const Tube3D = shape3d("tube3d", "tube", {
|
|
76
|
+
points: optional(), radius: optional(), segments: optional(), closed: optional(),
|
|
77
|
+
}, ["points", "radius", "segments", "closed"]);
|
|
78
|
+
// ---- other drawables ----------------------------------------------------------
|
|
79
|
+
export const Instances3D = component3d({
|
|
80
|
+
key: "instances3d",
|
|
81
|
+
state: { ...mesh, instances: optional(), colors: optional() },
|
|
82
|
+
render: (ctx, s) => {
|
|
83
|
+
if (!s.geometry || !s.instances?.length)
|
|
84
|
+
return;
|
|
85
|
+
ctx.draw(new Graphics3D().instances(s.geometry, Material.single(s), s.instances, { colors: s.colors }));
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
export const Points3D = component3d({
|
|
89
|
+
key: "points3d",
|
|
90
|
+
state: mesh,
|
|
91
|
+
render: (ctx, s) => {
|
|
92
|
+
if (s.geometry)
|
|
93
|
+
ctx.draw(new Graphics3D().points(s.geometry, Material.points(s)));
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
export const Line3D = component3d({
|
|
97
|
+
key: "line3d",
|
|
98
|
+
state: {
|
|
99
|
+
points: optional(),
|
|
100
|
+
geometry: optional(),
|
|
101
|
+
closed: Types.custom(false),
|
|
102
|
+
segments: Types.custom(false),
|
|
103
|
+
stroke: optional(),
|
|
104
|
+
opacity: optional(),
|
|
105
|
+
material: optional(),
|
|
106
|
+
},
|
|
107
|
+
render: (ctx, s) => {
|
|
108
|
+
if (!s.geometry && !s.points?.length)
|
|
109
|
+
return;
|
|
110
|
+
ctx.draw(new Graphics3D().line({
|
|
111
|
+
points: s.geometry ? undefined : s.points, geometry: s.geometry, closed: s.closed, segments: s.segments,
|
|
112
|
+
stroke: s.stroke, opacity: s.opacity, material: s.material,
|
|
113
|
+
}));
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
export const Sprite3D = component3d({
|
|
117
|
+
key: "sprite3d",
|
|
118
|
+
state: {
|
|
119
|
+
fill: Types.custom(undefined, { lerp: lerpFill3D }),
|
|
120
|
+
opacity: optional(),
|
|
121
|
+
material: optional(),
|
|
122
|
+
},
|
|
123
|
+
render: (ctx, s) => ctx.draw(new Graphics3D().sprite({ fill: s.fill, opacity: s.opacity, material: s.material })),
|
|
124
|
+
});
|
|
125
|
+
export const Model3D = component3d({
|
|
126
|
+
key: "model3d",
|
|
127
|
+
state: {
|
|
128
|
+
src: optional(),
|
|
129
|
+
animation: optional(),
|
|
130
|
+
override: optional(),
|
|
131
|
+
},
|
|
132
|
+
render: (ctx, s) => {
|
|
133
|
+
if (s.src)
|
|
134
|
+
ctx.draw(new Graphics3D().model({ src: s.src, animation: s.animation, override: s.override }));
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
/**
|
|
138
|
+
* A loaded model with its animation restated as two flat entries: `clip` (a
|
|
139
|
+
* clip name, or its index in the file as a string; empty is the first) and
|
|
140
|
+
* `clipTime` (seconds into it). The timeline tweens a number, and
|
|
141
|
+
* `Model3D.animation` is a list of records, so "play the walk cycle" is a tween
|
|
142
|
+
* of `clipTime` here. The clip is still sampled at an explicit time, so seeking
|
|
143
|
+
* and playing to a frame give the same pose.
|
|
144
|
+
*
|
|
145
|
+
* Before a file is picked it draws an unlit wireframe unit box: a node that
|
|
146
|
+
* records no geometry has no box to pick, select or outline. Not registered: an
|
|
147
|
+
* editor's node, not document API.
|
|
148
|
+
*/
|
|
149
|
+
export const ModelView3D = component3d({
|
|
150
|
+
key: "modelView3d",
|
|
151
|
+
state: {
|
|
152
|
+
src: optional(),
|
|
153
|
+
animation: optional(),
|
|
154
|
+
override: optional(),
|
|
155
|
+
clip: "",
|
|
156
|
+
clipTime: 0,
|
|
157
|
+
},
|
|
158
|
+
render: (ctx, s) => {
|
|
159
|
+
if (!s.src) {
|
|
160
|
+
ctx.draw(new Graphics3D().box({
|
|
161
|
+
width: 1, height: 1, depth: 1,
|
|
162
|
+
material: { type: "basic", color: "#6b7280", wireframe: true, transparent: true, opacity: 0.7 },
|
|
163
|
+
}));
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
ctx.draw(new Graphics3D().model({ src: s.src, animation: { clip: modelClip(s.clip), time: s.clipTime }, override: s.override }));
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
/** A clip name, or a whole number as an index (`"0"` is the first clip, not one named `0`), or unset when empty. */
|
|
170
|
+
function modelClip(clip) {
|
|
171
|
+
const trimmed = clip.trim();
|
|
172
|
+
if (trimmed === "")
|
|
173
|
+
return undefined;
|
|
174
|
+
const index = Number(trimmed);
|
|
175
|
+
return Number.isInteger(index) && index >= 0 ? index : trimmed;
|
|
176
|
+
}
|
|
177
|
+
// ---- lights -------------------------------------------------------------------
|
|
178
|
+
/** A light that casts no shadow unless asked: shadow maps cost a render each. */
|
|
179
|
+
const castsNoShadow = { shadow: false };
|
|
180
|
+
export const AmbientLight3D = component3d({
|
|
181
|
+
key: "ambient-light3d",
|
|
182
|
+
state: { color: optionalColor(), intensity: optional() },
|
|
183
|
+
render: (ctx, s) => ctx.light(stated("ambient", s, ["color", "intensity"])),
|
|
184
|
+
});
|
|
185
|
+
export const HemisphereLight3D = component3d({
|
|
186
|
+
key: "hemisphere-light3d",
|
|
187
|
+
state: { sky: optionalColor(), ground: optionalColor(), intensity: optional() },
|
|
188
|
+
render: (ctx, s) => ctx.light(stated("hemisphere", s, ["sky", "ground", "intensity"])),
|
|
189
|
+
});
|
|
190
|
+
export const DirectionalLight3D = component3d({
|
|
191
|
+
key: "directional-light3d",
|
|
192
|
+
state: { color: optionalColor(), intensity: optional(), target: optionalVector3("origin") },
|
|
193
|
+
defaults: castsNoShadow,
|
|
194
|
+
render: (ctx, s) => ctx.light(stated("directional", s, ["color", "intensity", "target", "shadow"])),
|
|
195
|
+
});
|
|
196
|
+
export const PointLight3D = component3d({
|
|
197
|
+
key: "point-light3d",
|
|
198
|
+
state: { color: optionalColor(), intensity: optional(), distance: optional(), decay: optional() },
|
|
199
|
+
defaults: castsNoShadow,
|
|
200
|
+
render: (ctx, s) => ctx.light(stated("point", s, ["color", "intensity", "distance", "decay", "shadow"])),
|
|
201
|
+
});
|
|
202
|
+
export const SpotLight3D = component3d({
|
|
203
|
+
key: "spot-light3d",
|
|
204
|
+
state: {
|
|
205
|
+
color: optionalColor(), intensity: optional(), distance: optional(), angle: optional(),
|
|
206
|
+
penumbra: optional(), decay: optional(), target: optionalVector3("origin"),
|
|
207
|
+
},
|
|
208
|
+
defaults: castsNoShadow,
|
|
209
|
+
render: (ctx, s) => ctx.light(stated("spot", s, ["color", "intensity", "distance", "angle", "penumbra", "decay", "target", "shadow"])),
|
|
210
|
+
});
|
|
211
|
+
export const AreaLight3D = component3d({
|
|
212
|
+
key: "area-light3d",
|
|
213
|
+
state: { color: optionalColor(), intensity: optional(), width: optional(), height: optional() },
|
|
214
|
+
render: (ctx, s) => ctx.light(stated("area", s, ["color", "intensity", "width", "height"])),
|
|
215
|
+
});
|
|
216
|
+
// ---- camera, fog, environment -------------------------------------------------
|
|
217
|
+
const CAMERA_KEYS = ["target", "orbit", "elevation", "distance", "fov", "frustumHeight", "near", "far", "zoom"];
|
|
218
|
+
const ORBIT_KEYS = ["orbit", "elevation", "distance"];
|
|
219
|
+
export const Camera3D = component3d({
|
|
220
|
+
key: "camera3d",
|
|
221
|
+
state: {
|
|
222
|
+
type: Types.custom("perspective"),
|
|
223
|
+
target: optionalVector3("origin"),
|
|
224
|
+
orbit: optional(),
|
|
225
|
+
elevation: optional(),
|
|
226
|
+
distance: optional(),
|
|
227
|
+
fov: optional(),
|
|
228
|
+
frustumHeight: optional(),
|
|
229
|
+
near: optional(),
|
|
230
|
+
far: optional(),
|
|
231
|
+
zoom: optional(),
|
|
232
|
+
},
|
|
233
|
+
commands: {
|
|
234
|
+
/** Only the given angles move, each from where it stands (the orbit default while unset). */
|
|
235
|
+
orbitTo: {
|
|
236
|
+
args: {
|
|
237
|
+
orbit: optionalNumber({ step: 1, unit: "°" }),
|
|
238
|
+
elevation: optionalNumber({ min: -89, max: 89, step: 1, unit: "°" }),
|
|
239
|
+
distance: optionalNumber({ min: 0.01, step: 0.1 }),
|
|
240
|
+
},
|
|
241
|
+
run: (timeline, s) => {
|
|
242
|
+
const from = {
|
|
243
|
+
orbit: s.orbit ?? ORBIT_CAMERA_DEFAULTS.orbit,
|
|
244
|
+
elevation: s.elevation ?? ORBIT_CAMERA_DEFAULTS.elevation,
|
|
245
|
+
distance: s.distance ?? ORBIT_CAMERA_DEFAULTS.distance,
|
|
246
|
+
};
|
|
247
|
+
return timeline.animate((t) => {
|
|
248
|
+
const out = {};
|
|
249
|
+
for (const key of ORBIT_KEYS) {
|
|
250
|
+
const end = timeline.args[key];
|
|
251
|
+
if (end !== undefined)
|
|
252
|
+
out[key] = from[key] + (end - from[key]) * t;
|
|
253
|
+
}
|
|
254
|
+
return out;
|
|
255
|
+
});
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
lookTo: { args: ["target"] },
|
|
259
|
+
},
|
|
260
|
+
render: (ctx, s) => {
|
|
261
|
+
const data = { type: s.type };
|
|
262
|
+
for (const key of CAMERA_KEYS)
|
|
263
|
+
if (s[key] !== undefined)
|
|
264
|
+
data[key] = s[key];
|
|
265
|
+
ctx.camera(data);
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
export const Fog3D = component3d({
|
|
269
|
+
key: "fog3d",
|
|
270
|
+
state: { color: optionalColor(), near: optional(), far: optional(), density: optional() },
|
|
271
|
+
render: (ctx, s) => {
|
|
272
|
+
const out = {};
|
|
273
|
+
if (s.color !== undefined)
|
|
274
|
+
out.color = s.color;
|
|
275
|
+
if (s.density !== undefined)
|
|
276
|
+
out.density = s.density;
|
|
277
|
+
else {
|
|
278
|
+
if (s.near !== undefined)
|
|
279
|
+
out.near = s.near;
|
|
280
|
+
if (s.far !== undefined)
|
|
281
|
+
out.far = s.far;
|
|
282
|
+
}
|
|
283
|
+
ctx.fog(out);
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
export const Environment3D = component3d({
|
|
287
|
+
key: "environment3d",
|
|
288
|
+
state: {
|
|
289
|
+
src: optional(),
|
|
290
|
+
faces: optional(),
|
|
291
|
+
preset: optional(),
|
|
292
|
+
intensity: optional(),
|
|
293
|
+
background: optional(),
|
|
294
|
+
blur: optional(),
|
|
295
|
+
},
|
|
296
|
+
render: (ctx, s) => {
|
|
297
|
+
if (s.src === undefined && s.faces === undefined && s.preset === undefined)
|
|
298
|
+
return ctx.environment(null);
|
|
299
|
+
const out = defined(s, ["src", "faces", "preset", "intensity", "background", "blur"]);
|
|
300
|
+
if (s.rotationX || s.rotationY || s.rotationZ)
|
|
301
|
+
out.rotation = [s.rotationX, s.rotationY, s.rotationZ];
|
|
302
|
+
ctx.environment(out);
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
//# sourceMappingURL=three.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three.js","sourceRoot":"","sources":["../../../../src/components/builtins/three/three.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAe,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAA4C,MAAM,uBAAuB,CAAC;AAQ7F,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAI/H;;;GAGG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;AAGvD,gFAAgF;AAEhF,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAc,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAErE,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC;IAC9B,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC7D,CAAC,CAAC;AAGH,MAAM,KAAK,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAU,EA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GAAG,EAAE,QAAQ,EAAU;QACvB,KAAK,EAAE,QAAQ,EAAqB;QACpC,MAAM,EAAE,QAAQ,EAAY;QAC5B,SAAS,EAAE,QAAQ,EAAU;QAC7B,UAAU,EAAE,QAAQ,EAAW;QAC/B,IAAI,EAAE,QAAQ,EAAU;KAC3B;IACD,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACf,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzG,MAAM,GAAG,GAAG,OAAO,CAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;QACzG,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS;YAAE,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;QACtG,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACJ,CAAC,CAAC","sourcesContent":["import type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport { ORBIT_CAMERA_DEFAULTS, type CameraData3D } from \"@/render3d/camera\";\nimport { lerpFill3D, type Fill3D } from \"@/render3d/fill3d\";\nimport type { Geometry3D, PolyhedronGeometry3D, BoxGeometry3D, CapsuleGeometry3D, CircleGeometry3D, ConeGeometry3D, CylinderGeometry3D, ExtrudeGeometry3D, LatheGeometry3D, PlaneGeometry3D, RingGeometry3D, SphereGeometry3D, TorusGeometry3D, TorusKnotGeometry3D, TubeGeometry3D } from \"@/render3d/geometry\";\nimport { Graphics3D, type LineStroke3D, type ModelAnimation3D } from \"@/render3d/graphics3d\";\nimport type { LightData3D, AmbientLightData3D, AreaLightData3D, DirectionalLightData3D, HemisphereLightData3D, PointLightData3D, SpotLightData3D } from \"@/render3d/light\";\nimport type { Material3D, Shading3D } from \"@/render3d/material\";\nimport type { EnvironmentData3D, FogData3D } from \"@/render3d/scene-settings\";\nimport type { Segments3D } from \"@/render3d/segments\";\nimport type { Transform3D, Blend3D, Faces3D } from \"@/render3d/transform\";\nimport type { Vector3Input } from \"@/render3d/vector3\";\nimport type { NodeOf } from \"@/components/factory/api\";\nimport { component3d } from \"@/components/factory/component3d\";\nimport { Types } from \"@/components/factory/types\";\nimport * as Material from \"@/components/modules/material\";\nimport { defined, optional, optionalColor, optionalNumber, optionalVector3, stated } from \"@/components/modules/three-entries\";\nimport type { Node3DProps } from \"@/components/trees/three/node3d\";\nimport type { Texture3D } from \"@/render3d/texture\";\n\n/**\n * The 3D tree: groups, meshes and the other drawables, lights, the camera, fog\n * and the environment. Each draws the `Graphics3D` or scene call its class did.\n */\n\nexport const Group3D = component3d({ key: \"group3d\" });\nexport type Group3D = NodeOf<typeof Group3D>;\n\n// ---- meshes -----------------------------------------------------------------\n\nconst mesh = { geometry: optional<Geometry3D>(), ...Material.state };\n\nexport const Mesh3D = component3d({\n key: \"mesh3d\",\n state: mesh,\n render: (ctx, s) => ctx.draw(Material.mesh(s, s.geometry)),\n});\nexport type Mesh3D = NodeOf<typeof Mesh3D>;\n\nconst sweep = { startAngle: optional<number>(), sweep: optional<number>() };\nconst SWEEP_KEYS = [\"startAngle\", \"sweep\"] as const;\n\n/** A mesh of one built-in shape: `keys` are the entries its geometry descriptor takes. */\nfunction shape3d<const K extends string, const S extends Record<string, ReturnType<typeof optional>>>(\n key: K, type: Geometry3D[\"type\"], own: S, keys: readonly string[],\n) {\n return component3d({\n key,\n state: { ...mesh, ...own },\n render: (ctx, s) => ctx.draw(Material.mesh(s as never, stated<Geometry3D>(type, s, keys))),\n });\n}\n\nexport const Box3D = shape3d(\"box3d\", \"box\", {\n width: optional<number>(), height: optional<number>(), depth: optional<number>(),\n cornerRadius: optional<number>(), segments: optional<Segments3D>(),\n}, [\"width\", \"height\", \"depth\", \"cornerRadius\", \"segments\"]);\nexport type Box3D = NodeOf<typeof Box3D>;\n\nexport const Sphere3D = shape3d(\"sphere3d\", \"sphere\", {\n radius: optional<number>(), segments: optional<Segments3D>(), ...sweep,\n startLatitude: optional<number>(), latitudeSweep: optional<number>(),\n}, [\"radius\", \"segments\", \"startLatitude\", \"latitudeSweep\", ...SWEEP_KEYS]);\nexport type Sphere3D = NodeOf<typeof Sphere3D>;\n\nexport const Plane3D = shape3d(\"plane3d\", \"plane\", {\n width: optional<number>(), height: optional<number>(), segments: optional<Segments3D>(),\n}, [\"width\", \"height\", \"segments\"]);\nexport type Plane3D = NodeOf<typeof Plane3D>;\n\nexport const Cylinder3D = shape3d(\"cylinder3d\", \"cylinder\", {\n radius: optional<number | readonly [number, number]>(), height: optional<number>(),\n segments: optional<Segments3D>(), capped: optional<boolean>(), ...sweep,\n}, [\"radius\", \"height\", \"segments\", \"capped\", ...SWEEP_KEYS]);\nexport type Cylinder3D = NodeOf<typeof Cylinder3D>;\n\nexport const Cone3D = shape3d(\"cone3d\", \"cone\", {\n radius: optional<number>(), height: optional<number>(), segments: optional<Segments3D>(), capped: optional<boolean>(), ...sweep,\n}, [\"radius\", \"height\", \"segments\", \"capped\", ...SWEEP_KEYS]);\nexport type Cone3D = NodeOf<typeof Cone3D>;\n\nexport const Torus3D = shape3d(\"torus3d\", \"torus\", {\n radius: optional<number>(), thickness: optional<number>(), segments: optional<Segments3D>(), ...sweep,\n}, [\"radius\", \"thickness\", \"segments\", ...SWEEP_KEYS]);\nexport type Torus3D = NodeOf<typeof Torus3D>;\n\nexport const TorusKnot3D = shape3d(\"torus-knot3d\", \"torusKnot\", {\n radius: optional<number>(), thickness: optional<number>(), segments: optional<Segments3D>(),\n windings: optional<readonly [number, number]>(),\n}, [\"radius\", \"thickness\", \"segments\", \"windings\"]);\nexport type TorusKnot3D = NodeOf<typeof TorusKnot3D>;\n\nexport const Circle3D = shape3d(\"circle3d\", \"circle\", {\n radius: optional<number>(), segments: optional<Segments3D>(), ...sweep,\n}, [\"radius\", \"segments\", ...SWEEP_KEYS]);\nexport type Circle3D = NodeOf<typeof Circle3D>;\n\nexport const Ring3D = shape3d(\"ring3d\", \"ring\", {\n radius: optional<number>(), innerRadius: optional<number>(), segments: optional<Segments3D>(), ...sweep,\n}, [\"radius\", \"innerRadius\", \"segments\", ...SWEEP_KEYS]);\nexport type Ring3D = NodeOf<typeof Ring3D>;\n\nexport const Capsule3D = shape3d(\"capsule3d\", \"capsule\", {\n radius: optional<number>(), height: optional<number>(), segments: optional<Segments3D>(),\n}, [\"radius\", \"height\", \"segments\"]);\nexport type Capsule3D = NodeOf<typeof Capsule3D>;\n\nexport const Polyhedron3D = component3d({\n key: \"polyhedron3d\",\n state: { ...mesh, shape: Types.custom<PolyhedronGeometry3D[\"shape\"]>(\"icosahedron\"), radius: optional<number>(), segments: optional<Segments3D>() },\n render: (ctx, s) => ctx.draw(Material.mesh(s, stated<Geometry3D>(\"polyhedron\", s, [\"shape\", \"radius\", \"segments\"]))),\n});\nexport type Polyhedron3D = NodeOf<typeof Polyhedron3D>;\n\nexport const Extrude3D = shape3d(\"extrude3d\", \"extrude\", {\n path: optional<unknown>(), depth: optional<number>(), segments: optional<Segments3D>(), bevel: optional<unknown>(),\n}, [\"path\", \"depth\", \"segments\", \"bevel\"]);\nexport type Extrude3D = NodeOf<typeof Extrude3D>;\n\nexport const Lathe3D = shape3d(\"lathe3d\", \"lathe\", {\n points: optional<readonly unknown[]>(), segments: optional<Segments3D>(), ...sweep,\n}, [\"points\", \"segments\", ...SWEEP_KEYS]);\nexport type Lathe3D = NodeOf<typeof Lathe3D>;\n\nexport const Tube3D = shape3d(\"tube3d\", \"tube\", {\n points: optional<readonly Vector3Input[]>(), radius: optional<number>(), segments: optional<Segments3D>(), closed: optional<boolean>(),\n}, [\"points\", \"radius\", \"segments\", \"closed\"]);\nexport type Tube3D = NodeOf<typeof Tube3D>;\n\n// ---- other drawables ----------------------------------------------------------\n\nexport const Instances3D = component3d({\n key: \"instances3d\",\n state: { ...mesh, instances: optional<readonly Transform3D[]>(), colors: optional<readonly Color[]>() },\n render: (ctx, s) => {\n if (!s.geometry || !s.instances?.length) return;\n ctx.draw(new Graphics3D().instances(s.geometry, Material.single(s), s.instances, { colors: s.colors }));\n },\n});\nexport type Instances3D = NodeOf<typeof Instances3D>;\n\nexport const Points3D = component3d({\n key: \"points3d\",\n state: mesh,\n render: (ctx, s) => {\n if (s.geometry) ctx.draw(new Graphics3D().points(s.geometry, Material.points(s)));\n },\n});\nexport type Points3D = NodeOf<typeof Points3D>;\n\nexport const Line3D = component3d({\n key: \"line3d\",\n state: {\n points: optional<readonly Vector3Input[]>(),\n geometry: optional<Geometry3D>(),\n closed: Types.custom(false),\n segments: Types.custom(false),\n stroke: optional<LineStroke3D>(),\n opacity: optional<number>(),\n material: optional<Material3D>(),\n },\n render: (ctx, s) => {\n if (!s.geometry && !s.points?.length) return;\n ctx.draw(new Graphics3D().line({\n points: s.geometry ? undefined : s.points, geometry: s.geometry, closed: s.closed, segments: s.segments,\n stroke: s.stroke, opacity: s.opacity, material: s.material,\n }));\n },\n});\nexport type Line3D = NodeOf<typeof Line3D>;\n\nexport const Sprite3D = component3d({\n key: \"sprite3d\",\n state: {\n fill: Types.custom<Fill3D | undefined>(undefined, { lerp: lerpFill3D as never }),\n opacity: optional<number>(),\n material: optional<Material3D>(),\n },\n render: (ctx, s) => ctx.draw(new Graphics3D().sprite({ fill: s.fill as Fill3D, opacity: s.opacity, material: s.material })),\n});\nexport type Sprite3D = NodeOf<typeof Sprite3D>;\n\nexport const Model3D = component3d({\n key: \"model3d\",\n state: {\n src: optional<string>(),\n animation: optional<readonly ModelAnimation3D[] | ModelAnimation3D>(),\n override: optional<Readonly<Record<string, Material3D>>>(),\n },\n render: (ctx, s) => {\n if (s.src) ctx.draw(new Graphics3D().model({ src: s.src, animation: s.animation, override: s.override }));\n },\n});\nexport type Model3D = NodeOf<typeof Model3D>;\n\n/**\n * A loaded model with its animation restated as two flat entries: `clip` (a\n * clip name, or its index in the file as a string; empty is the first) and\n * `clipTime` (seconds into it). The timeline tweens a number, and\n * `Model3D.animation` is a list of records, so \"play the walk cycle\" is a tween\n * of `clipTime` here. The clip is still sampled at an explicit time, so seeking\n * and playing to a frame give the same pose.\n *\n * Before a file is picked it draws an unlit wireframe unit box: a node that\n * records no geometry has no box to pick, select or outline. Not registered: an\n * editor's node, not document API.\n */\nexport const ModelView3D = component3d({\n key: \"modelView3d\",\n state: {\n src: optional<string>(),\n animation: optional<readonly ModelAnimation3D[] | ModelAnimation3D>(),\n override: optional<Readonly<Record<string, Material3D>>>(),\n clip: \"\",\n clipTime: 0,\n },\n render: (ctx, s) => {\n if (!s.src) {\n ctx.draw(new Graphics3D().box({\n width: 1, height: 1, depth: 1,\n material: { type: \"basic\", color: \"#6b7280\", wireframe: true, transparent: true, opacity: 0.7 },\n }));\n return;\n }\n ctx.draw(new Graphics3D().model({ src: s.src, animation: { clip: modelClip(s.clip), time: s.clipTime }, override: s.override }));\n },\n});\nexport type ModelView3D = NodeOf<typeof ModelView3D>;\n\n/** A clip name, or a whole number as an index (`\"0\"` is the first clip, not one named `0`), or unset when empty. */\nfunction modelClip(clip: string): string | number | undefined {\n const trimmed = clip.trim();\n if (trimmed === \"\") return undefined;\n const index = Number(trimmed);\n return Number.isInteger(index) && index >= 0 ? index : trimmed;\n}\n\n// ---- lights -------------------------------------------------------------------\n\n/** A light that casts no shadow unless asked: shadow maps cost a render each. */\nconst castsNoShadow = { shadow: false } as const;\n\nexport const AmbientLight3D = component3d({\n key: \"ambient-light3d\",\n state: { color: optionalColor(), intensity: optional<number>() },\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"ambient\", s, [\"color\", \"intensity\"])),\n});\nexport type AmbientLight3D = NodeOf<typeof AmbientLight3D>;\n\nexport const HemisphereLight3D = component3d({\n key: \"hemisphere-light3d\",\n state: { sky: optionalColor(), ground: optionalColor(), intensity: optional<number>() },\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"hemisphere\", s, [\"sky\", \"ground\", \"intensity\"])),\n});\nexport type HemisphereLight3D = NodeOf<typeof HemisphereLight3D>;\n\nexport const DirectionalLight3D = component3d({\n key: \"directional-light3d\",\n state: { color: optionalColor(), intensity: optional<number>(), target: optionalVector3(\"origin\") },\n defaults: castsNoShadow,\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"directional\", s, [\"color\", \"intensity\", \"target\", \"shadow\"])),\n});\nexport type DirectionalLight3D = NodeOf<typeof DirectionalLight3D>;\n\nexport const PointLight3D = component3d({\n key: \"point-light3d\",\n state: { color: optionalColor(), intensity: optional<number>(), distance: optional<number>(), decay: optional<number>() },\n defaults: castsNoShadow,\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"point\", s, [\"color\", \"intensity\", \"distance\", \"decay\", \"shadow\"])),\n});\nexport type PointLight3D = NodeOf<typeof PointLight3D>;\n\nexport const SpotLight3D = component3d({\n key: \"spot-light3d\",\n state: {\n color: optionalColor(), intensity: optional<number>(), distance: optional<number>(), angle: optional<number>(),\n penumbra: optional<number>(), decay: optional<number>(), target: optionalVector3(\"origin\"),\n },\n defaults: castsNoShadow,\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"spot\", s, [\"color\", \"intensity\", \"distance\", \"angle\", \"penumbra\", \"decay\", \"target\", \"shadow\"])),\n});\nexport type SpotLight3D = NodeOf<typeof SpotLight3D>;\n\nexport const AreaLight3D = component3d({\n key: \"area-light3d\",\n state: { color: optionalColor(), intensity: optional<number>(), width: optional<number>(), height: optional<number>() },\n render: (ctx, s) => ctx.light(stated<LightData3D>(\"area\", s, [\"color\", \"intensity\", \"width\", \"height\"])),\n});\nexport type AreaLight3D = NodeOf<typeof AreaLight3D>;\n\n// ---- camera, fog, environment -------------------------------------------------\n\nconst CAMERA_KEYS = [\"target\", \"orbit\", \"elevation\", \"distance\", \"fov\", \"frustumHeight\", \"near\", \"far\", \"zoom\"] as const;\nconst ORBIT_KEYS = [\"orbit\", \"elevation\", \"distance\"] as const;\n\nexport const Camera3D = component3d({\n key: \"camera3d\",\n state: {\n type: Types.custom<CameraData3D[\"type\"]>(\"perspective\"),\n target: optionalVector3(\"origin\"),\n orbit: optional<number>(),\n elevation: optional<number>(),\n distance: optional<number>(),\n fov: optional<number>(),\n frustumHeight: optional<number>(),\n near: optional<number>(),\n far: optional<number>(),\n zoom: optional<number>(),\n },\n commands: {\n /** Only the given angles move, each from where it stands (the orbit default while unset). */\n orbitTo: {\n args: {\n orbit: optionalNumber({ step: 1, unit: \"°\" }),\n elevation: optionalNumber({ min: -89, max: 89, step: 1, unit: \"°\" }),\n distance: optionalNumber({ min: 0.01, step: 0.1 }),\n },\n run: (timeline, s) => {\n const from = {\n orbit: s.orbit ?? ORBIT_CAMERA_DEFAULTS.orbit,\n elevation: s.elevation ?? ORBIT_CAMERA_DEFAULTS.elevation,\n distance: s.distance ?? ORBIT_CAMERA_DEFAULTS.distance,\n };\n return timeline.animate((t) => {\n const out: Record<string, number> = {};\n for (const key of ORBIT_KEYS) {\n const end = timeline.args[key];\n if (end !== undefined) out[key] = from[key] + (end - from[key]) * t;\n }\n return out;\n });\n },\n },\n lookTo: { args: [\"target\"] },\n },\n render: (ctx, s) => {\n const data: Record<string, unknown> = { type: s.type };\n for (const key of CAMERA_KEYS) if (s[key] !== undefined) data[key] = s[key];\n ctx.camera(data as unknown as CameraData3D);\n },\n});\nexport type Camera3D = NodeOf<typeof Camera3D>;\n\nexport const Fog3D = component3d({\n key: \"fog3d\",\n state: { color: optionalColor(), near: optional<number>(), far: optional<number>(), density: optional<number>() },\n render: (ctx, s) => {\n const out: FogData3D = {};\n if (s.color !== undefined) out.color = s.color as Color;\n if (s.density !== undefined) out.density = s.density;\n else {\n if (s.near !== undefined) out.near = s.near;\n if (s.far !== undefined) out.far = s.far;\n }\n ctx.fog(out);\n },\n});\nexport type Fog3D = NodeOf<typeof Fog3D>;\n\nexport const Environment3D = component3d({\n key: \"environment3d\",\n state: {\n src: optional<string>(),\n faces: optional<readonly string[]>(),\n preset: optional<\"studio\">(),\n intensity: optional<number>(),\n background: optional<boolean>(),\n blur: optional<number>(),\n },\n render: (ctx, s) => {\n if (s.src === undefined && s.faces === undefined && s.preset === undefined) return ctx.environment(null);\n const out = defined<EnvironmentData3D>(s, [\"src\", \"faces\", \"preset\", \"intensity\", \"background\", \"blur\"]);\n if (s.rotationX || s.rotationY || s.rotationZ) out.rotation = [s.rotationX, s.rotationY, s.rotationZ];\n ctx.environment(out);\n },\n});\nexport type Environment3D = NodeOf<typeof Environment3D>;\n\n// What code building a 3D node names its props as.\n\n/** Params of a geometry descriptor, minus its discriminant. */\ntype ParamsOf<G extends { type: string }> = Omit<G, \"type\">;\n/** A light's params, minus its discriminant and its shadow, which is a node prop of its own. */\ntype LightParamsOf<L extends { type: string }> = Omit<L, \"type\" | \"shadow\">;\n\nexport type Group3DProps = Node3DProps;\n\n/**\n * The material shorthand, as node props.\n *\n * Exactly the keys {@link MaterialShorthand3D} promotes onto the `Graphics3D`\n * sugar methods, so `Box3D({ fill: \"red\", roughness: 0.3 })` and\n * `g3.box({ fill: \"red\", roughness: 0.3 })` describe the same mesh — and each is\n * a real prop here, so any of them can be tweened.\n *\n * Ten props, where there were twenty-four. What went is everything that was a\n * renderer knob rather than a design decision — `depthWrite`, `depthTest`,\n * `alphaTest`, `toneMapped`, `polygonOffset`, `dithering` — which now live only\n * on a `Mat.*` descriptor passed through {@link material}; plus `transparent`,\n * which is derived; plus five texture slots, which are fills.\n */\nexport interface Material3DProps {\n /** A full descriptor (or an array, for multi-material). Wins over the rest. */\n material: Material3D | readonly Material3D[] | undefined;\n /** What the surface is made of — the same value a 2D `fill` takes. */\n fill: Fill3D;\n opacity: number;\n roughness: number;\n metalness: number;\n emission: Color | undefined;\n emissionStrength: number;\n normalMap: Texture3D | undefined;\n roughnessMap: Texture3D | undefined;\n metalnessMap: Texture3D | undefined;\n aoMap: Texture3D | undefined;\n alphaMap: Texture3D | undefined;\n envMapIntensity: number;\n wireframe: boolean;\n /** Facet or smooth shading. Default `\"smooth\"`. */\n shading: Shading3D;\n /** Which faces to rasterize. Default `\"front\"`. */\n faces: Faces3D;\n vertexColors: boolean;\n blend: Blend3D;\n /** Shade with an unlit `basic` material instead of `standard`. */\n unlit: boolean;\n}\n\nexport interface Mesh3DProps extends Node3DProps, Partial<Material3DProps> {\n /** The geometry to draw. Set directly, or built from a geometry component's entries. */\n geometry: Geometry3D;\n}\n\n// ─── box ─────────────────────────────────────────────────────────────────────\n\nexport interface Box3DProps extends Mesh3DProps, Partial<ParamsOf<BoxGeometry3D>> { }\n\n// ─── sphere ──────────────────────────────────────────────────────────────────\n\nexport interface Sphere3DProps extends Mesh3DProps, Partial<ParamsOf<SphereGeometry3D>> { }\n\n// ─── plane ───────────────────────────────────────────────────────────────────\n\nexport interface Plane3DProps extends Mesh3DProps, Partial<ParamsOf<PlaneGeometry3D>> { }\n\n// ─── cylinder ────────────────────────────────────────────────────────────────\n\nexport interface Cylinder3DProps extends Mesh3DProps, Partial<ParamsOf<CylinderGeometry3D>> { }\n\n// ─── cone ────────────────────────────────────────────────────────────────────\n\nexport interface Cone3DProps extends Mesh3DProps, Partial<ParamsOf<ConeGeometry3D>> { }\n\n// ─── torus ───────────────────────────────────────────────────────────────────\n\nexport interface Torus3DProps extends Mesh3DProps, Partial<ParamsOf<TorusGeometry3D>> { }\n\n// ─── torus knot ──────────────────────────────────────────────────────────────\n\nexport interface TorusKnot3DProps extends Mesh3DProps, Partial<ParamsOf<TorusKnotGeometry3D>> { }\n\n// ─── circle ──────────────────────────────────────────────────────────────────\n\nexport interface Circle3DProps extends Mesh3DProps, Partial<ParamsOf<CircleGeometry3D>> { }\n\n// ─── ring ────────────────────────────────────────────────────────────────────\n\nexport interface Ring3DProps extends Mesh3DProps, Partial<ParamsOf<RingGeometry3D>> { }\n\n// ─── capsule ─────────────────────────────────────────────────────────────────\n\nexport interface Capsule3DProps extends Mesh3DProps, Partial<ParamsOf<CapsuleGeometry3D>> { }\n\n// ─── polyhedron ──────────────────────────────────────────────────────────────\n\nexport interface Polyhedron3DProps extends Mesh3DProps, Partial<ParamsOf<PolyhedronGeometry3D>> { }\n\n// ─── extrude ─────────────────────────────────────────────────────────────────\n\nexport interface Extrude3DProps extends Mesh3DProps, Partial<ParamsOf<ExtrudeGeometry3D>> { }\n\n// ─── lathe ───────────────────────────────────────────────────────────────────\n\nexport interface Lathe3DProps extends Mesh3DProps, Partial<ParamsOf<LatheGeometry3D>> { }\n\n// ─── tube ────────────────────────────────────────────────────────────────────\n\nexport interface Tube3DProps extends Mesh3DProps, Partial<ParamsOf<TubeGeometry3D>> { }\n\n/**\n * The drawables that aren't a single mesh: instanced copies, point clouds,\n * polylines, sprites and loaded models.\n *\n * Each is the node form of the matching `Graphics3D` method, so what it draws and\n * what a builder chain draws are the same descriptor.\n */\n\n// ─── instances ───────────────────────────────────────────────────────────────\n\nexport interface Instances3DProps extends Mesh3DProps {\n /** Per-instance placement. Its length drives the instance count. */\n instances: readonly Transform3D[];\n /** Per-instance tint. Needs a material that reads instance colour. */\n colors: readonly Color[] | undefined;\n}\n\n// ─── points ──────────────────────────────────────────────────────────────────\n\nexport type Points3DProps = Mesh3DProps;\n\n// ─── line ────────────────────────────────────────────────────────────────────\n\nexport interface Line3DProps extends Node3DProps {\n /** The polyline's vertices. Give this or {@link geometry}, not both. */\n points: readonly Vector3Input[];\n /**\n * An explicit geometry to draw the lines of — `Geo.edges(...)` for a wireframe\n * outline, say. Wins over {@link points}.\n */\n geometry: Geometry3D;\n /** Join the last point back to the first. */\n closed: boolean;\n /** Treat the points as disjoint start/end pairs rather than one path. */\n segments: boolean;\n /** The line's paint. */\n stroke: LineStroke3D | undefined;\n opacity: number | undefined;\n material: Material3D | undefined;\n}\n\n// ─── sprite ──────────────────────────────────────────────────────────────────\n\nexport interface Sprite3DProps extends Node3DProps {\n /** What the billboard shows — the same value a 2D `fill` takes. */\n fill: Fill3D;\n opacity: number | undefined;\n material: Material3D | undefined;\n}\n\n// ─── model ───────────────────────────────────────────────────────────────────\n\nexport interface Model3DProps extends Node3DProps {\n /**\n * Path to a glTF/GLB file. **Only glTF/GLB loads**: any other format, an OBJ\n * included, resolves to an empty slot and draws nothing.\n */\n src: string;\n /**\n * Baked animation clips, each sampled at an **explicit** time — which is what\n * keeps a model identical whether the frame was played forward or scrubbed to.\n */\n animation: readonly ModelAnimation3D[] | ModelAnimation3D | undefined;\n /** Replace materials on the loaded graph, keyed by mesh or material name. */\n override: Readonly<Record<string, Material3D>> | undefined;\n}\n\nexport interface ModelView3DProps extends Model3DProps {\n /**\n * Which baked clip to sample — a clip name, or its index in the file as a\n * string. Empty means the first clip.\n */\n clip: string\n /** Seconds into that clip. Animate this to play it. */\n clipTime: number\n}\n\n// ─── ambient ─────────────────────────────────────────────────────────────────\n\nexport interface AmbientLight3DProps extends Node3DProps, Partial<LightParamsOf<AmbientLightData3D>> { }\n\n// ─── hemisphere ──────────────────────────────────────────────────────────────\n\nexport interface HemisphereLight3DProps extends Node3DProps, Partial<LightParamsOf<HemisphereLightData3D>> { }\n\n// ─── directional ─────────────────────────────────────────────────────────────\n\nexport interface DirectionalLight3DProps extends Node3DProps, Partial<LightParamsOf<DirectionalLightData3D>> { }\n\n// ─── point ───────────────────────────────────────────────────────────────────\n\nexport interface PointLight3DProps extends Node3DProps, Partial<LightParamsOf<PointLightData3D>> { }\n\n// ─── spot ────────────────────────────────────────────────────────────────────\n\nexport interface SpotLight3DProps extends Node3DProps, Partial<LightParamsOf<SpotLightData3D>> { }\n\n// ─── area ────────────────────────────────────────────────────────────────────\n\nexport interface AreaLight3DProps extends Node3DProps, Partial<LightParamsOf<AreaLightData3D>> { }\n\n/**\n * The camera — where the scene is viewed from.\n *\n * **One node, two projections.** `<Camera3D type=\"orthographic\">` is the flat\n * one; there is no second class, because a perspective and an orthographic\n * camera are one object with a projection setting, which is how every editor\n * presents it and how a scene switching between them has to be written.\n *\n * Camera3D({ target: [0, 0.2, 0], orbit: -18, elevation: 12, distance: 13, fov: 42 })\n *\n * cam().to({ data: { orbit: 160, elevation: 30 }, duration: 4, easing: easeInOut(\"quad\") });\n *\n * ── Orbit, not trigonometry ───────────────────────────────────────────────────\n * `target`/`orbit`/`elevation`/`distance` place the camera in polar coordinates\n * around the thing it is looking at, which is what a camera move almost always\n * *is*. Written through `position` the same move is a `Math.sin`/`Math.cos` pair\n * recomputed every frame in a prop binding — which is exactly what every scene\n * did before this existed.\n *\n * `position` and `lookAt` still work and are right for a shot pinned to\n * something; setting any polar field takes over, so the two can never be half\n * applied. Either way the camera is a node, so parenting it to a moving\n * `Group3D` carries the shot with the rig.\n *\n * ── What is derived ───────────────────────────────────────────────────────────\n * `near`/`far` come from the scene's own bounds unless you set them, and the\n * aspect ratio always tracks the viewport's layout box — it was a prop whose\n * documentation said \"don't set this\", and setting it stretched the render.\n * An asymmetric orthographic frustum is a `params` override rather than four\n * more fields.\n *\n * A scene with no camera gets a sensible default framing. A scene that declares\n * more than one keeps the last, since there is only ever one view.\n */\nexport interface Camera3DProps extends Node3DProps {\n /** `\"perspective\"` (default) or `\"orthographic\"`. */\n type: CameraData3D[\"type\"];\n /**\n * The point the camera looks at, and orbits around.\n *\n * On its own it is `lookAt` under a name that reads right beside `orbit`;\n * together with any of the three below it is also the centre they turn about.\n */\n target: Vector3Input | undefined;\n /** Azimuth around {@link target}, in **degrees**. */\n orbit: number | undefined;\n /** Angle above the horizon, in **degrees**. */\n elevation: number | undefined;\n /** Distance from {@link target}. */\n distance: number | undefined;\n /** Perspective only: vertical field of view in **degrees**. Default 50. */\n fov: number | undefined;\n /** Orthographic only: visible world height. Default 10. */\n frustumHeight: number | undefined;\n near: number | undefined;\n far: number | undefined;\n zoom: number | undefined;\n}\n\n/**\n * The two scene-wide nodes that are left: fog and environment.\n *\n * `Shadows3D`, `ToneMapping3D` and `PostEffects3D` used to be here and are now\n * props on `Canvas3D`. They were never scene *objects* — a viewport's shadow\n * quality, its tone curve and its post chain are settings of the thing doing the\n * rendering, and writing them as nodes meant a node with no position whose\n * duplicates silently did nothing. `Background3D` is gone entirely: what is drawn\n * behind a 3D scene is the viewport's own 2D `fill`.\n *\n * These two stay nodes because they *are* about the space: fog is a property of\n * the air in it, and an environment is the sky around it. Both are still\n * positionless, so declaring two of the same kind is not an error but only the\n * last takes effect.\n *\n * Fog3D({ near: 5, far: 30 })\n * Environment3D({ preset: \"studio\" })\n */\n\n// ─── fog ─────────────────────────────────────────────────────────────────────\n\nexport interface Fog3DProps extends Node3DProps {\n /** Defaults to the viewport's own fill — see below. */\n color: Color | undefined;\n /** Distance at which fog starts. Linear fog. */\n near: number | undefined;\n /** Distance at which fog is total. Linear fog. */\n far: number | undefined;\n /** Exponential-squared falloff. Wins over {@link near}/{@link far}. */\n density: number | undefined;\n}\n\n// ─── environment ─────────────────────────────────────────────────────────────\n\nexport interface Environment3DProps extends Node3DProps {\n /**\n * A 360° panorama — `.hdr`/`.exr` for real IBL, or a plain image.\n * **Inert today**: no backend loads it, so only `preset` renders.\n */\n src: string | undefined;\n /**\n * Six cubemap faces, in three's order: +X, −X, +Y, −Y, +Z, −Z.\n * **Inert today**: no backend loads them, so only `preset` renders.\n */\n faces: readonly string[] | undefined;\n /** A generated studio interior. Needs no asset. The only environment that renders. */\n preset: \"studio\" | undefined;\n intensity: number | undefined;\n /** Also draw it behind the scene, as an infinitely distant sky. */\n background: boolean | undefined;\n /** Blur the background only, 0–1. The lighting stays sharp. */\n blur: number | undefined;\n}\n"]}
|