@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
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
8
|
-
import { colorProperty } from "../../attributes/properties/typed.js";
|
|
9
|
-
import { Node3D } from "./node3d.js";
|
|
10
|
-
/**
|
|
11
|
-
* A light's own parameters, gathered off the props that were actually set.
|
|
12
|
-
*
|
|
13
|
-
* Omitted keys stay absent so the renderer's default applies, exactly as the
|
|
14
|
-
* `Graphics3D` light sugar does.
|
|
15
|
-
*/
|
|
16
|
-
function lightFrom(type, node, keys) {
|
|
17
|
-
const out = { type };
|
|
18
|
-
for (const key of keys) {
|
|
19
|
-
const value = node[key];
|
|
20
|
-
if (value !== undefined)
|
|
21
|
-
out[key] = value;
|
|
22
|
-
}
|
|
23
|
-
return out;
|
|
24
|
-
}
|
|
25
|
-
/** Shared base: every light draws itself by declaring itself to the context. */
|
|
26
|
-
class Light3DNode extends Node3D {
|
|
27
|
-
/** Loads nothing — and recording `renderSelf` would make every light prop a dependency. */
|
|
28
|
-
declareAssets() { }
|
|
29
|
-
renderSelf(ctx) {
|
|
30
|
-
ctx.light(this.buildLight());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A light that can cast a shadow map.
|
|
35
|
-
*
|
|
36
|
-
* `shadow` is the {@link Shadow3D} every node carries, and it defaults to `true`
|
|
37
|
-
* there because that is right for a *mesh* — turning shadows on should make
|
|
38
|
-
* meshes cast and receive without tagging each one. A light is the other half of
|
|
39
|
-
* that trade: every light casting is N shadow maps, and a point light's is six
|
|
40
|
-
* faces. So the default is flipped here, in the constructor rather than by
|
|
41
|
-
* redeclaring the prop, because the property registry keeps the base class's
|
|
42
|
-
* metadata for a key and a subclass decorator would be silently ignored.
|
|
43
|
-
*/
|
|
44
|
-
class ShadowCastingLight3D extends Light3DNode {
|
|
45
|
-
constructor(props) {
|
|
46
|
-
super(props);
|
|
47
|
-
// Only when the author said nothing: an explicit `shadow` — including
|
|
48
|
-
// `shadow={false}` — has already been written by `initProps`.
|
|
49
|
-
if (props?.shadow === undefined)
|
|
50
|
-
this.applyProp("shadow", false);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const AMBIENT_KEYS = ["color", "intensity"];
|
|
54
|
-
/** Flat, directionless fill light. The cheapest way to stop shadows being black. */
|
|
55
|
-
export class AmbientLight3D extends Light3DNode {
|
|
56
|
-
buildLight() {
|
|
57
|
-
return lightFrom("ambient", this, AMBIENT_KEYS);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
__decorate([
|
|
61
|
-
colorProperty({ default: undefined })
|
|
62
|
-
], AmbientLight3D.prototype, "color", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
property({ default: undefined })
|
|
65
|
-
], AmbientLight3D.prototype, "intensity", void 0);
|
|
66
|
-
const HEMISPHERE_KEYS = ["sky", "ground", "intensity"];
|
|
67
|
-
/**
|
|
68
|
-
* Sky-to-ground gradient fill — ambient light with a sense of up.
|
|
69
|
-
*
|
|
70
|
-
* The two colours are `sky` and `ground`. They were `color` and `groundColor`,
|
|
71
|
-
* and the node's `color` was silently dropped: the descriptor and the renderer
|
|
72
|
-
* both read `skyColor`, which nothing ever wrote.
|
|
73
|
-
*/
|
|
74
|
-
export class HemisphereLight3D extends Light3DNode {
|
|
75
|
-
buildLight() {
|
|
76
|
-
return lightFrom("hemisphere", this, HEMISPHERE_KEYS);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
__decorate([
|
|
80
|
-
colorProperty({ default: undefined })
|
|
81
|
-
], HemisphereLight3D.prototype, "sky", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
colorProperty({ default: undefined })
|
|
84
|
-
], HemisphereLight3D.prototype, "ground", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
property({ default: undefined })
|
|
87
|
-
], HemisphereLight3D.prototype, "intensity", void 0);
|
|
88
|
-
const DIRECTIONAL_KEYS = ["color", "intensity", "target", "shadow"];
|
|
89
|
-
/**
|
|
90
|
-
* Parallel rays from a direction — the sun. Its `position` sets the direction it
|
|
91
|
-
* shines *from*, toward `target` (the origin by default).
|
|
92
|
-
*/
|
|
93
|
-
export class DirectionalLight3D extends ShadowCastingLight3D {
|
|
94
|
-
buildLight() {
|
|
95
|
-
return lightFrom("directional", this, DIRECTIONAL_KEYS);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
__decorate([
|
|
99
|
-
colorProperty({ default: undefined })
|
|
100
|
-
], DirectionalLight3D.prototype, "color", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
property({ default: undefined })
|
|
103
|
-
], DirectionalLight3D.prototype, "intensity", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
property({ default: undefined })
|
|
106
|
-
], DirectionalLight3D.prototype, "target", void 0);
|
|
107
|
-
const POINT_KEYS = ["color", "intensity", "distance", "decay", "shadow"];
|
|
108
|
-
/** A bulb: light radiating from a point, falling off with distance. */
|
|
109
|
-
export class PointLight3D extends ShadowCastingLight3D {
|
|
110
|
-
buildLight() {
|
|
111
|
-
return lightFrom("point", this, POINT_KEYS);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
__decorate([
|
|
115
|
-
colorProperty({ default: undefined })
|
|
116
|
-
], PointLight3D.prototype, "color", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
property({ default: undefined })
|
|
119
|
-
], PointLight3D.prototype, "intensity", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
property({ default: undefined })
|
|
122
|
-
], PointLight3D.prototype, "distance", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
property({ default: undefined })
|
|
125
|
-
], PointLight3D.prototype, "decay", void 0);
|
|
126
|
-
const SPOT_KEYS = ["color", "intensity", "distance", "angle", "penumbra", "decay", "target", "shadow"];
|
|
127
|
-
/** A cone of light. `angle` is the cone half-angle, in **degrees**. */
|
|
128
|
-
export class SpotLight3D extends ShadowCastingLight3D {
|
|
129
|
-
buildLight() {
|
|
130
|
-
return lightFrom("spot", this, SPOT_KEYS);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
__decorate([
|
|
134
|
-
colorProperty({ default: undefined })
|
|
135
|
-
], SpotLight3D.prototype, "color", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
property({ default: undefined })
|
|
138
|
-
], SpotLight3D.prototype, "intensity", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ default: undefined })
|
|
141
|
-
], SpotLight3D.prototype, "distance", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
property({ default: undefined })
|
|
144
|
-
], SpotLight3D.prototype, "angle", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
property({ default: undefined })
|
|
147
|
-
], SpotLight3D.prototype, "penumbra", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
property({ default: undefined })
|
|
150
|
-
], SpotLight3D.prototype, "decay", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ default: undefined })
|
|
153
|
-
], SpotLight3D.prototype, "target", void 0);
|
|
154
|
-
const AREA_KEYS = ["color", "intensity", "width", "height"];
|
|
155
|
-
/** A glowing rectangle — a softbox. Lights `standard`/`physical` materials only. */
|
|
156
|
-
export class AreaLight3D extends Light3DNode {
|
|
157
|
-
buildLight() {
|
|
158
|
-
return lightFrom("area", this, AREA_KEYS);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
__decorate([
|
|
162
|
-
colorProperty({ default: undefined })
|
|
163
|
-
], AreaLight3D.prototype, "color", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
property({ default: undefined })
|
|
166
|
-
], AreaLight3D.prototype, "intensity", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
property({ default: undefined })
|
|
169
|
-
], AreaLight3D.prototype, "width", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
property({ default: undefined })
|
|
172
|
-
], AreaLight3D.prototype, "height", void 0);
|
|
173
|
-
//# sourceMappingURL=light-nodes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"light-nodes.js","sourceRoot":"","sources":["../../../src/nodes/three/light-nodes.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,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,SAAS,CAAC,CAAC;IAC9C,CAAC;CACJ;AARkD;IAA9C,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAkC;AAC9B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;8CAAuC;AAC9B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAmC;AAC1B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;2CAAoC","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\nimport { colorProperty } from \"@/attributes/properties/typed\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type {\n AmbientLightData3D, AreaLightData3D, DirectionalLightData3D,\n HemisphereLightData3D, LightData3D, PointLightData3D, SpotLightData3D,\n} from \"@/render3d/light\";\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\n\nimport { Node3D, type Node3DProps } from \"./node3d\";\nimport type { NodeConfig } from \"@/nodes/node/node\";\n\n/**\n * The light nodes.\n *\n * A light is a thing in the scene with a position, so it is a `Node3D` like any\n * other — it can sit inside a `Group3D` and be carried by it, be held by a ref,\n * and have its `intensity` or `color` tweened:\n *\n * <DirectionalLight3D ref={key} intensity={2.4} position={[4, 6, 3]} shadow />\n * key().to({ data: { intensity: 0.2 }, duration: 1 });\n *\n * `AmbientLight3D` and `HemisphereLight3D` have no position — they light the\n * whole scene evenly — but are still nodes, so they read the same way in a tree.\n *\n * ── Intensity is one scale ────────────────────────────────────────────────────\n * A point or spot light's `intensity` means the same thing a directional light's\n * does: 1 is a normal light. three measures the first two in candela and the\n * third in lux, which is physically correct and is why scenes ended up written\n * with `intensity={2.4}` beside `intensity={40}`. The renderer converts.\n */\n\n/** Params of a light descriptor, minus its discriminant. */\n// `shadow` is dropped because `Node3DProps` already declares it, as the broader\n// `Shadow3D` a mesh also takes — one prop, one type, asked of both kinds of node.\ntype ParamsOf<L extends { type: string }> = Omit<L, \"type\" | \"shadow\">;\n\n/**\n * A light's own parameters, gathered off the props that were actually set.\n *\n * Omitted keys stay absent so the renderer's default applies, exactly as the\n * `Graphics3D` light sugar does.\n */\nfunction lightFrom(type: LightData3D[\"type\"], node: object, keys: readonly string[]): LightData3D {\n const out: Record<string, unknown> = { type };\n for (const key of keys) {\n const value = (node as Record<string, unknown>)[key];\n if (value !== undefined) out[key] = value;\n }\n return out as unknown as LightData3D;\n}\n\n/** Shared base: every light draws itself by declaring itself to the context. */\nabstract class Light3DNode<P extends Node3DProps> extends Node3D<P> {\n /** The descriptor this node contributes. */\n protected abstract buildLight(): LightData3D;\n\n /** Loads nothing — and recording `renderSelf` would make every light prop a dependency. */\n override declareAssets(): void { }\n\n protected override renderSelf(ctx: RenderContext3D): void {\n ctx.light(this.buildLight());\n }\n}\n\n/**\n * A light that can cast a shadow map.\n *\n * `shadow` is the {@link Shadow3D} every node carries, and it defaults to `true`\n * there because that is right for a *mesh* — turning shadows on should make\n * meshes cast and receive without tagging each one. A light is the other half of\n * that trade: every light casting is N shadow maps, and a point light's is six\n * faces. So the default is flipped here, in the constructor rather than by\n * redeclaring the prop, because the property registry keeps the base class's\n * metadata for a key and a subclass decorator would be silently ignored.\n */\nabstract class ShadowCastingLight3D<P extends Node3DProps> extends Light3DNode<P> {\n constructor(props?: NodeConfig<any, P>) {\n super(props);\n // Only when the author said nothing: an explicit `shadow` — including\n // `shadow={false}` — has already been written by `initProps`.\n if (props?.shadow === undefined) this.applyProp(\"shadow\", false);\n }\n}\n\n// ─── ambient ─────────────────────────────────────────────────────────────────\n\nexport interface AmbientLight3DProps extends Node3DProps, Partial<ParamsOf<AmbientLightData3D>> { }\n\nconst AMBIENT_KEYS = [\"color\", \"intensity\"] as const;\n\n/** Flat, directionless fill light. The cheapest way to stop shadows being black. */\nexport class AmbientLight3D<P extends AmbientLight3DProps = AmbientLight3DProps> extends Light3DNode<P> {\n @colorProperty({ default: undefined }) declare color: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"ambient\", this, AMBIENT_KEYS);\n }\n}\n\n// ─── hemisphere ──────────────────────────────────────────────────────────────\n\nexport interface HemisphereLight3DProps extends Node3DProps, Partial<ParamsOf<HemisphereLightData3D>> { }\n\nconst HEMISPHERE_KEYS = [\"sky\", \"ground\", \"intensity\"] as const;\n\n/**\n * Sky-to-ground gradient fill — ambient light with a sense of up.\n *\n * The two colours are `sky` and `ground`. They were `color` and `groundColor`,\n * and the node's `color` was silently dropped: the descriptor and the renderer\n * both read `skyColor`, which nothing ever wrote.\n */\nexport class HemisphereLight3D<P extends HemisphereLight3DProps = HemisphereLight3DProps> extends Light3DNode<P> {\n @colorProperty({ default: undefined }) declare sky: Color | undefined;\n @colorProperty({ default: undefined }) declare ground: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"hemisphere\", this, HEMISPHERE_KEYS);\n }\n}\n\n// ─── directional ─────────────────────────────────────────────────────────────\n\nexport interface DirectionalLight3DProps extends Node3DProps, Partial<ParamsOf<DirectionalLightData3D>> { }\n\nconst DIRECTIONAL_KEYS = [\"color\", \"intensity\", \"target\", \"shadow\"] as const;\n\n/**\n * Parallel rays from a direction — the sun. Its `position` sets the direction it\n * shines *from*, toward `target` (the origin by default).\n */\nexport class DirectionalLight3D<P extends DirectionalLight3DProps = DirectionalLight3DProps> extends ShadowCastingLight3D<P> {\n @colorProperty({ default: undefined }) declare color: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n @property({ default: undefined }) declare target: DirectionalLightData3D[\"target\"];\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"directional\", this, DIRECTIONAL_KEYS);\n }\n}\n\n// ─── point ───────────────────────────────────────────────────────────────────\n\nexport interface PointLight3DProps extends Node3DProps, Partial<ParamsOf<PointLightData3D>> { }\n\nconst POINT_KEYS = [\"color\", \"intensity\", \"distance\", \"decay\", \"shadow\"] as const;\n\n/** A bulb: light radiating from a point, falling off with distance. */\nexport class PointLight3D<P extends PointLight3DProps = PointLight3DProps> extends ShadowCastingLight3D<P> {\n @colorProperty({ default: undefined }) declare color: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n @property({ default: undefined }) declare distance: number | undefined;\n @property({ default: undefined }) declare decay: number | undefined;\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"point\", this, POINT_KEYS);\n }\n}\n\n// ─── spot ────────────────────────────────────────────────────────────────────\n\nexport interface SpotLight3DProps extends Node3DProps, Partial<ParamsOf<SpotLightData3D>> { }\n\nconst SPOT_KEYS = [\"color\", \"intensity\", \"distance\", \"angle\", \"penumbra\", \"decay\", \"target\", \"shadow\"] as const;\n\n/** A cone of light. `angle` is the cone half-angle, in **degrees**. */\nexport class SpotLight3D<P extends SpotLight3DProps = SpotLight3DProps> extends ShadowCastingLight3D<P> {\n @colorProperty({ default: undefined }) declare color: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n @property({ default: undefined }) declare distance: number | undefined;\n @property({ default: undefined }) declare angle: number | undefined;\n @property({ default: undefined }) declare penumbra: number | undefined;\n @property({ default: undefined }) declare decay: number | undefined;\n @property({ default: undefined }) declare target: SpotLightData3D[\"target\"];\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"spot\", this, SPOT_KEYS);\n }\n}\n\n// ─── area ────────────────────────────────────────────────────────────────────\n\nexport interface AreaLight3DProps extends Node3DProps, Partial<ParamsOf<AreaLightData3D>> { }\n\nconst AREA_KEYS = [\"color\", \"intensity\", \"width\", \"height\"] as const;\n\n/** A glowing rectangle — a softbox. Lights `standard`/`physical` materials only. */\nexport class AreaLight3D<P extends AreaLight3DProps = AreaLight3DProps> extends Light3DNode<P> {\n @colorProperty({ default: undefined }) declare color: Color | undefined;\n @property({ default: undefined }) declare intensity: number | undefined;\n @property({ default: undefined }) declare width: number | undefined;\n @property({ default: undefined }) declare height: number | undefined;\n\n protected override buildLight(): LightData3D {\n return lightFrom(\"area\", this, AREA_KEYS);\n }\n}\n\n"]}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { Color } from "../../attributes/shape/fill/color/parser.js";
|
|
2
|
-
import { Graphics3D, type MaterialShorthand3D } from "../../render3d/graphics3d.js";
|
|
3
|
-
import { type Fill3D } from "../../render3d/fill3d.js";
|
|
4
|
-
import type { Geometry3D } from "../../render3d/geometry.js";
|
|
5
|
-
import type { Material3D, Shading3D } from "../../render3d/material.js";
|
|
6
|
-
import type { Texture3D } from "../../render3d/texture.js";
|
|
7
|
-
import type { RenderContext3D } from "../../render3d/render-context3d.js";
|
|
8
|
-
import type { Blend3D, Faces3D } from "../../render3d/transform.js";
|
|
9
|
-
import { Node3D, type Node3DProps } from "./node3d.js";
|
|
10
|
-
/**
|
|
11
|
-
* The material shorthand, as node props.
|
|
12
|
-
*
|
|
13
|
-
* Exactly the keys {@link MaterialShorthand3D} promotes onto the `Graphics3D`
|
|
14
|
-
* sugar methods, so `<Box3D fill="red" roughness={0.3} />` and
|
|
15
|
-
* `g3.box({ fill: "red", roughness: 0.3 })` describe the same mesh — and each is
|
|
16
|
-
* a real prop here, so any of them can be tweened.
|
|
17
|
-
*
|
|
18
|
-
* Ten props, where there were twenty-four. What went is everything that was a
|
|
19
|
-
* renderer knob rather than a design decision — `depthWrite`, `depthTest`,
|
|
20
|
-
* `alphaTest`, `toneMapped`, `polygonOffset`, `dithering` — which now live only
|
|
21
|
-
* on a `Mat.*` descriptor passed through {@link material}; plus `transparent`,
|
|
22
|
-
* which is derived; plus five texture slots, which are fills.
|
|
23
|
-
*/
|
|
24
|
-
export interface Material3DProps {
|
|
25
|
-
/** A full descriptor (or an array, for multi-material). Wins over the rest. */
|
|
26
|
-
material: Material3D | readonly Material3D[] | undefined;
|
|
27
|
-
/** What the surface is made of — the same value a 2D `fill` takes. */
|
|
28
|
-
fill: Fill3D;
|
|
29
|
-
opacity: number;
|
|
30
|
-
roughness: number;
|
|
31
|
-
metalness: number;
|
|
32
|
-
emission: Color | undefined;
|
|
33
|
-
emissionStrength: number;
|
|
34
|
-
normalMap: Texture3D | undefined;
|
|
35
|
-
roughnessMap: Texture3D | undefined;
|
|
36
|
-
metalnessMap: Texture3D | undefined;
|
|
37
|
-
aoMap: Texture3D | undefined;
|
|
38
|
-
alphaMap: Texture3D | undefined;
|
|
39
|
-
envMapIntensity: number;
|
|
40
|
-
wireframe: boolean;
|
|
41
|
-
/** Facet or smooth shading. Default `"smooth"`. */
|
|
42
|
-
shading: Shading3D;
|
|
43
|
-
/** Which faces to rasterize. Default `"front"`. */
|
|
44
|
-
faces: Faces3D;
|
|
45
|
-
vertexColors: boolean;
|
|
46
|
-
blend: Blend3D;
|
|
47
|
-
/** Shade with an unlit `basic` material instead of `standard`. */
|
|
48
|
-
unlit: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface Mesh3DProps extends Node3DProps, Partial<Material3DProps> {
|
|
51
|
-
/** The geometry to draw. Set directly, or by a geometry subclass's props. */
|
|
52
|
-
geometry: Geometry3D;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* A drawable 3D object — geometry plus a material.
|
|
56
|
-
*
|
|
57
|
-
* The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and
|
|
58
|
-
* the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to
|
|
59
|
-
* supply a geometry from their own props.
|
|
60
|
-
*
|
|
61
|
-
* <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill="tomato" roughness={0.2} />
|
|
62
|
-
* <Box3D fill={["#1a1a2e", Fills.linearGradient(["#e0533d", "#8b5cf6"])]} />
|
|
63
|
-
*
|
|
64
|
-
* Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: "cyan" }, duration: 1 })`
|
|
65
|
-
* animates in place — three writes the values onto the live material rather than
|
|
66
|
-
* recompiling. Geometry *parameters* are the exception: three geometries are
|
|
67
|
-
* immutable, so tweening a `radius` reallocates the mesh every frame. Tween
|
|
68
|
-
* `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.
|
|
69
|
-
*/
|
|
70
|
-
export declare class Mesh3D<P extends Mesh3DProps = Mesh3DProps> extends Node3D<P> {
|
|
71
|
-
geometry: Geometry3D;
|
|
72
|
-
material: Material3D | readonly Material3D[] | undefined;
|
|
73
|
-
fill: Fill3D;
|
|
74
|
-
opacity: number | undefined;
|
|
75
|
-
roughness: number | undefined;
|
|
76
|
-
metalness: number | undefined;
|
|
77
|
-
emission: Color | undefined;
|
|
78
|
-
emissionStrength: number | undefined;
|
|
79
|
-
normalMap: Texture3D | undefined;
|
|
80
|
-
roughnessMap: Texture3D | undefined;
|
|
81
|
-
metalnessMap: Texture3D | undefined;
|
|
82
|
-
aoMap: Texture3D | undefined;
|
|
83
|
-
alphaMap: Texture3D | undefined;
|
|
84
|
-
envMapIntensity: number | undefined;
|
|
85
|
-
wireframe: boolean | undefined;
|
|
86
|
-
shading: Shading3D | undefined;
|
|
87
|
-
faces: Faces3D | undefined;
|
|
88
|
-
vertexColors: boolean | undefined;
|
|
89
|
-
blend: Blend3D | undefined;
|
|
90
|
-
unlit: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* The geometry this node draws.
|
|
93
|
-
*
|
|
94
|
-
* Overridden by each sugar subclass to build one from its own props; the base
|
|
95
|
-
* returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works
|
|
96
|
-
* for anything the sugar doesn't cover.
|
|
97
|
-
*/
|
|
98
|
-
protected buildGeometry(): Geometry3D | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* The material shorthand, gathered off the props that were actually set.
|
|
101
|
-
*
|
|
102
|
-
* `undefined` defaults are deliberate: an omitted key must stay absent from
|
|
103
|
-
* the descriptor so `Graphics3D` picks the renderer's own default, rather than
|
|
104
|
-
* being pinned to a value this node invented.
|
|
105
|
-
*/
|
|
106
|
-
protected materialShorthand(): MaterialShorthand3D;
|
|
107
|
-
/**
|
|
108
|
-
* What this node draws this frame.
|
|
109
|
-
*
|
|
110
|
-
* The single seam both the real render and the asset-declaration pass go
|
|
111
|
-
* through — the same discipline as `Rect.shapeGraphics()` — so the textures
|
|
112
|
-
* that get loaded can never drift from the ones that get drawn.
|
|
113
|
-
*/
|
|
114
|
-
protected buildGraphics3D(): Graphics3D;
|
|
115
|
-
protected renderSelf(ctx: RenderContext3D): void;
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=mesh3d.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mesh3d.d.ts","sourceRoot":"","sources":["../../../src/nodes/three/mesh3d.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,UAAU,EAA8B,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC5B,+EAA+E;IAC/E,QAAQ,EAAE,UAAU,GAAG,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IACzD,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB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SAAS,GAAG,SAAS,CAAC;IACpC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IAErD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,IAAI,UAAU,GAAG,SAAS;IAIjD;;;;;;OAMG;IACH,SAAS,CAAC,iBAAiB,IAAI,mBAAmB;IAalD;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,IAAI,UAAU;cAOpB,UAAU,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;CAG5D"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
8
|
-
import { colorProperty } from "../../attributes/properties/typed.js";
|
|
9
|
-
import { Graphics3D, resolveMaterialShorthand3D } from "../../render3d/graphics3d.js";
|
|
10
|
-
import { lerpFill3D } from "../../render3d/fill3d.js";
|
|
11
|
-
import { Node3D } from "./node3d.js";
|
|
12
|
-
/** The shorthand keys, in the order they are copied onto a built descriptor. */
|
|
13
|
-
const MATERIAL_PROP_KEYS = [
|
|
14
|
-
"opacity", "roughness", "metalness",
|
|
15
|
-
"emission", "emissionStrength", "normalMap", "roughnessMap",
|
|
16
|
-
"metalnessMap", "aoMap", "alphaMap", "envMapIntensity", "wireframe",
|
|
17
|
-
"shading", "faces", "vertexColors", "blend",
|
|
18
|
-
];
|
|
19
|
-
/**
|
|
20
|
-
* A drawable 3D object — geometry plus a material.
|
|
21
|
-
*
|
|
22
|
-
* The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and
|
|
23
|
-
* the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to
|
|
24
|
-
* supply a geometry from their own props.
|
|
25
|
-
*
|
|
26
|
-
* <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill="tomato" roughness={0.2} />
|
|
27
|
-
* <Box3D fill={["#1a1a2e", Fills.linearGradient(["#e0533d", "#8b5cf6"])]} />
|
|
28
|
-
*
|
|
29
|
-
* Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: "cyan" }, duration: 1 })`
|
|
30
|
-
* animates in place — three writes the values onto the live material rather than
|
|
31
|
-
* recompiling. Geometry *parameters* are the exception: three geometries are
|
|
32
|
-
* immutable, so tweening a `radius` reallocates the mesh every frame. Tween
|
|
33
|
-
* `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.
|
|
34
|
-
*/
|
|
35
|
-
export class Mesh3D extends Node3D {
|
|
36
|
-
/**
|
|
37
|
-
* The geometry this node draws.
|
|
38
|
-
*
|
|
39
|
-
* Overridden by each sugar subclass to build one from its own props; the base
|
|
40
|
-
* returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works
|
|
41
|
-
* for anything the sugar doesn't cover.
|
|
42
|
-
*/
|
|
43
|
-
buildGeometry() {
|
|
44
|
-
return this.geometry;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The material shorthand, gathered off the props that were actually set.
|
|
48
|
-
*
|
|
49
|
-
* `undefined` defaults are deliberate: an omitted key must stay absent from
|
|
50
|
-
* the descriptor so `Graphics3D` picks the renderer's own default, rather than
|
|
51
|
-
* being pinned to a value this node invented.
|
|
52
|
-
*/
|
|
53
|
-
materialShorthand() {
|
|
54
|
-
const out = {};
|
|
55
|
-
const material = this.material;
|
|
56
|
-
if (material !== undefined)
|
|
57
|
-
out.material = material;
|
|
58
|
-
if (this.fill !== undefined)
|
|
59
|
-
out.fill = this.fill;
|
|
60
|
-
for (const key of MATERIAL_PROP_KEYS) {
|
|
61
|
-
const value = this[key];
|
|
62
|
-
if (value !== undefined)
|
|
63
|
-
out[key] = value;
|
|
64
|
-
}
|
|
65
|
-
if (this.unlit)
|
|
66
|
-
out.unlit = true;
|
|
67
|
-
return out;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* What this node draws this frame.
|
|
71
|
-
*
|
|
72
|
-
* The single seam both the real render and the asset-declaration pass go
|
|
73
|
-
* through — the same discipline as `Rect.shapeGraphics()` — so the textures
|
|
74
|
-
* that get loaded can never drift from the ones that get drawn.
|
|
75
|
-
*/
|
|
76
|
-
buildGraphics3D() {
|
|
77
|
-
const g3 = new Graphics3D();
|
|
78
|
-
const geometry = this.buildGeometry();
|
|
79
|
-
if (geometry)
|
|
80
|
-
g3.mesh(geometry, resolveMaterialShorthand3D(this.materialShorthand()));
|
|
81
|
-
return g3;
|
|
82
|
-
}
|
|
83
|
-
renderSelf(ctx) {
|
|
84
|
-
ctx.draw(this.buildGraphics3D());
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
__decorate([
|
|
88
|
-
property({ default: undefined })
|
|
89
|
-
], Mesh3D.prototype, "geometry", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
property({ default: undefined })
|
|
92
|
-
], Mesh3D.prototype, "material", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
property({ default: "white", tween: lerpFill3D })
|
|
95
|
-
], Mesh3D.prototype, "fill", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
property({ default: undefined })
|
|
98
|
-
], Mesh3D.prototype, "opacity", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ default: undefined })
|
|
101
|
-
], Mesh3D.prototype, "roughness", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
property({ default: undefined })
|
|
104
|
-
], Mesh3D.prototype, "metalness", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
colorProperty({ default: undefined })
|
|
107
|
-
], Mesh3D.prototype, "emission", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
property({ default: undefined })
|
|
110
|
-
], Mesh3D.prototype, "emissionStrength", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
property({ default: undefined })
|
|
113
|
-
], Mesh3D.prototype, "normalMap", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
property({ default: undefined })
|
|
116
|
-
], Mesh3D.prototype, "roughnessMap", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
property({ default: undefined })
|
|
119
|
-
], Mesh3D.prototype, "metalnessMap", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
property({ default: undefined })
|
|
122
|
-
], Mesh3D.prototype, "aoMap", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
property({ default: undefined })
|
|
125
|
-
], Mesh3D.prototype, "alphaMap", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
property({ default: undefined })
|
|
128
|
-
], Mesh3D.prototype, "envMapIntensity", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
property({ default: undefined })
|
|
131
|
-
], Mesh3D.prototype, "wireframe", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
property({ default: undefined })
|
|
134
|
-
], Mesh3D.prototype, "shading", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
property({ default: undefined })
|
|
137
|
-
], Mesh3D.prototype, "faces", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property({ default: undefined })
|
|
140
|
-
], Mesh3D.prototype, "vertexColors", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ default: undefined })
|
|
143
|
-
], Mesh3D.prototype, "blend", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
property({ default: false })
|
|
146
|
-
], Mesh3D.prototype, "unlit", void 0);
|
|
147
|
-
//# sourceMappingURL=mesh3d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mesh3d.js","sourceRoot":"","sources":["../../../src/nodes/three/mesh3d.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAA4B,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,UAAU,EAAe,MAAM,mBAAmB,CAAC;AAM5D,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAgDpD,gFAAgF;AAChF,MAAM,kBAAkB,GAAG;IACvB,SAAS,EAAE,WAAW,EAAE,WAAW;IACnC,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc;IAC3D,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW;IACnE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;CACrC,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,MAA4C,SAAQ,MAAS;IAuBtE;;;;;;OAMG;IACO,aAAa;QACnB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACO,iBAAiB;QACvB,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,QAAQ,KAAK,SAAS;YAAE,GAAG,CAAC,QAAQ,GAAG,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E,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAuC;AACzB;IAA9C,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;wCAAqC;AACjC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;gDAA8C;AACrC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAA0C;AACjC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAsC;AAC7B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;wCAAyC;AAChC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;+CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAwC;AAC/B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;uCAAwC;AAC/B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAoC;AAC3B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAA2C;AAClC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAoC;AAC/B;IAArC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;qCAAwB","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\nimport { colorProperty } from \"@/attributes/properties/typed\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport { Graphics3D, resolveMaterialShorthand3D, type MaterialShorthand3D } from \"@/render3d/graphics3d\";\nimport { lerpFill3D, type Fill3D } from \"@/render3d/fill3d\";\nimport type { Geometry3D } from \"@/render3d/geometry\";\nimport type { Material3D, Shading3D } from \"@/render3d/material\";\nimport type { Texture3D } from \"@/render3d/texture\";\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\nimport type { Blend3D, Faces3D } from \"@/render3d/transform\";\nimport { Node3D, type Node3DProps } from \"./node3d\";\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 by a geometry subclass's props. */\n geometry: Geometry3D;\n}\n\n/** The shorthand keys, in the order they are copied onto a built descriptor. */\nconst MATERIAL_PROP_KEYS = [\n \"opacity\", \"roughness\", \"metalness\",\n \"emission\", \"emissionStrength\", \"normalMap\", \"roughnessMap\",\n \"metalnessMap\", \"aoMap\", \"alphaMap\", \"envMapIntensity\", \"wireframe\",\n \"shading\", \"faces\", \"vertexColors\", \"blend\",\n] as const;\n\n/**\n * A drawable 3D object — geometry plus a material.\n *\n * The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and\n * the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to\n * supply a geometry from their own props.\n *\n * <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill=\"tomato\" roughness={0.2} />\n * <Box3D fill={[\"#1a1a2e\", Fills.linearGradient([\"#e0533d\", \"#8b5cf6\"])]} />\n *\n * Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: \"cyan\" }, duration: 1 })`\n * animates in place — three writes the values onto the live material rather than\n * recompiling. Geometry *parameters* are the exception: three geometries are\n * immutable, so tweening a `radius` reallocates the mesh every frame. Tween\n * `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.\n */\nexport class Mesh3D<P extends Mesh3DProps = Mesh3DProps> extends Node3D<P> {\n @property({ default: undefined }) declare geometry: Geometry3D;\n @property({ default: undefined }) declare material: Material3D | readonly Material3D[] | undefined;\n\n @property({ default: \"white\", tween: lerpFill3D }) declare fill: Fill3D;\n @property({ default: undefined }) declare opacity: number | undefined;\n @property({ default: undefined }) declare roughness: number | undefined;\n @property({ default: undefined }) declare metalness: number | undefined;\n @colorProperty({ default: undefined }) declare emission: Color | undefined;\n @property({ default: undefined }) declare emissionStrength: number | undefined;\n @property({ default: undefined }) declare normalMap: Texture3D | undefined;\n @property({ default: undefined }) declare roughnessMap: Texture3D | undefined;\n @property({ default: undefined }) declare metalnessMap: Texture3D | undefined;\n @property({ default: undefined }) declare aoMap: Texture3D | undefined;\n @property({ default: undefined }) declare alphaMap: Texture3D | undefined;\n @property({ default: undefined }) declare envMapIntensity: number | undefined;\n @property({ default: undefined }) declare wireframe: boolean | undefined;\n @property({ default: undefined }) declare shading: Shading3D | undefined;\n @property({ default: undefined }) declare faces: Faces3D | undefined;\n @property({ default: undefined }) declare vertexColors: boolean | undefined;\n @property({ default: undefined }) declare blend: Blend3D | undefined;\n @property({ default: false }) declare unlit: boolean;\n\n /**\n * The geometry this node draws.\n *\n * Overridden by each sugar subclass to build one from its own props; the base\n * returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works\n * for anything the sugar doesn't cover.\n */\n protected buildGeometry(): Geometry3D | undefined {\n return this.geometry;\n }\n\n /**\n * The material shorthand, gathered off the props that were actually set.\n *\n * `undefined` defaults are deliberate: an omitted key must stay absent from\n * the descriptor so `Graphics3D` picks the renderer's own default, rather than\n * being pinned to a value this node invented.\n */\n protected materialShorthand(): MaterialShorthand3D {\n const out: Record<string, unknown> = {};\n const material = this.material;\n if (material !== undefined) out.material = material;\n if (this.fill !== undefined) out.fill = this.fill;\n for (const key of MATERIAL_PROP_KEYS) {\n const value = (this as unknown as Record<string, unknown>)[key];\n if (value !== undefined) out[key] = value;\n }\n if (this.unlit) out.unlit = true;\n return out as MaterialShorthand3D;\n }\n\n /**\n * What this node draws this frame.\n *\n * The single seam both the real render and the asset-declaration pass go\n * through — the same discipline as `Rect.shapeGraphics()` — so the textures\n * that get loaded can never drift from the ones that get drawn.\n */\n protected buildGraphics3D(): Graphics3D {\n const g3 = new Graphics3D();\n const geometry = this.buildGeometry();\n if (geometry) g3.mesh(geometry, resolveMaterialShorthand3D(this.materialShorthand()));\n return g3;\n }\n\n protected override renderSelf(ctx: RenderContext3D): void {\n ctx.draw(this.buildGraphics3D());\n }\n}\n\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node3d.d.ts","sourceRoot":"","sources":["../../../src/nodes/three/node3d.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,KAA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,CAAC;gBACrB,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS;oBAAE,SAAS;gBACtC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7D,CAAC;YACD,SAAS;QACb,CAAC;QAED,MAAM,MAAM,GAAG,cAAc,CAAC,KAAqB,CAAC,CAAC;QACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS;gBAAE,GAAG,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACpE,CAAC;QAED,wDAAwD;QACxD,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YACrB,MAAM,KAAK,GAAI,KAAgB,CAAC,KAAK,CAAC;YACtC,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS;gBAAE,GAAG,CAAC,aAAa,GAAG,KAAK,CAAC;QAC1F,CAAC;IACL,CAAC;IAED,OAAQ,GAAS,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED,SAAS,WAAW,CAAC,MAAe,EAAE,KAAa;IAC/C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtE,CAAC","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\nimport { quaternionProperty } from \"@/attributes/properties/typed\";\nimport {\n resolveVector3,\n type Euler3, type EulerOrder, type Quaternion, type Vector3, type Vector3Input,\n} from \"@/render3d/vector3\";\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\nimport { Scene3D } from \"@/render3d/scene3d\";\nimport { declare3DResources } from \"@/render3d/tracking\";\nimport type { AssetScope } from \"@/assets/scope\";\nimport type { Shadow3D, Transform3D } from \"@/render3d/transform\";\nimport { Node, type NodeConfig, type NodeDimension, type NodeProps } from \"@/nodes/node/node\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport type { TweenStepper } from \"@/tween/stepper\";\n\nexport interface Node3DProps extends NodeProps {\n /** Position in the parent's local space. A scalar sets all three axes. */\n position: Vector3Input;\n /** Position on one axis. The same names 2D uses, one dimension over. */\n x: number;\n y: number;\n z: number;\n /**\n * Euler rotation in **degrees**, matching 2D `rotation`. Ignored when\n * {@link quaternion} is set.\n */\n rotation: Vector3Input | Euler3;\n /** Rotation about one axis, in **degrees**. Same names as 2D's. */\n rotationX: number;\n rotationY: number;\n rotationZ: number;\n /** The order the Euler axes are applied in. Default `\"XYZ\"`. */\n rotationOrder: EulerOrder;\n /**\n * Rotation as a unit quaternion. Wins over {@link rotation} — use it for\n * tumbles where Euler interpolation would gimbal.\n */\n quaternion: Quaternion;\n /** Per-axis scale; a scalar scales uniformly. Default 1. */\n scale: Vector3Input;\n scaleX: number;\n scaleY: number;\n scaleZ: number;\n /**\n * World-space point to orient toward, applied after {@link position}. Wins\n * over both {@link rotation} and {@link quaternion}.\n */\n lookAt: Vector3Input | undefined;\n /** Hide without removing — the cached renderer object stays alive. */\n visible: boolean;\n /**\n * Shadow participation. Default `true`, so turning shadows on for the scene\n * turns them on. Pass `false` to opt out, or `\"cast\"`/`\"receive\"` for one half.\n */\n shadow: Shadow3D;\n /** Draw-order override, for tuning transparent sorting. */\n renderOrder: number;\n}\n\n/** The three axis props each vector prop distributes into, in order. */\nconst VECTOR_SUGAR: Readonly<Record<string, readonly [string, string, string]>> = {\n position: [\"x\", \"y\", \"z\"],\n rotation: [\"rotationX\", \"rotationY\", \"rotationZ\"],\n scale: [\"scaleX\", \"scaleY\", \"scaleZ\"],\n};\n\n/**\n * A thing in 3D space — the root of the 3D scene graph.\n *\n * The sibling of {@link Node2D}: same tree, same props, same `to()`/`set()`/\n * `save()`/`restore()`, same refs, context and per-node clock, all inherited from\n * {@link Node}. What differs is the only thing that genuinely differs between the\n * two — how a node is placed and how it draws. There is no `width`, no `padding`,\n * no anchor and no flex here, because none of them mean anything for a mesh; a 3D\n * node's whole placement is its transform.\n *\n * <Canvas3D>\n * <Camera3D orbit={30} elevation={18} distance={6} />\n * <AmbientLight3D intensity={0.4} />\n * <Group3D ref={rig}>\n * <Box3D width={2} cornerRadius={0.15} fill=\"tomato\" />\n * </Group3D>\n * </Canvas3D>\n *\n * rig().to({ data: { rotationY: 360, y: 1 }, duration: 2 });\n *\n * ── Axes are scalars, and vectors are sugar over them ─────────────────────────\n * `x`, `y`, `z`, `rotationX/Y/Z` and `scaleX/Y/Z` are the real props, and they\n * are named exactly what 2D names them. `position`, `rotation` and `scale` are\n * distributed into those three, the way `Node2D` already distributes `size` into\n * `width`/`height` — so both spellings tween identically and there is one source\n * of truth for where a node is. That is what makes `to({ y: 3 })` work: with a\n * single vector prop it would have had nothing to interpolate on the other two\n * axes, which is exactly the trap that made every 3D scene restate coordinates it\n * did not mean to change.\n *\n * A `Node3D` only ever lives under a `Canvas3D` — the one node that holds both\n * dimensions. Parenting one to a `Rect` throws rather than silently drawing\n * nothing (see {@link Node.acceptsChild}).\n *\n * To write your own, override {@link renderSelf} and hand a `Graphics3D` to the\n * context — the exact shape of a custom 2D node's `renderSelf`:\n *\n * class Blob3D extends Node3D {\n * protected override renderSelf(ctx: RenderContext3D): void {\n * ctx.draw(new Graphics3D().sphere({ radius: 1, fill: \"red\" }));\n * }\n * }\n */\nexport class Node3D<P extends Node3DProps = Node3DProps> extends Node<P> {\n get dimension(): NodeDimension { return \"3d\"; }\n\n @property({ default: 0 }) declare x: number;\n @property({ default: 0 }) declare y: number;\n @property({ default: 0 }) declare z: number;\n\n @property({ default: 0 }) declare rotationX: number;\n @property({ default: 0 }) declare rotationY: number;\n @property({ default: 0 }) declare rotationZ: number;\n @property({ default: \"XYZ\" }) declare rotationOrder: EulerOrder;\n\n @quaternionProperty() declare quaternion: Quaternion;\n\n @property({ default: 1 }) declare scaleX: number;\n @property({ default: 1 }) declare scaleY: number;\n @property({ default: 1 }) declare scaleZ: number;\n\n @property({ default: undefined }) declare lookAt: Vector3Input | undefined;\n @property({ default: true }) declare visible: boolean;\n @property({ default: true }) declare shadow: Shadow3D;\n @property({ default: 0 }) declare renderOrder: number;\n\n constructor(props?: NodeConfig<any, P>) {\n super(props);\n // Distributed before `initProps`, which only ever applies keys that are\n // registered props — a `position` left in the bag would be dropped.\n this.initProps(distributeVectors(props) as NodeConfig<any, P>);\n this.adoptChildrenProp(props);\n }\n\n /** This node's position, composed from the axis props. */\n get position(): Vector3 {\n return { x: this.x, y: this.y, z: this.z };\n }\n set position(value: Vector3Input) {\n this.set({ position: value } as never);\n }\n\n /** This node's Euler rotation in degrees, composed from the axis props. */\n get rotation(): Euler3 {\n return { x: this.rotationX, y: this.rotationY, z: this.rotationZ, order: this.rotationOrder };\n }\n set rotation(value: Vector3Input | Euler3) {\n this.set({ rotation: value } as never);\n }\n\n /** This node's scale, composed from the axis props. */\n get scale(): Vector3 {\n return { x: this.scaleX, y: this.scaleY, z: this.scaleZ };\n }\n set scale(value: Vector3Input) {\n this.set({ scale: value } as never);\n }\n\n /**\n * Distribute the vector sugar into axis props, then write as usual.\n *\n * Same shape as `Node2D.set`'s handling of `size`, and for the same reason:\n * `position` has no slot of its own, so it has to become three writes\n * before the generic loop runs. An explicitly stated axis in the same call\n * wins over the vector, which is what lets `{ position: p, y: 0 }` mean what\n * it reads like.\n */\n override set(props: { [K in keyof P]?: P[K] | (() => P[K]) }): void {\n super.set(distributeVectors(props) as typeof props);\n }\n\n /**\n * The tween half of the same rule. Expanded here rather than in the command\n * so `to({ position: [...] })` and `to({ x, y, z })` produce identical\n * steppers — one interpolating path, whichever way it was written.\n */\n override _prepareStep(to: Partial<P>, duration: number, easing?: EasingFunction): TweenStepper {\n return super._prepareStep(distributeVectors(to) as Partial<P>, duration, easing);\n }\n\n /**\n * This node's placement, as the renderer's own vocabulary.\n *\n * Sampled fresh every frame from the prop slots, so a tween moves the object\n * without anything here caching state between frames.\n *\n * `quaternion` is only emitted when it has been set away from identity: it\n * wins over `rotation` in a {@link Transform3D}, so always sending it would\n * make `rotation` silently do nothing.\n */\n protected transform3D(): Transform3D {\n const quaternion = this.quaternion as unknown as Quaternion;\n const identityQuaternion =\n quaternion.x === 0 && quaternion.y === 0 && quaternion.z === 0 && quaternion.w === 1;\n return {\n position: this.position,\n rotation: this.rotation,\n quaternion: identityQuaternion ? undefined : quaternion,\n scale: this.scale,\n lookAt: this.lookAt,\n visible: this.visible,\n shadow: this.shadow,\n renderOrder: this.renderOrder,\n };\n }\n\n /**\n * The transform that goes on this node's *group* — the scope its children\n * nest inside. Defaults to this node's own placement, which is right for\n * everything that lives at its own origin.\n *\n * A camera overrides it to identity and places itself instead: three aims a\n * camera's -Z at `lookAt` but a plain group's +Z, so hanging a camera's\n * placement on its group would point the shot backwards.\n */\n protected groupTransform(): Transform3D {\n return this.transform3D();\n }\n\n /**\n * Draw this node's own contribution to the scene — a `ctx.draw(graphics3D)`\n * for something with geometry, a `ctx.light(...)` for a light, nothing at all\n * for a plain {@link Group3D}. Children are recorded after it, nested inside\n * this node's transform.\n */\n protected renderSelf(ctx: RenderContext3D): void { }\n\n /**\n * Record this node and its subtree into `ctx`.\n *\n * An invisible node still opens its scope: `visible: false` is a renderer-side\n * flag on a live object rather than a removal, which is what lets a node be\n * hidden and shown again without its GPU resources being rebuilt. Skipping the\n * walk here would instead sweep the whole subtree out of the cache.\n */\n render(ctx: RenderContext3D): void {\n // The editor's flag folds into `visible` rather than adding a second one:\n // the 3D side already has exactly this concept, honoured by the picking\n // walk, and two flags meaning \"do not show this\" would be two places to\n // ask. Still opens its scope — see the note above on why an invisible\n // node keeps its cached renderer object.\n if (this.hidden) {\n ctx.begin({ id: this.id, transform: { ...this.groupTransform(), visible: false } });\n ctx.end();\n return;\n }\n ctx.begin({ id: this.id, transform: this.groupTransform() });\n this.renderSelf(ctx);\n for (const child of this._children) {\n if (child instanceof Node3D) child.render(ctx);\n }\n ctx.end();\n }\n\n /**\n * What {@link renderSelf} records, never {@link render}: the placement lives on\n * the group scope, so moving a node does not change what it declares.\n */\n declareAssets(assets: AssetScope): void {\n if (this.renderSelf === Node3D.prototype.renderSelf) return;\n const scene = new Scene3D();\n this.renderSelf(scene);\n declare3DResources(scene, assets);\n }\n}\n\n/**\n * Expand `position`/`rotation`/`scale` in a prop bag into their axis props.\n *\n * Returns the bag untouched when it names none of them, so the common write path\n * allocates nothing. A **binding** expands into three bindings that each resolve\n * the vector and take one component — so `position={() => lift()}` stays a\n * binding, and one thunk driving all three axes is still read once per axis per\n * frame rather than being frozen at bind time.\n */\nfunction distributeVectors<T extends object>(props: T | undefined): T | undefined {\n if (!props) return props;\n\n let out: Record<string, unknown> | undefined;\n\n for (const key in VECTOR_SUGAR) {\n const value = (props as Record<string, unknown>)[key];\n if (value === undefined) continue;\n\n out ??= { ...(props as Record<string, unknown>) };\n delete out[key];\n\n const axes = VECTOR_SUGAR[key];\n\n if (typeof value === \"function\") {\n const read = value as () => Vector3Input;\n for (let i = 0; i < 3; i++) {\n const axis = axes[i];\n if (out[axis] !== undefined) continue;\n out[axis] = () => componentOf(resolveVector3(read()), i);\n }\n continue;\n }\n\n const vector = resolveVector3(value as Vector3Input);\n for (let i = 0; i < 3; i++) {\n const axis = axes[i];\n if (out[axis] === undefined) out[axis] = componentOf(vector, i);\n }\n\n // `order` rides on an Euler and has nowhere else to go.\n if (key === \"rotation\") {\n const order = (value as Euler3).order;\n if (order !== undefined && out.rotationOrder === undefined) out.rotationOrder = order;\n }\n }\n\n return (out as T) ?? props;\n}\n\nfunction componentOf(vector: Vector3, index: number): number {\n return index === 0 ? vector.x : index === 1 ? vector.y : vector.z;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../../src/render/descriptors/latex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"latex.js","sourceRoot":"","sources":["../../../src/render/descriptors/latex.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeState } from \"./shape\";\n\nexport interface LatexState extends ShapeState {\n latex: string;\n fontSize: number;\n}\n\n"]}
|