@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
package/dist/render3d/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* painting 3D through an arbitrary 2D path.
|
|
13
13
|
*
|
|
14
14
|
* Nothing in this directory imports a renderer, and no field holds a DOM handle —
|
|
15
|
-
* so `three`
|
|
15
|
+
* so `three` never enters core.
|
|
16
16
|
*/
|
|
17
17
|
export { Graphics3D } from "./graphics3d.js";
|
|
18
18
|
/** @internal */ export { DRAWABLE_KINDS, resolveMaterialShorthand3D } from "./graphics3d.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/render3d/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,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BAAsB,EAAE,MAAM,UAAU,CAAC;AAKnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAMpD,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5E,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/**\n * 3D scene description.\n *\n * The same split as 2D, one dimension over: a {@link Graphics3D} is what a single\n * node draws (the `Graphics2D` of 3D), a {@link RenderContext3D} is what it draws\n * *into*, and a {@link Scene3D} is the recorded result — camera, lights, fog and\n * every drawable — that a backend replays.\n *\n * Unlike `@/render` (whose descriptors are `@internal`, since nodes build them on\n * the author's behalf), the vocabulary here is **public**: a `Node3D` takes these\n * descriptors as props, and a hand-built `Scene3D` is the escape hatch for\n * painting 3D through an arbitrary 2D path.\n *\n * Nothing in this directory imports a renderer, and no field holds a DOM handle —\n * so `three`
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/render3d/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;A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E,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5E,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/**\n * 3D scene description.\n *\n * The same split as 2D, one dimension over: a {@link Graphics3D} is what a single\n * node draws (the `Graphics2D` of 3D), a {@link RenderContext3D} is what it draws\n * *into*, and a {@link Scene3D} is the recorded result — camera, lights, fog and\n * every drawable — that a backend replays.\n *\n * Unlike `@/render` (whose descriptors are `@internal`, since nodes build them on\n * the author's behalf), the vocabulary here is **public**: a `Node3D` takes these\n * descriptors as props, and a hand-built `Scene3D` is the escape hatch for\n * painting 3D through an arbitrary 2D path.\n *\n * Nothing in this directory imports a renderer, and no field holds a DOM handle —\n * so `three` never enters core.\n */\n\nexport { Graphics3D } from \"./graphics3d\";\nexport type {\n Graphics3DOp, LineMode3D, LineStroke3D, ModelAnimation3D,\n MaterialShorthand3D, MeshShorthand3D,\n} from \"./graphics3d\";\n/** @internal */ export { DRAWABLE_KINDS, resolveMaterialShorthand3D } from \"./graphics3d\";\n\nexport { Scene3D } from \"./scene3d\";\nexport type { Scene3DOp } from \"./scene3d\";\n\nexport { RenderContext3D } from \"./render-context3d\";\nexport type { Node3DRenderState } from \"./render-context3d\";\n\nexport { Geo, Mat, Tex } from \"./builders\";\n\nexport { resolveFill3D, looksLikeAssetPath } from \"./fill3d\";\nexport type { Fill3D, Fill3DOptions, ResolvedFill3D } from \"./fill3d\";\n\nexport { segmentsOf } from \"./segments\";\nexport type { Segments3D } from \"./segments\";\n\nexport { evaluateRoundedBox } from \"./rounded-box\";\nexport type { RoundedBoxOptions } from \"./rounded-box\";\n\nexport {\n lerpVector3, lerpEuler3, slerpQuaternion, normalizeQuaternion,\n quaternionFromEuler, resolveVector3, IDENTITY_QUATERNION,\n vector3Ops, euler3Ops, quaternionOps,\n} from \"./vector3\";\nexport type { Vector3, Vector3Input, Euler3, EulerOrder, Quaternion } from \"./vector3\";\n\nexport { shadowCasts, shadowReceives, resolveShadowOptions3D } from \"./transform\";\nexport type { Transform3D, Shadow3D, ShadowOptions3D, Faces3D, Blend3D } from \"./transform\";\n\nexport { geometryBounds3D } from \"./bounds3d\";\nexport type { Box3 } from \"./bounds3d\";\n/** @internal */ export { centeredBox3, corners3, transformBox3, unionBox3 } from \"./bounds3d\";\n\n/** @internal */ export {\n applyMatrix4, compose4, identity4, invert4, lookAtRotation4, multiply4,\n orthographic4, perspective4, rotationOf4, transformMatrix4, translation4,\n} from \"./matrix4\";\n/** @internal */ export type { Matrix4, Vector4 } from \"./matrix4\";\n\nexport { evaluateParametric, cylinderRadii, resolveBevel3D } from \"./geometry\";\nexport type {\n Geometry3D, Passthrough3D, Sweep3D, Bevel3D,\n BoxGeometry3D, SphereGeometry3D, PlaneGeometry3D, CylinderGeometry3D,\n ConeGeometry3D, TorusGeometry3D, TorusKnotGeometry3D, CircleGeometry3D,\n RingGeometry3D, CapsuleGeometry3D, PolyhedronGeometry3D, ExtrudeGeometry3D,\n LatheGeometry3D, TubeGeometry3D, BufferGeometry3D, ParametricGeometry3D,\n ParametricVertex3D, EdgesGeometry3D, WireframeGeometry3D, ModelGeometry3D,\n} from \"./geometry\";\n\nexport { MUTABLE_MATERIAL_KEYS, STRUCTURAL_MATERIAL_KEYS } from \"./material\";\nexport type {\n Material3D, MaterialCommon3D, Uniform3D, Shading3D,\n BasicMaterial3D, StandardMaterial3D, PhysicalMaterial3D, PhongMaterial3D,\n LambertMaterial3D, ToonMaterial3D, NormalMaterial3D, DepthMaterial3D,\n MatcapMaterial3D, PointsMaterial3D, LineBasicMaterial3D, LineDashedMaterial3D,\n SpriteMaterial3D, ShadowMaterial3D, ShaderMaterial3D,\n} from \"./material\";\n\nexport { isDataTexture3D, isSurfaceTexture3D, resolveTexture3D, resolveSurfaceSource, texture3DSource } from \"./texture\";\nexport type {\n Texture3D, ImageTexture3D, DataTexture3D, SurfaceTexture3D, TextureOptions3D,\n SurfaceSource3D, ResolvedSurfaceSource,\n TextureWrap3D, TextureFilter3D, TextureColorSpace3D,\n} from \"./texture\";\n\nexport type {\n LightData3D,\n AmbientLightData3D, HemisphereLightData3D, DirectionalLightData3D,\n PointLightData3D, SpotLightData3D, AreaLightData3D,\n} from \"./light\";\n\nexport { isOrbitCamera3D, resolveCameraPlacement } from \"./camera\";\nexport type {\n CameraData3D, CameraCommon3D, PerspectiveCameraData3D, OrthographicCameraData3D,\n} from \"./camera\";\n\nexport { resolveShadows3D } from \"./scene-settings\";\nexport type {\n FogData3D, EnvironmentData3D, ShadowSettings3D, Shadows3D,\n ToneSettings3D, ToneMapping3D, PostEffect3D,\n} from \"./scene-settings\";\n\n/** @internal */ export { forEachTexture3D, isTextureLike, TEXTURE_KEYS } from \"./walk\";\n\nexport { registerCanvas3DWarmup, registerCanvas3DResourceLoader } from \"./resources\";\nexport { canvas3DResourceKey, parseCanvas3DResourceKey } from \"./resources\";\nexport type { Canvas3DWarmup, Canvas3DResourceLoader, Canvas3DResourceKind } from \"./resources\";\n/** @internal */ export { warmCanvas3D, canvas3DResourceLoader, hasCanvas3DBackend } from \"./resources\";\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Graphics3DOp } from "./graphics3d.js";
|
|
2
|
+
/**
|
|
3
|
+
* Print `message` once per `key`, in development only.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare function warnInert3D(key: string, message: string): void;
|
|
7
|
+
/** Forget what has been warned, so a test can see the same warning again. @internal */
|
|
8
|
+
export declare function resetInertWarnings3D(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Check one recorded drawable for inputs the renderer ignores.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function inspectDrawable3D(op: Graphics3DOp): void;
|
|
14
|
+
//# sourceMappingURL=inert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/render3d/inert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA0BjD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAI9D;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAiCxD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development warnings for 3D inputs that are accepted, typed and recorded, and
|
|
3
|
+
* that no renderer acts on.
|
|
4
|
+
*
|
|
5
|
+
* A few corners of the 3D vocabulary are declared ahead of the backend: the post
|
|
6
|
+
* chain, HDR/EXR/cubemap environments, `params` on a geometry or an environment,
|
|
7
|
+
* `extends` on a shader material and OBJ models. Each is stored faithfully and
|
|
8
|
+
* read by nothing, so a scene that uses one renders exactly like a scene without
|
|
9
|
+
* it — and with no error, which is the part that costs an afternoon. These say so
|
|
10
|
+
* once, in development, naming the input and what to do instead.
|
|
11
|
+
*
|
|
12
|
+
* Each message is printed once per session. Nothing here changes what is
|
|
13
|
+
* recorded, so none of it can move a frame.
|
|
14
|
+
*/
|
|
15
|
+
const warned = new Set();
|
|
16
|
+
let development;
|
|
17
|
+
/** Read once: in Node, `process.env` is a lookup per access. */
|
|
18
|
+
function isDevelopment() {
|
|
19
|
+
return (development ??= process.env.NODE_ENV !== "production");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Print `message` once per `key`, in development only.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export function warnInert3D(key, message) {
|
|
26
|
+
if (!isDevelopment() || warned.has(key))
|
|
27
|
+
return;
|
|
28
|
+
warned.add(key);
|
|
29
|
+
console.warn(`[motionscript] ${message}`);
|
|
30
|
+
}
|
|
31
|
+
/** Forget what has been warned, so a test can see the same warning again. @internal */
|
|
32
|
+
export function resetInertWarnings3D() {
|
|
33
|
+
warned.clear();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check one recorded drawable for inputs the renderer ignores.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function inspectDrawable3D(op) {
|
|
40
|
+
if (!isDevelopment())
|
|
41
|
+
return;
|
|
42
|
+
if ("geometry" in op) {
|
|
43
|
+
const params = op.geometry.params;
|
|
44
|
+
if (params && Object.keys(params).length > 0) {
|
|
45
|
+
warnInert3D(`geometry-params:${op.geometry.type}`, `\`params\` on a "${op.geometry.type}" geometry is not applied: three builds a geometry from its named fields and nothing assigns \`params\` onto it. `
|
|
46
|
+
+ "Set the geometry's own fields instead. (`params` is applied on materials, lights and cameras.)");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if ("material" in op) {
|
|
50
|
+
const materials = Array.isArray(op.material) ? op.material : [op.material];
|
|
51
|
+
for (const material of materials) {
|
|
52
|
+
if (material.type === "shader" && material.extends != null) {
|
|
53
|
+
warnInert3D("shader-extends", `\`extends: "${material.extends}"\` on a shader material is not applied: the shader replaces the built-in model, so scene lighting, shadows and fog do not reach it. `
|
|
54
|
+
+ "Write the lighting you need in the shader.");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (op.kind === "model" && /\.obj(?:$|[?#])/i.test(op.src)) {
|
|
59
|
+
warnInert3D("model-obj", `The model "${op.src}" is an OBJ file, and only glTF/GLB models load: it will draw nothing. Convert it to .glb.`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=inert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inert.js","sourceRoot":"","sources":["../../src/render3d/inert.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;AACjC,IAAI,WAAgC,CAAC;A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,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;gBACzD,WAAW,CACP,gBAAgB,EAChB,eAAe,QAAQ,CAAC,OAAO,uIAAuI;sBACpK,4CAA4C,CACjD,CAAC;YACN,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QACzD,WAAW,CACP,WAAW,EACX,cAAc,EAAE,CAAC,GAAG,4FAA4F,CACnH,CAAC;IACN,CAAC;AACL,CAAC","sourcesContent":["import type { Graphics3DOp } from \"./graphics3d\";\nimport type { Material3D } from \"./material\";\n\n/**\n * Development warnings for 3D inputs that are accepted, typed and recorded, and\n * that no renderer acts on.\n *\n * A few corners of the 3D vocabulary are declared ahead of the backend: the post\n * chain, HDR/EXR/cubemap environments, `params` on a geometry or an environment,\n * `extends` on a shader material and OBJ models. Each is stored faithfully and\n * read by nothing, so a scene that uses one renders exactly like a scene without\n * it — and with no error, which is the part that costs an afternoon. These say so\n * once, in development, naming the input and what to do instead.\n *\n * Each message is printed once per session. Nothing here changes what is\n * recorded, so none of it can move a frame.\n */\n\nconst warned = new Set<string>();\nlet development: boolean | undefined;\n\n/** Read once: in Node, `process.env` is a lookup per access. */\nfunction isDevelopment(): boolean {\n return (development ??= process.env.NODE_ENV !== \"production\");\n}\n\n/**\n * Print `message` once per `key`, in development only.\n * @internal\n */\nexport function warnInert3D(key: string, message: string): void {\n if (!isDevelopment() || warned.has(key)) return;\n warned.add(key);\n console.warn(`[motionscript] ${message}`);\n}\n\n/** Forget what has been warned, so a test can see the same warning again. @internal */\nexport function resetInertWarnings3D(): void {\n warned.clear();\n}\n\n/**\n * Check one recorded drawable for inputs the renderer ignores.\n * @internal\n */\nexport function inspectDrawable3D(op: Graphics3DOp): void {\n if (!isDevelopment()) return;\n\n if (\"geometry\" in op) {\n const params = op.geometry.params;\n if (params && Object.keys(params).length > 0) {\n warnInert3D(\n `geometry-params:${op.geometry.type}`,\n `\\`params\\` on a \"${op.geometry.type}\" geometry is not applied: three builds a geometry from its named fields and nothing assigns \\`params\\` onto it. `\n + \"Set the geometry's own fields instead. (`params` is applied on materials, lights and cameras.)\",\n );\n }\n }\n\n if (\"material\" in op) {\n const materials = Array.isArray(op.material) ? op.material : [op.material];\n for (const material of materials as readonly Material3D[]) {\n if (material.type === \"shader\" && material.extends != null) {\n warnInert3D(\n \"shader-extends\",\n `\\`extends: \"${material.extends}\"\\` on a shader material is not applied: the shader replaces the built-in model, so scene lighting, shadows and fog do not reach it. `\n + \"Write the lighting you need in the shader.\",\n );\n }\n }\n }\n\n if (op.kind === \"model\" && /\\.obj(?:$|[?#])/i.test(op.src)) {\n warnInert3D(\n \"model-obj\",\n `The model \"${op.src}\" is an OBJ file, and only glTF/GLB models load: it will draw nothing. Convert it to .glb.`,\n );\n }\n}\n"]}
|
|
@@ -216,8 +216,9 @@ export interface PointsMaterial3D extends MaterialCommon3D {
|
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
218
|
* Shading for a `line`. Note `width` is capped at 1px by most WebGL
|
|
219
|
-
* implementations regardless of what you set
|
|
220
|
-
*
|
|
219
|
+
* implementations regardless of what you set, and **nothing substitutes a
|
|
220
|
+
* mesh-backed line** for a larger one: it is written to `linewidth` and that is
|
|
221
|
+
* all. For a genuinely thick line draw a `tube`.
|
|
221
222
|
*/
|
|
222
223
|
export interface LineBasicMaterial3D extends MaterialCommon3D {
|
|
223
224
|
type: "lineBasic";
|
|
@@ -265,9 +266,10 @@ export type Uniform3D = number | boolean | Color | Vector2 | Vector3 | {
|
|
|
265
266
|
* driving them from tweened props costs nothing. Uniform *names* and the shader
|
|
266
267
|
* **source** are structural — changing either recompiles the program.
|
|
267
268
|
*
|
|
268
|
-
*
|
|
269
|
-
* it,
|
|
270
|
-
*
|
|
269
|
+
* {@link extends} is declared to patch three's built-in lit shader instead of
|
|
270
|
+
* replacing it, but **it is not read yet**: a shader always replaces the model, so
|
|
271
|
+
* scene lighting, shadows and fog do not reach it. The first material that sets
|
|
272
|
+
* it warns in development. Write the lighting you need in the shader.
|
|
271
273
|
*/
|
|
272
274
|
export interface ShaderMaterial3D extends MaterialCommon3D {
|
|
273
275
|
type: "shader";
|
|
@@ -281,6 +283,9 @@ export interface ShaderMaterial3D extends MaterialCommon3D {
|
|
|
281
283
|
/**
|
|
282
284
|
* Wrap a built-in shading model rather than replacing it, so scene lighting,
|
|
283
285
|
* shadows and fog still apply. Null (the default) is a raw shader.
|
|
286
|
+
*
|
|
287
|
+
* **Not implemented**: no backend reads it, so every shader is a plain
|
|
288
|
+
* replacement whatever this says.
|
|
284
289
|
*/
|
|
285
290
|
extends?: "standard" | "basic" | "phong" | null;
|
|
286
291
|
/** Skip three's automatic attribute/uniform prelude (a raw shader). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../src/render3d/material.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,uEAAuE;AACvE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACnD,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;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a,EAAE,gBAAgB;IACxE,mBAAmB,EAAE,eAAe,EAAE,YAAY,EAAE,oBAAoB;IACxE,kBAAkB,EAAE,qBAAqB;IACzC,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB;IACxD,aAAa,EAAE,mBAAmB,EAAE,kBAAkB;IACtD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;IAC3D,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,oBAAoB;CACzE,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACvD,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO;IACzD,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW;IACpD,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;CAC/C,CAAC","sourcesContent":["import type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { Vector3 } from \"./vector3\";\nimport type { Passthrough3D } from \"./geometry\";\nimport type { Blend3D, Faces3D } from \"./transform\";\nimport type { Texture3D } from \"./texture\";\n\n/** Facet or smooth shading. `\"flat\"` gives one normal per triangle. */\nexport type Shading3D = \"smooth\" | \"flat\";\n\n/**\n * State every material shares, regardless of shading model.\n *\n * A note on cost, because it is not obvious: the fields in the first block are\n * plain uniform writes the renderer can mutate in place every frame, so they are\n * free to animate. The fields marked **structural** change the compiled shader\n * program, so changing one mid-timeline forces a recompile — set them once and\n * leave them alone rather than tweening them.\n */\nexport interface MaterialCommon3D extends Passthrough3D {\n /** 0–1. Free to animate; blending is turned on for you below 1. */\n opacity?: number;\n /** Hide without removing. Free to animate. */\n visible?: boolean;\n\n /**\n * **Structural, and normally derived rather than written.**\n *\n * The renderer turns alpha blending on whenever anything about the material\n * actually needs it — `opacity` below 1, a colour carrying alpha, an\n * `alphaMap`, or transmission — so an author never has to pair a fade with a\n * second flag, and `opacity: 0.5` can no longer silently do nothing (which is\n * exactly what it did when this defaulted to `false`).\n *\n * Set it explicitly only to *force* blending on a fully opaque material, which\n * is occasionally wanted for draw-order reasons. Setting it `false` does not\n * turn off blending a lower alpha requires; there is no useful meaning for\n * that, and it only ever expressed a bug.\n */\n transparent?: boolean;\n /** **Structural.** Discard fragments below this alpha. Cheap cutout transparency. */\n alphaTest?: number;\n /** **Structural.** Which faces to rasterize. Default `\"front\"`. */\n faces?: Faces3D;\n /** **Structural.** Draw edges only. */\n wireframe?: boolean;\n /** **Structural.** How the colour combines with the framebuffer. */\n blend?: Blend3D;\n /** **Structural.** Read per-vertex colours from the geometry's `color` buffer. */\n vertexColors?: boolean;\n /** **Structural.** Apply the scene's tone mapping. Default true. */\n toneMapped?: boolean;\n\n /**\n * Write to the depth buffer.\n *\n * **Derived unless stated**: a blended surface stops writing depth, and an\n * opaque one writes it. three defaults this to `true` for everything, so a\n * translucent mesh occluded whatever was drawn after it — a surface at 5%\n * opacity rendering as a near-invisible cut-out through the things behind\n * it. Set it explicitly for a translucent surface that genuinely should\n * occlude.\n */\n depthWrite?: boolean;\n /** Test against the depth buffer. Turn off to force draw-on-top. */\n depthTest?: boolean;\n /** Nudge depth to break z-fighting between coplanar surfaces. */\n polygonOffset?: boolean;\n polygonOffsetFactor?: number;\n polygonOffsetUnits?: number;\n /** Smooth gradient banding. */\n dithering?: boolean;\n}\n\n/** Maps shared by the lit shading models. */\ninterface CommonMaps3D {\n /** Base colour (albedo). Sampled as sRGB. */\n map?: Texture3D;\n /** Per-pixel opacity, read from the red channel. */\n alphaMap?: Texture3D;\n /** Ambient occlusion, read from the red channel. Needs a second UV set. */\n aoMap?: Texture3D;\n aoMapIntensity?: number;\n /** Tangent-space normals. Sampled as linear data, not colour. */\n normalMap?: Texture3D;\n /** Normal strength, per axis. A number applies to both. */\n normalScale?: number | Vector2;\n /** Displaces vertices along their normals. Needs a subdivided geometry. */\n displacementMap?: Texture3D;\n displacementScale?: number;\n displacementBias?: number;\n /** Reflected environment. Usually inherited from the scene's environment. */\n envMap?: Texture3D;\n /** Multiplies light received from the environment. */\n envMapIntensity?: number;\n /** Baked light added on top, unaffected by scene lights. */\n lightMap?: Texture3D;\n lightMapIntensity?: number;\n}\n\n/** Emission shared by the lit shading models. */\ninterface Emissive3D {\n /** Self-illumination colour. Does not light other objects (see `post` bloom). */\n emission?: Color;\n emissionStrength?: number;\n emissionMap?: Texture3D;\n}\n\n/** Unlit — a flat colour, ignoring every light. The cheapest material. */\nexport interface BasicMaterial3D extends MaterialCommon3D, CommonMaps3D {\n type: \"basic\";\n color?: Color;\n}\n\n/**\n * Physically based metal/rough shading. The sensible default for most surfaces:\n * `roughness` and `metalness` cover the majority of real materials, and both are\n * free to animate.\n */\nexport interface StandardMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"standard\";\n color?: Color;\n /** 0 mirror-smooth → 1 fully diffuse. */\n roughness?: number;\n /** 0 dielectric → 1 metal. Metals tint their reflections by `color`. */\n metalness?: number;\n roughnessMap?: Texture3D;\n metalnessMap?: Texture3D;\n /** **Structural.** Facet or smooth shading. Default `\"smooth\"`. */\n shading?: Shading3D;\n}\n\n/**\n * Everything {@link StandardMaterial3D} has plus the expensive extras: clearcoat,\n * transmission (real refraction), sheen and iridescence. Costs more per pixel, so\n * reach for `standard` unless a surface needs these.\n */\nexport interface PhysicalMaterial3D extends Omit<StandardMaterial3D, \"type\"> {\n type: \"physical\";\n /** A second specular lobe over the base — car paint, lacquer, varnish. */\n clearcoat?: number;\n clearcoatRoughness?: number;\n clearcoatMap?: Texture3D;\n clearcoatNormalMap?: Texture3D;\n clearcoatRoughnessMap?: Texture3D;\n /** Light transmitted *through* the surface — glass, water. Blends for you. */\n transmission?: number;\n transmissionMap?: Texture3D;\n /** Wall thickness for transmission tinting. */\n thickness?: number;\n thicknessMap?: Texture3D;\n /** Volumetric absorption colour at {@link attenuationDistance}. */\n attenuationColor?: Color;\n attenuationDistance?: number;\n /** Index of refraction. 1.5 glass, 1.33 water, 2.42 diamond. */\n ior?: number;\n /** Retroreflective sheen — cloth, velvet, dust. */\n sheen?: number;\n sheenColor?: Color;\n sheenRoughness?: number;\n /** Thin-film interference — soap bubbles, oil slicks, beetle shells. */\n iridescence?: number;\n iridescenceIOR?: number;\n iridescenceThicknessRange?: readonly [number, number];\n /** Strength/tint of the dielectric specular highlight. */\n specularIntensity?: number;\n specularColor?: Color;\n /** Anisotropic (brushed-metal) highlight stretching. */\n anisotropy?: number;\n /** Degrees. */\n anisotropyRotation?: number;\n}\n\n/** Classic Blinn-Phong: a diffuse term plus a tight specular highlight. */\nexport interface PhongMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"phong\";\n color?: Color;\n specular?: Color;\n /** Highlight tightness. Higher is smaller and sharper. */\n shininess?: number;\n specularMap?: Texture3D;\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Diffuse-only Lambertian shading. Cheap; good for matte and unlit-ish looks. */\nexport interface LambertMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"lambert\";\n color?: Color;\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Banded cel shading. `gradientMap` controls the steps. */\nexport interface ToonMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"toon\";\n color?: Color;\n gradientMap?: Texture3D;\n}\n\n/** Surface normals as RGB. A debugging workhorse. */\nexport interface NormalMaterial3D extends MaterialCommon3D {\n type: \"normal\";\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Depth as greyscale. For debugging and custom depth passes. */\nexport interface DepthMaterial3D extends MaterialCommon3D {\n type: \"depth\";\n}\n\n/** Lit by a pre-baked sphere image. Very cheap, very stylizable. */\nexport interface MatcapMaterial3D extends MaterialCommon3D {\n type: \"matcap\";\n color?: Color;\n matcap?: Texture3D;\n map?: Texture3D;\n normalMap?: Texture3D;\n normalScale?: number | Vector2;\n}\n\n/** Shading for a `points` cloud. */\nexport interface PointsMaterial3D extends MaterialCommon3D {\n type: \"points\";\n color?: Color;\n size?: number;\n /** Shrink distant points with perspective. Default true. */\n sizeAttenuation?: boolean;\n map?: Texture3D;\n alphaMap?: Texture3D;\n}\n\n/**\n * Shading for a `line`. Note `width` is capped at 1px by most WebGL\n * implementations regardless of what you set — for genuinely thick lines the\n * renderer substitutes a mesh-backed line when `width > 1`.\n */\nexport interface LineBasicMaterial3D extends MaterialCommon3D {\n type: \"lineBasic\";\n color?: Color;\n width?: number;\n}\n\n/** A dashed line. Requires computed line distances, which the renderer handles. */\nexport interface LineDashedMaterial3D extends MaterialCommon3D {\n type: \"lineDashed\";\n color?: Color;\n width?: number;\n dashSize?: number;\n gapSize?: number;\n /** Offset along the line — animate for a marching-ants effect. */\n scale?: number;\n}\n\n/** Shading for a camera-facing `sprite`. */\nexport interface SpriteMaterial3D extends MaterialCommon3D {\n type: \"sprite\";\n color?: Color;\n map?: Texture3D;\n /** Degrees. */\n rotation?: number;\n}\n\n/** Receives shadows onto an otherwise invisible surface. For AR-style grounding. */\nexport interface ShadowMaterial3D extends MaterialCommon3D {\n type: \"shadow\";\n color?: Color;\n}\n\n/**\n * A shader uniform value. Deliberately narrow: everything here is plain,\n * inspectable data that can be interpolated, which is what keeps a shader-driven\n * scene seekable.\n */\nexport type Uniform3D =\n | number\n | boolean\n | Color\n | Vector2\n | Vector3\n | { x: number; y: number; z: number; w: number }\n | readonly number[]\n | Texture3D;\n\n/**\n * Raw GLSL — total control over both stages.\n *\n * Uniform **values** are cheap: the renderer writes them in place each frame, so\n * driving them from tweened props costs nothing. Uniform *names* and the shader\n * **source** are structural — changing either recompiles the program.\n *\n * Set {@link extends} to patch three's built-in lit shader instead of replacing\n * it, which keeps lighting, shadows and fog working while you inject your own\n * vertex displacement or colour maths.\n */\nexport interface ShaderMaterial3D extends MaterialCommon3D {\n type: \"shader\";\n /** Vertex stage source. */\n vertex: string;\n /** Fragment stage source. */\n fragment: string;\n uniforms?: Readonly<Record<string, Uniform3D>>;\n /** `#define`s injected ahead of both stages. **Structural.** */\n defines?: Readonly<Record<string, string | number | boolean>>;\n /**\n * Wrap a built-in shading model rather than replacing it, so scene lighting,\n * shadows and fog still apply. Null (the default) is a raw shader.\n */\n extends?: \"standard\" | \"basic\" | \"phong\" | null;\n /** Skip three's automatic attribute/uniform prelude (a raw shader). */\n raw?: boolean;\n}\n\n/** Every material a drawable can be shaded with. Discriminated on `type`. */\nexport type Material3D =\n | BasicMaterial3D\n | StandardMaterial3D\n | PhysicalMaterial3D\n | PhongMaterial3D\n | LambertMaterial3D\n | ToonMaterial3D\n | NormalMaterial3D\n | DepthMaterial3D\n | MatcapMaterial3D\n | PointsMaterial3D\n | LineBasicMaterial3D\n | LineDashedMaterial3D\n | SpriteMaterial3D\n | ShadowMaterial3D\n | ShaderMaterial3D;\n\n/**\n * Material fields whose value the renderer can write in place, without\n * recompiling. Everything *not* listed here is structural: changing it rebuilds\n * the material. Shared by the reconciler and the `MeshShorthand` desugarer so the\n * two can't disagree about what is cheap.\n */\nexport const MUTABLE_MATERIAL_KEYS: readonly string[] = [\n \"color\", \"opacity\", \"visible\", \"emission\", \"emissionStrength\",\n \"roughness\", \"metalness\", \"shininess\", \"specular\", \"reflectivity\",\n \"clearcoat\", \"clearcoatRoughness\", \"transmission\", \"thickness\", \"ior\",\n \"sheen\", \"sheenColor\", \"sheenRoughness\", \"iridescence\", \"iridescenceIOR\",\n \"specularIntensity\", \"specularColor\", \"anisotropy\", \"anisotropyRotation\",\n \"attenuationColor\", \"attenuationDistance\",\n \"aoMapIntensity\", \"lightMapIntensity\", \"envMapIntensity\",\n \"normalScale\", \"displacementScale\", \"displacementBias\",\n \"size\", \"width\", \"dashSize\", \"gapSize\", \"scale\", \"rotation\",\n \"depthWrite\", \"depthTest\", \"polygonOffsetFactor\", \"polygonOffsetUnits\",\n];\n\n/**\n * Material fields that change the compiled shader program. Changing one forces a\n * rebuild, so they must never be tweened — the renderer warns when it sees one\n * change repeatedly.\n *\n * `transparent` is here and is also *derived*, which is only a contradiction\n * until you look at when it moves: it flips at most once per material, on the\n * first frame a fade leaves full opacity, and the renderer latches it there. See\n * `needsBlending` in the material handler.\n */\nexport const STRUCTURAL_MATERIAL_KEYS: readonly string[] = [\n \"transparent\", \"alphaTest\", \"faces\", \"wireframe\", \"blend\",\n \"vertexColors\", \"toneMapped\", \"shading\", \"dithering\",\n \"polygonOffset\", \"raw\", \"extends\", \"defines\",\n];\n"]}
|
|
1
|
+
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../src/render3d/material.ts"],"names":[],"mappings":"AAiVA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACpD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB;IAC7D,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc;IACjE,WAAW,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK;IACrE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB;IACxE,mBAAmB,EAAE,eAAe,EAAE,YAAY,EAAE,oBAAoB;IACxE,kBAAkB,EAAE,qBAAqB;IACzC,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB;IACxD,aAAa,EAAE,mBAAmB,EAAE,kBAAkB;IACtD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;IAC3D,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,oBAAoB;CACzE,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACvD,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO;IACzD,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW;IACpD,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;CAC/C,CAAC","sourcesContent":["import type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { Vector3 } from \"./vector3\";\nimport type { Passthrough3D } from \"./geometry\";\nimport type { Blend3D, Faces3D } from \"./transform\";\nimport type { Texture3D } from \"./texture\";\n\n/** Facet or smooth shading. `\"flat\"` gives one normal per triangle. */\nexport type Shading3D = \"smooth\" | \"flat\";\n\n/**\n * State every material shares, regardless of shading model.\n *\n * A note on cost, because it is not obvious: the fields in the first block are\n * plain uniform writes the renderer can mutate in place every frame, so they are\n * free to animate. The fields marked **structural** change the compiled shader\n * program, so changing one mid-timeline forces a recompile — set them once and\n * leave them alone rather than tweening them.\n */\nexport interface MaterialCommon3D extends Passthrough3D {\n /** 0–1. Free to animate; blending is turned on for you below 1. */\n opacity?: number;\n /** Hide without removing. Free to animate. */\n visible?: boolean;\n\n /**\n * **Structural, and normally derived rather than written.**\n *\n * The renderer turns alpha blending on whenever anything about the material\n * actually needs it — `opacity` below 1, a colour carrying alpha, an\n * `alphaMap`, or transmission — so an author never has to pair a fade with a\n * second flag, and `opacity: 0.5` can no longer silently do nothing (which is\n * exactly what it did when this defaulted to `false`).\n *\n * Set it explicitly only to *force* blending on a fully opaque material, which\n * is occasionally wanted for draw-order reasons. Setting it `false` does not\n * turn off blending a lower alpha requires; there is no useful meaning for\n * that, and it only ever expressed a bug.\n */\n transparent?: boolean;\n /** **Structural.** Discard fragments below this alpha. Cheap cutout transparency. */\n alphaTest?: number;\n /** **Structural.** Which faces to rasterize. Default `\"front\"`. */\n faces?: Faces3D;\n /** **Structural.** Draw edges only. */\n wireframe?: boolean;\n /** **Structural.** How the colour combines with the framebuffer. */\n blend?: Blend3D;\n /** **Structural.** Read per-vertex colours from the geometry's `color` buffer. */\n vertexColors?: boolean;\n /** **Structural.** Apply the scene's tone mapping. Default true. */\n toneMapped?: boolean;\n\n /**\n * Write to the depth buffer.\n *\n * **Derived unless stated**: a blended surface stops writing depth, and an\n * opaque one writes it. three defaults this to `true` for everything, so a\n * translucent mesh occluded whatever was drawn after it — a surface at 5%\n * opacity rendering as a near-invisible cut-out through the things behind\n * it. Set it explicitly for a translucent surface that genuinely should\n * occlude.\n */\n depthWrite?: boolean;\n /** Test against the depth buffer. Turn off to force draw-on-top. */\n depthTest?: boolean;\n /** Nudge depth to break z-fighting between coplanar surfaces. */\n polygonOffset?: boolean;\n polygonOffsetFactor?: number;\n polygonOffsetUnits?: number;\n /** Smooth gradient banding. */\n dithering?: boolean;\n}\n\n/** Maps shared by the lit shading models. */\ninterface CommonMaps3D {\n /** Base colour (albedo). Sampled as sRGB. */\n map?: Texture3D;\n /** Per-pixel opacity, read from the red channel. */\n alphaMap?: Texture3D;\n /** Ambient occlusion, read from the red channel. Needs a second UV set. */\n aoMap?: Texture3D;\n aoMapIntensity?: number;\n /** Tangent-space normals. Sampled as linear data, not colour. */\n normalMap?: Texture3D;\n /** Normal strength, per axis. A number applies to both. */\n normalScale?: number | Vector2;\n /** Displaces vertices along their normals. Needs a subdivided geometry. */\n displacementMap?: Texture3D;\n displacementScale?: number;\n displacementBias?: number;\n /** Reflected environment. Usually inherited from the scene's environment. */\n envMap?: Texture3D;\n /** Multiplies light received from the environment. */\n envMapIntensity?: number;\n /** Baked light added on top, unaffected by scene lights. */\n lightMap?: Texture3D;\n lightMapIntensity?: number;\n}\n\n/** Emission shared by the lit shading models. */\ninterface Emissive3D {\n /** Self-illumination colour. Does not light other objects (see `post` bloom). */\n emission?: Color;\n emissionStrength?: number;\n emissionMap?: Texture3D;\n}\n\n/** Unlit — a flat colour, ignoring every light. The cheapest material. */\nexport interface BasicMaterial3D extends MaterialCommon3D, CommonMaps3D {\n type: \"basic\";\n color?: Color;\n}\n\n/**\n * Physically based metal/rough shading. The sensible default for most surfaces:\n * `roughness` and `metalness` cover the majority of real materials, and both are\n * free to animate.\n */\nexport interface StandardMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"standard\";\n color?: Color;\n /** 0 mirror-smooth → 1 fully diffuse. */\n roughness?: number;\n /** 0 dielectric → 1 metal. Metals tint their reflections by `color`. */\n metalness?: number;\n roughnessMap?: Texture3D;\n metalnessMap?: Texture3D;\n /** **Structural.** Facet or smooth shading. Default `\"smooth\"`. */\n shading?: Shading3D;\n}\n\n/**\n * Everything {@link StandardMaterial3D} has plus the expensive extras: clearcoat,\n * transmission (real refraction), sheen and iridescence. Costs more per pixel, so\n * reach for `standard` unless a surface needs these.\n */\nexport interface PhysicalMaterial3D extends Omit<StandardMaterial3D, \"type\"> {\n type: \"physical\";\n /** A second specular lobe over the base — car paint, lacquer, varnish. */\n clearcoat?: number;\n clearcoatRoughness?: number;\n clearcoatMap?: Texture3D;\n clearcoatNormalMap?: Texture3D;\n clearcoatRoughnessMap?: Texture3D;\n /** Light transmitted *through* the surface — glass, water. Blends for you. */\n transmission?: number;\n transmissionMap?: Texture3D;\n /** Wall thickness for transmission tinting. */\n thickness?: number;\n thicknessMap?: Texture3D;\n /** Volumetric absorption colour at {@link attenuationDistance}. */\n attenuationColor?: Color;\n attenuationDistance?: number;\n /** Index of refraction. 1.5 glass, 1.33 water, 2.42 diamond. */\n ior?: number;\n /** Retroreflective sheen — cloth, velvet, dust. */\n sheen?: number;\n sheenColor?: Color;\n sheenRoughness?: number;\n /** Thin-film interference — soap bubbles, oil slicks, beetle shells. */\n iridescence?: number;\n iridescenceIOR?: number;\n iridescenceThicknessRange?: readonly [number, number];\n /** Strength/tint of the dielectric specular highlight. */\n specularIntensity?: number;\n specularColor?: Color;\n /** Anisotropic (brushed-metal) highlight stretching. */\n anisotropy?: number;\n /** Degrees. */\n anisotropyRotation?: number;\n}\n\n/** Classic Blinn-Phong: a diffuse term plus a tight specular highlight. */\nexport interface PhongMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"phong\";\n color?: Color;\n specular?: Color;\n /** Highlight tightness. Higher is smaller and sharper. */\n shininess?: number;\n specularMap?: Texture3D;\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Diffuse-only Lambertian shading. Cheap; good for matte and unlit-ish looks. */\nexport interface LambertMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"lambert\";\n color?: Color;\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Banded cel shading. `gradientMap` controls the steps. */\nexport interface ToonMaterial3D extends MaterialCommon3D, CommonMaps3D, Emissive3D {\n type: \"toon\";\n color?: Color;\n gradientMap?: Texture3D;\n}\n\n/** Surface normals as RGB. A debugging workhorse. */\nexport interface NormalMaterial3D extends MaterialCommon3D {\n type: \"normal\";\n /** **Structural.** */\n shading?: Shading3D;\n}\n\n/** Depth as greyscale. For debugging and custom depth passes. */\nexport interface DepthMaterial3D extends MaterialCommon3D {\n type: \"depth\";\n}\n\n/** Lit by a pre-baked sphere image. Very cheap, very stylizable. */\nexport interface MatcapMaterial3D extends MaterialCommon3D {\n type: \"matcap\";\n color?: Color;\n matcap?: Texture3D;\n map?: Texture3D;\n normalMap?: Texture3D;\n normalScale?: number | Vector2;\n}\n\n/** Shading for a `points` cloud. */\nexport interface PointsMaterial3D extends MaterialCommon3D {\n type: \"points\";\n color?: Color;\n size?: number;\n /** Shrink distant points with perspective. Default true. */\n sizeAttenuation?: boolean;\n map?: Texture3D;\n alphaMap?: Texture3D;\n}\n\n/**\n * Shading for a `line`. Note `width` is capped at 1px by most WebGL\n * implementations regardless of what you set, and **nothing substitutes a\n * mesh-backed line** for a larger one: it is written to `linewidth` and that is\n * all. For a genuinely thick line draw a `tube`.\n */\nexport interface LineBasicMaterial3D extends MaterialCommon3D {\n type: \"lineBasic\";\n color?: Color;\n width?: number;\n}\n\n/** A dashed line. Requires computed line distances, which the renderer handles. */\nexport interface LineDashedMaterial3D extends MaterialCommon3D {\n type: \"lineDashed\";\n color?: Color;\n width?: number;\n dashSize?: number;\n gapSize?: number;\n /** Offset along the line — animate for a marching-ants effect. */\n scale?: number;\n}\n\n/** Shading for a camera-facing `sprite`. */\nexport interface SpriteMaterial3D extends MaterialCommon3D {\n type: \"sprite\";\n color?: Color;\n map?: Texture3D;\n /** Degrees. */\n rotation?: number;\n}\n\n/** Receives shadows onto an otherwise invisible surface. For AR-style grounding. */\nexport interface ShadowMaterial3D extends MaterialCommon3D {\n type: \"shadow\";\n color?: Color;\n}\n\n/**\n * A shader uniform value. Deliberately narrow: everything here is plain,\n * inspectable data that can be interpolated, which is what keeps a shader-driven\n * scene seekable.\n */\nexport type Uniform3D =\n | number\n | boolean\n | Color\n | Vector2\n | Vector3\n | { x: number; y: number; z: number; w: number }\n | readonly number[]\n | Texture3D;\n\n/**\n * Raw GLSL — total control over both stages.\n *\n * Uniform **values** are cheap: the renderer writes them in place each frame, so\n * driving them from tweened props costs nothing. Uniform *names* and the shader\n * **source** are structural — changing either recompiles the program.\n *\n * {@link extends} is declared to patch three's built-in lit shader instead of\n * replacing it, but **it is not read yet**: a shader always replaces the model, so\n * scene lighting, shadows and fog do not reach it. The first material that sets\n * it warns in development. Write the lighting you need in the shader.\n */\nexport interface ShaderMaterial3D extends MaterialCommon3D {\n type: \"shader\";\n /** Vertex stage source. */\n vertex: string;\n /** Fragment stage source. */\n fragment: string;\n uniforms?: Readonly<Record<string, Uniform3D>>;\n /** `#define`s injected ahead of both stages. **Structural.** */\n defines?: Readonly<Record<string, string | number | boolean>>;\n /**\n * Wrap a built-in shading model rather than replacing it, so scene lighting,\n * shadows and fog still apply. Null (the default) is a raw shader.\n *\n * **Not implemented**: no backend reads it, so every shader is a plain\n * replacement whatever this says.\n */\n extends?: \"standard\" | \"basic\" | \"phong\" | null;\n /** Skip three's automatic attribute/uniform prelude (a raw shader). */\n raw?: boolean;\n}\n\n/** Every material a drawable can be shaded with. Discriminated on `type`. */\nexport type Material3D =\n | BasicMaterial3D\n | StandardMaterial3D\n | PhysicalMaterial3D\n | PhongMaterial3D\n | LambertMaterial3D\n | ToonMaterial3D\n | NormalMaterial3D\n | DepthMaterial3D\n | MatcapMaterial3D\n | PointsMaterial3D\n | LineBasicMaterial3D\n | LineDashedMaterial3D\n | SpriteMaterial3D\n | ShadowMaterial3D\n | ShaderMaterial3D;\n\n/**\n * Material fields whose value the renderer can write in place, without\n * recompiling. Everything *not* listed here is structural: changing it rebuilds\n * the material. Shared by the reconciler and the `MeshShorthand` desugarer so the\n * two can't disagree about what is cheap.\n */\nexport const MUTABLE_MATERIAL_KEYS: readonly string[] = [\n \"color\", \"opacity\", \"visible\", \"emission\", \"emissionStrength\",\n \"roughness\", \"metalness\", \"shininess\", \"specular\", \"reflectivity\",\n \"clearcoat\", \"clearcoatRoughness\", \"transmission\", \"thickness\", \"ior\",\n \"sheen\", \"sheenColor\", \"sheenRoughness\", \"iridescence\", \"iridescenceIOR\",\n \"specularIntensity\", \"specularColor\", \"anisotropy\", \"anisotropyRotation\",\n \"attenuationColor\", \"attenuationDistance\",\n \"aoMapIntensity\", \"lightMapIntensity\", \"envMapIntensity\",\n \"normalScale\", \"displacementScale\", \"displacementBias\",\n \"size\", \"width\", \"dashSize\", \"gapSize\", \"scale\", \"rotation\",\n \"depthWrite\", \"depthTest\", \"polygonOffsetFactor\", \"polygonOffsetUnits\",\n];\n\n/**\n * Material fields that change the compiled shader program. Changing one forces a\n * rebuild, so they must never be tweened — the renderer warns when it sees one\n * change repeatedly.\n *\n * `transparent` is here and is also *derived*, which is only a contradiction\n * until you look at when it moves: it flips at most once per material, on the\n * first frame a fade leaves full opacity, and the renderer latches it there. See\n * `needsBlending` in the material handler.\n */\nexport const STRUCTURAL_MATERIAL_KEYS: readonly string[] = [\n \"transparent\", \"alphaTest\", \"faces\", \"wireframe\", \"blend\",\n \"vertexColors\", \"toneMapped\", \"shading\", \"dithering\",\n \"polygonOffset\", \"raw\", \"extends\", \"defines\",\n];\n"]}
|
|
@@ -48,8 +48,8 @@ export declare function parseCanvas3DResourceKey(key: string): {
|
|
|
48
48
|
src: string;
|
|
49
49
|
} | null;
|
|
50
50
|
/**
|
|
51
|
-
* Register the 3D runtime loader. Called
|
|
52
|
-
*
|
|
51
|
+
* Register the 3D runtime loader. Called by the rendering backend before it draws,
|
|
52
|
+
* never at import — authors never call this.
|
|
53
53
|
*/
|
|
54
54
|
export declare function registerCanvas3DWarmup(fn: Canvas3DWarmup): void;
|
|
55
55
|
/**
|
|
@@ -50,8 +50,8 @@ export function parseCanvas3DResourceKey(key) {
|
|
|
50
50
|
let warmup = null;
|
|
51
51
|
let resourceLoader = null;
|
|
52
52
|
/**
|
|
53
|
-
* Register the 3D runtime loader. Called
|
|
54
|
-
*
|
|
53
|
+
* Register the 3D runtime loader. Called by the rendering backend before it draws,
|
|
54
|
+
* never at import — authors never call this.
|
|
55
55
|
*/
|
|
56
56
|
export function registerCanvas3DWarmup(fn) {
|
|
57
57
|
warmup = fn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/render3d/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAeH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA0B,EAAE,GAAW;IACvE,OAAO,SAAS,IAAI,IAAI,GAAG,EAAE,CAAC;AAClC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACpC,GAAW;IAEX,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAyB;QAClD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;KAC7B,CAAC;AACN,CAAC;AAED,IAAI,MAAM,GAA0B,IAAI,CAAC;AACzC,IAAI,cAAc,GAAkC,IAAI,CAAC;AAEzD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAkB;IACrD,MAAM,GAAG,EAAE,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,EAA0B;IACrE,cAAc,GAAG,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY;IACxB,OAAO,MAAM,EAAE,EAAE,CAAC;AACtB,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,sBAAsB;IAClC,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,kBAAkB;IAC9B,OAAO,MAAM,KAAK,IAAI,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * Backend seams for 3D runtime and resource loading.\n *\n * Core describes 3D scenes but cannot load a 3D runtime — `three` lives in the\n * rendering backend, and core must not import it. So core declares the capability\n * here and the backend registers an implementation at module load, the same shape\n * as the other platform seams (`StorageAdapter`, `Ticker`) and the same\n * \"core owns *whether*, backend owns *how*\" split as `EffectSurface`.\n *\n * With no backend registered every function here is an inert no-op, which is what\n * keeps core usable headless and in unit tests.\n */\n\nimport type { Disposer } from \"@/assets/record\";\n\n/** Loads the backend's 3D runtime. Idempotent and memoised by the backend. */\nexport type Canvas3DWarmup = () => Promise<void>;\n\n/**\n * Loads a resource core can't decode itself. `kind` tells the backend which\n * loader to use; the returned {@link Disposer} frees the parsed result when the\n * asset window moves past it.\n */\nexport type Canvas3DResourceKind = \"hdr\" | \"exr\" | \"gltf\" | \"obj\" | \"cubemap\";\nexport type Canvas3DResourceLoader = (kind: Canvas3DResourceKind, src: string) => Promise<Disposer>;\n\n/**\n * The cache key a loader-backed resource is tracked and stored under.\n *\n * Stated once here because **two packages have to agree on it and neither owns\n * both ends**: core's `declare3DResources` declares the key into the asset\n * scope, and the backend's loader is what later looks the parsed result up by\n * it. A backend that built the string itself would be one refactor away from\n * caching under a key nothing ever reads — a model that silently never appears,\n * which is precisely the failure this seam exists to make impossible.\n *\n * `src` goes last and unescaped: it is a URL and may hold colons of its own, so\n * a reader has to split on the first two separators and take the remainder\n * whole rather than splitting on every one — see {@link parseCanvas3DResourceKey}.\n */\nexport function canvas3DResourceKey(kind: Canvas3DResourceKind, src: string): string {\n return `three:${kind}:${src}`;\n}\n\n/**\n * The `kind` and `src` a {@link canvas3DResourceKey} was built from, or `null`\n * when the string is not one.\n *\n * The inverse exists because the backend's warm queue holds keys rather than\n * pairs: `warmPendingCanvas3D` has to re-drive whatever is outstanding knowing\n * only what it was handed.\n */\nexport function parseCanvas3DResourceKey(\n key: string,\n): { kind: Canvas3DResourceKind; src: string } | null {\n if (!key.startsWith(\"three:\")) return null;\n const rest = key.slice(\"three:\".length);\n const split = rest.indexOf(\":\");\n if (split <= 0) return null;\n return {\n kind: rest.slice(0, split) as Canvas3DResourceKind,\n src: rest.slice(split + 1),\n };\n}\n\nlet warmup: Canvas3DWarmup | null = null;\nlet resourceLoader: Canvas3DResourceLoader | null = null;\n\n/**\n * Register the 3D runtime loader. Called
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/render3d/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAeH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA0B,EAAE,GAAW;IACvE,OAAO,SAAS,IAAI,IAAI,GAAG,EAAE,CAAC;AAClC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACpC,GAAW;IAEX,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAyB;QAClD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;KAC7B,CAAC;AACN,CAAC;AAED,IAAI,MAAM,GAA0B,IAAI,CAAC;AACzC,IAAI,cAAc,GAAkC,IAAI,CAAC;AAEzD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAkB;IACrD,MAAM,GAAG,EAAE,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,EAA0B;IACrE,cAAc,GAAG,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY;IACxB,OAAO,MAAM,EAAE,EAAE,CAAC;AACtB,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,sBAAsB;IAClC,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,kBAAkB;IAC9B,OAAO,MAAM,KAAK,IAAI,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * Backend seams for 3D runtime and resource loading.\n *\n * Core describes 3D scenes but cannot load a 3D runtime — `three` lives in the\n * rendering backend, and core must not import it. So core declares the capability\n * here and the backend registers an implementation at module load, the same shape\n * as the other platform seams (`StorageAdapter`, `Ticker`) and the same\n * \"core owns *whether*, backend owns *how*\" split as `EffectSurface`.\n *\n * With no backend registered every function here is an inert no-op, which is what\n * keeps core usable headless and in unit tests.\n */\n\nimport type { Disposer } from \"@/assets/record\";\n\n/** Loads the backend's 3D runtime. Idempotent and memoised by the backend. */\nexport type Canvas3DWarmup = () => Promise<void>;\n\n/**\n * Loads a resource core can't decode itself. `kind` tells the backend which\n * loader to use; the returned {@link Disposer} frees the parsed result when the\n * asset window moves past it.\n */\nexport type Canvas3DResourceKind = \"hdr\" | \"exr\" | \"gltf\" | \"obj\" | \"cubemap\";\nexport type Canvas3DResourceLoader = (kind: Canvas3DResourceKind, src: string) => Promise<Disposer>;\n\n/**\n * The cache key a loader-backed resource is tracked and stored under.\n *\n * Stated once here because **two packages have to agree on it and neither owns\n * both ends**: core's `declare3DResources` declares the key into the asset\n * scope, and the backend's loader is what later looks the parsed result up by\n * it. A backend that built the string itself would be one refactor away from\n * caching under a key nothing ever reads — a model that silently never appears,\n * which is precisely the failure this seam exists to make impossible.\n *\n * `src` goes last and unescaped: it is a URL and may hold colons of its own, so\n * a reader has to split on the first two separators and take the remainder\n * whole rather than splitting on every one — see {@link parseCanvas3DResourceKey}.\n */\nexport function canvas3DResourceKey(kind: Canvas3DResourceKind, src: string): string {\n return `three:${kind}:${src}`;\n}\n\n/**\n * The `kind` and `src` a {@link canvas3DResourceKey} was built from, or `null`\n * when the string is not one.\n *\n * The inverse exists because the backend's warm queue holds keys rather than\n * pairs: `warmPendingCanvas3D` has to re-drive whatever is outstanding knowing\n * only what it was handed.\n */\nexport function parseCanvas3DResourceKey(\n key: string,\n): { kind: Canvas3DResourceKind; src: string } | null {\n if (!key.startsWith(\"three:\")) return null;\n const rest = key.slice(\"three:\".length);\n const split = rest.indexOf(\":\");\n if (split <= 0) return null;\n return {\n kind: rest.slice(0, split) as Canvas3DResourceKind,\n src: rest.slice(split + 1),\n };\n}\n\nlet warmup: Canvas3DWarmup | null = null;\nlet resourceLoader: Canvas3DResourceLoader | null = null;\n\n/**\n * Register the 3D runtime loader. Called by the rendering backend before it draws,\n * never at import — authors never call this.\n */\nexport function registerCanvas3DWarmup(fn: Canvas3DWarmup): void {\n warmup = fn;\n}\n\n/**\n * Register the loader for resource types core can't decode (HDR/EXR env maps,\n * glTF/OBJ models). Called once by the rendering backend.\n */\nexport function registerCanvas3DResourceLoader(fn: Canvas3DResourceLoader): void {\n resourceLoader = fn;\n}\n\n/**\n * Kick off loading the 3D runtime.\n *\n * `Canvas3D.declareAssets()` loads it through the asset timeline — *before* any\n * frame is drawn — so by the time the first 3D frame paints the runtime is\n * normally already resident and the render pass stays synchronous. The renderer\n * still has a per-frame fallback for the case where it isn't.\n *\n * @internal\n */\nexport function warmCanvas3D(): Promise<void> | void {\n return warmup?.();\n}\n\n/** The registered resource loader, or `null` when no backend supplied one. @internal */\nexport function canvas3DResourceLoader(): Canvas3DResourceLoader | null {\n return resourceLoader;\n}\n\n/** True when a backend has registered a 3D runtime. @internal */\nexport function hasCanvas3DBackend(): boolean {\n return warmup !== null;\n}\n"]}
|
|
@@ -38,19 +38,32 @@ export interface FogData3D {
|
|
|
38
38
|
* three background, so the 3D path was doing strictly less than the 2D one it sat
|
|
39
39
|
* in front of. What genuinely needs the 3D pass is a sky that *reprojects* as the
|
|
40
40
|
* camera turns, which is this.
|
|
41
|
+
*
|
|
42
|
+
* ── What renders today ────────────────────────────────────────────────────────
|
|
43
|
+
* Only {@link preset} `"studio"` (a neutral grey room generated per renderer).
|
|
44
|
+
* {@link src} and {@link faces} are declared, tracked by the asset window and
|
|
45
|
+
* recorded, but no backend loads an HDR, EXR or cubemap: an environment that
|
|
46
|
+
* names only those lights nothing and draws no {@link background}. {@link params}
|
|
47
|
+
* is not applied either. In development, the first of each warns.
|
|
41
48
|
*/
|
|
42
49
|
export interface EnvironmentData3D extends Passthrough3D {
|
|
43
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* A 360° panorama — `.hdr`/`.exr` for real IBL, or a plain image.
|
|
52
|
+
* **Not loaded yet**: see the note on the type.
|
|
53
|
+
*/
|
|
44
54
|
src?: string;
|
|
45
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Six faces, in three's order: +X, −X, +Y, −Y, +Z, −Z.
|
|
57
|
+
* **Not loaded yet**: see the note on the type.
|
|
58
|
+
*/
|
|
46
59
|
faces?: readonly string[];
|
|
47
|
-
/** A built-in studio interior. Needs no asset — the fastest way to good metal. */
|
|
60
|
+
/** A built-in studio interior. Needs no asset — the fastest way to good metal. The only environment that renders. */
|
|
48
61
|
preset?: "studio";
|
|
49
62
|
/** Multiplies the light received. Default 1. */
|
|
50
63
|
intensity?: number;
|
|
51
64
|
/** Rotate the panorama, in **degrees**. */
|
|
52
65
|
rotation?: Vector3Input;
|
|
53
|
-
/** Also draw it behind the scene, as an infinitely distant sky. */
|
|
66
|
+
/** Also draw it behind the scene, as an infinitely distant sky. Draws the `preset`; there is nothing to draw for `src`/`faces`. */
|
|
54
67
|
background?: boolean;
|
|
55
68
|
/** Blur applied to the background only, 0–1. Leaves the lighting sharp. */
|
|
56
69
|
blur?: number;
|
|
@@ -106,6 +119,12 @@ export interface ToneSettings3D {
|
|
|
106
119
|
*
|
|
107
120
|
* Post-processing forces the render through an offscreen target, so a scene with
|
|
108
121
|
* any of these costs more than one without, even for a cheap effect.
|
|
122
|
+
*
|
|
123
|
+
* **No pass is applied yet.** The chain is recorded on the scene and read only to
|
|
124
|
+
* track the textures a `shaderPass` names; a scene with `bloom` renders exactly
|
|
125
|
+
* like one without, and so does every `params` on an effect. The first `post` set
|
|
126
|
+
* in development warns. Until the passes land, use the 2D `effects` of the
|
|
127
|
+
* `Canvas3D`, which run over its composited result.
|
|
109
128
|
*/
|
|
110
129
|
export type PostEffect3D =
|
|
111
130
|
/** Bleeds light from bright pixels, in HDR. What makes `emission` actually glow. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-settings.d.ts","sourceRoot":"","sources":["../../src/render3d/scene-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAS;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,gDAAgD;IAChD,IAAI,CAAC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AAC;AACxF,yEAAyE;GACvE,CAAC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA;CAAE,GAAG,aAAa,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-settings.js","sourceRoot":"","sources":["../../src/render3d/scene-settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scene-settings.js","sourceRoot":"","sources":["../../src/render3d/scene-settings.ts"],"names":[],"mappings":"AA6FA,6CAA6C;AAC7C,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IACzD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;AACvC,CAAC","sourcesContent":["import type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { Passthrough3D } from \"./geometry\";\nimport type { Uniform3D } from \"./material\";\nimport type { Vector3Input } from \"./vector3\";\n\n/**\n * Depth haze that fades distant geometry toward a colour.\n *\n * One shape rather than a discriminated pair: setting {@link density} is\n * exponential fog and setting {@link near}/{@link far} is linear, which is what\n * the old `type` field said twice. Writing `type: \"exponential\"` beside a `far`\n * silently dropped the `far`; there is nothing to get wrong now.\n *\n * `color` is derived from the viewport's own fill when omitted. Fog that does not\n * match what is behind it reads as a grey wall rather than as distance, and the\n * two colours being separately typed by hand is exactly how they drift.\n */\nexport interface FogData3D {\n color?: Color;\n /** Linear fog: distance at which fog begins. */\n near?: number;\n /** Linear fog: distance at which fog is total. */\n far?: number;\n /** Exponential-squared falloff. Wins over {@link near}/{@link far}. */\n density?: number;\n}\n\n/**\n * Image-based lighting, and the sky it comes from.\n *\n * Light and background are one control because they are one physical thing: an\n * HDRI that lights a scene is the same panorama you see behind it, and having\n * them as two nodes meant setting one, wondering why metal was black or why the\n * sky was missing, and setting the other.\n *\n * This is also *all* that is left of the old `Background3D`. A solid colour, a\n * gradient or a flat image behind the scene is a **2D fill** — `Canvas3D` is a\n * `Rect` and already composites its 3D pass over its own fill layers, the\n * renderer already clears transparent, and neither lighting nor fog touches a\n * three background, so the 3D path was doing strictly less than the 2D one it sat\n * in front of. What genuinely needs the 3D pass is a sky that *reprojects* as the\n * camera turns, which is this.\n *\n * ── What renders today ────────────────────────────────────────────────────────\n * Only {@link preset} `\"studio\"` (a neutral grey room generated per renderer).\n * {@link src} and {@link faces} are declared, tracked by the asset window and\n * recorded, but no backend loads an HDR, EXR or cubemap: an environment that\n * names only those lights nothing and draws no {@link background}. {@link params}\n * is not applied either. In development, the first of each warns.\n */\nexport interface EnvironmentData3D extends Passthrough3D {\n /**\n * A 360° panorama — `.hdr`/`.exr` for real IBL, or a plain image.\n * **Not loaded yet**: see the note on the type.\n */\n src?: string;\n /**\n * Six faces, in three's order: +X, −X, +Y, −Y, +Z, −Z.\n * **Not loaded yet**: see the note on the type.\n */\n faces?: readonly string[];\n /** A built-in studio interior. Needs no asset — the fastest way to good metal. The only environment that renders. */\n preset?: \"studio\";\n /** Multiplies the light received. Default 1. */\n intensity?: number;\n /** Rotate the panorama, in **degrees**. */\n rotation?: Vector3Input;\n /** Also draw it behind the scene, as an infinitely distant sky. Draws the `preset`; there is nothing to draw for `src`/`faces`. */\n background?: boolean;\n /** Blur applied to the background only, 0–1. Leaves the lighting sharp. */\n blur?: number;\n}\n\n/**\n * Scene-wide shadow settings.\n *\n * `quality` stands in for the map resolution and the filter three exposes\n * separately (`pcf`, `pcfSoft`, `vsm`, `mapSize`): those two are chosen together\n * in practice, and neither is a design decision. Individual lights soften their\n * own shadow; objects opt out with `shadow={false}`.\n *\n * Enabling shadows recompiles every material that receives them, so treat this as\n * setup rather than something to animate.\n */\nexport interface ShadowSettings3D {\n enabled?: boolean;\n /** Default `\"medium\"`. */\n quality?: \"low\" | \"medium\" | \"high\";\n}\n\n/** Shadows as written on a viewport: a switch, or the settings. */\nexport type Shadows3D = boolean | ShadowSettings3D;\n\n/** Normalize a viewport's `shadows` prop. */\nexport function resolveShadows3D(value: Shadows3D | undefined): ShadowSettings3D | null {\n if (value === undefined || value === false) return null;\n if (value === true) return { enabled: true };\n return { enabled: true, ...value };\n}\n\n/**\n * How high-dynamic-range colour is mapped into displayable range.\n *\n * `\"aces\"` is the filmic default most renderers use and handles bright\n * highlights gracefully; `\"none\"` clips them. Materials opt out individually with\n * `toneMapped: false` — useful for UI-like overlays that must keep an exact colour.\n */\nexport type ToneMapping3D =\n | \"none\"\n | \"linear\"\n | \"reinhard\"\n | \"cineon\"\n | \"aces\"\n | \"agx\"\n | \"neutral\";\n\n/** Tone mapping and exposure, as a viewport carries them. */\nexport interface ToneSettings3D {\n mapping?: ToneMapping3D;\n /** Stops of exposure applied before mapping. Default 1. */\n exposure?: number;\n}\n\n/**\n * A full-frame post-processing pass, applied after the scene renders.\n *\n * Deliberately short, because most of what used to be here is a 2D effect. A\n * `Canvas3D` is a `Node2D`, so it already carries the whole `effects` chain —\n * vignette, grain, colour grading, blur, chromatic aberration and the rest run\n * over the composited result with no 3D pass involved, and post-process\n * antialiasing is what the viewport's own `antialias` already does with MSAA.\n *\n * What is left are the passes that genuinely need what only the 3D pass has:\n * `ssao` and `dof` read the depth buffer, `outline` reads object ids, and `bloom`\n * reads **HDR radiance before tone mapping** — which is why an emissive surface\n * blooms here and merely brightens under the 2D chain. `shaderPass` stays as the\n * escape hatch for a pass that needs to sit inside the 3D composite.\n *\n * Post-processing forces the render through an offscreen target, so a scene with\n * any of these costs more than one without, even for a cheap effect.\n *\n * **No pass is applied yet.** The chain is recorded on the scene and read only to\n * track the textures a `shaderPass` names; a scene with `bloom` renders exactly\n * like one without, and so does every `params` on an effect. The first `post` set\n * in development warns. Until the passes land, use the 2D `effects` of the\n * `Canvas3D`, which run over its composited result.\n */\nexport type PostEffect3D =\n /** Bleeds light from bright pixels, in HDR. What makes `emission` actually glow. */\n | ({ type: \"bloom\"; strength?: number; radius?: number; threshold?: number } & Passthrough3D)\n /** Contact shadows in creases, from screen-space geometry. */\n | ({ type: \"ssao\"; radius?: number; intensity?: number } & Passthrough3D)\n | ({ type: \"outline\"; color?: Color; thickness?: number } & Passthrough3D)\n /** Depth of field. `focus` is the sharp distance, `aperture` the blur strength. */\n | ({ type: \"dof\"; focus?: number; aperture?: number; maxBlur?: number } & Passthrough3D)\n /** Anything expressible as one fragment pass inside the 3D composite. */\n | ({ type: \"shaderPass\"; fragment: string; uniforms?: Readonly<Record<string, Uniform3D>> } & Passthrough3D);\n"]}
|
|
@@ -46,7 +46,7 @@ export type Scene3DOp = {
|
|
|
46
46
|
* .light({ type: "ambient", intensity: 0.4 })
|
|
47
47
|
* .draw(new Graphics3D().box({ width: 2, fill: "tomato" }));
|
|
48
48
|
*
|
|
49
|
-
*
|
|
49
|
+
* Text({ text: "DEPTH", fontSize: 320, fill: scene })
|
|
50
50
|
*
|
|
51
51
|
* A bare `Scene3D` coerces to a `canvas3D` fill the way a bare CSS string coerces
|
|
52
52
|
* to a solid one, so `fill={scene}` and `fill={["#0b0d12", scene]}` both work.
|
|
@@ -61,6 +61,11 @@ export declare class Scene3D extends RenderContext3D {
|
|
|
61
61
|
private _post;
|
|
62
62
|
/** Open `push` count, so {@link assertBalanced} can report a leak. */
|
|
63
63
|
private _depth;
|
|
64
|
+
/**
|
|
65
|
+
* The `shadow` of each open node scope, innermost last (`undefined` for a
|
|
66
|
+
* scope that states none). What a drawable that states none of its own takes.
|
|
67
|
+
*/
|
|
68
|
+
private _shadowScopes;
|
|
64
69
|
begin(state: Node3DRenderState): void;
|
|
65
70
|
end(): void;
|
|
66
71
|
/**
|
|
@@ -69,6 +74,12 @@ export declare class Scene3D extends RenderContext3D {
|
|
|
69
74
|
* The ops are copied rather than referenced: a `Graphics3D` is rebuilt every
|
|
70
75
|
* frame, so there is nothing to share, and a flat list is what the renderer
|
|
71
76
|
* walks.
|
|
77
|
+
*
|
|
78
|
+
* A drawable that states no `shadow` of its own takes the one of the node
|
|
79
|
+
* scope it is drawn in. That is what carries a node's `shadow` to its mesh: the
|
|
80
|
+
* node's scope becomes a group, and a renderer reads casting and receiving off
|
|
81
|
+
* the mesh, never off a group, so the scope's value would otherwise never be
|
|
82
|
+
* seen. A `shadow` on the op itself wins.
|
|
72
83
|
*/
|
|
73
84
|
draw(graphics: Graphics3D): this;
|
|
74
85
|
light(light: LightData3D, transform?: Transform3D): this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene3d.d.ts","sourceRoot":"","sources":["../../src/render3d/scene3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAEH,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EACzD,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAC7D,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"scene3d.d.ts","sourceRoot":"","sources":["../../src/render3d/scene3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,u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1
1
|
import { DRAWABLE_KINDS } from "./graphics3d.js";
|
|
2
2
|
import { RenderContext3D } from "./render-context3d.js";
|
|
3
3
|
import { resolveShadows3D, } from "./scene-settings.js";
|
|
4
|
+
import { warnInert3D } from "./inert.js";
|
|
4
5
|
/**
|
|
5
6
|
* A recorded 3D scene — and the {@link RenderContext3D} that records it.
|
|
6
7
|
*
|
|
@@ -18,7 +19,7 @@ import { resolveShadows3D, } from "./scene-settings.js";
|
|
|
18
19
|
* .light({ type: "ambient", intensity: 0.4 })
|
|
19
20
|
* .draw(new Graphics3D().box({ width: 2, fill: "tomato" }));
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
+
* Text({ text: "DEPTH", fontSize: 320, fill: scene })
|
|
22
23
|
*
|
|
23
24
|
* A bare `Scene3D` coerces to a `canvas3D` fill the way a bare CSS string coerces
|
|
24
25
|
* to a solid one, so `fill={scene}` and `fill={["#0b0d12", scene]}` both work.
|
|
@@ -33,16 +34,23 @@ export class Scene3D extends RenderContext3D {
|
|
|
33
34
|
_post = [];
|
|
34
35
|
/** Open `push` count, so {@link assertBalanced} can report a leak. */
|
|
35
36
|
_depth = 0;
|
|
37
|
+
/**
|
|
38
|
+
* The `shadow` of each open node scope, innermost last (`undefined` for a
|
|
39
|
+
* scope that states none). What a drawable that states none of its own takes.
|
|
40
|
+
*/
|
|
41
|
+
_shadowScopes = [];
|
|
36
42
|
// ─── Node scopes ─────────────────────────────────────────────────────────
|
|
37
43
|
begin(state) {
|
|
38
44
|
// The node's id rides on the transform's `key`, which is the renderer's
|
|
39
45
|
// identity slot — so a group is cached against the node that opened it
|
|
40
46
|
// rather than against its index among its siblings.
|
|
41
47
|
this._ops.push({ kind: "push", transform: { ...state.transform, key: state.id } });
|
|
48
|
+
this._shadowScopes.push(state.transform?.shadow);
|
|
42
49
|
this._depth++;
|
|
43
50
|
}
|
|
44
51
|
end() {
|
|
45
52
|
this._ops.push({ kind: "pop" });
|
|
53
|
+
this._shadowScopes.pop();
|
|
46
54
|
this._depth--;
|
|
47
55
|
}
|
|
48
56
|
// ─── Drawables ───────────────────────────────────────────────────────────
|
|
@@ -52,11 +60,25 @@ export class Scene3D extends RenderContext3D {
|
|
|
52
60
|
* The ops are copied rather than referenced: a `Graphics3D` is rebuilt every
|
|
53
61
|
* frame, so there is nothing to share, and a flat list is what the renderer
|
|
54
62
|
* walks.
|
|
63
|
+
*
|
|
64
|
+
* A drawable that states no `shadow` of its own takes the one of the node
|
|
65
|
+
* scope it is drawn in. That is what carries a node's `shadow` to its mesh: the
|
|
66
|
+
* node's scope becomes a group, and a renderer reads casting and receiving off
|
|
67
|
+
* the mesh, never off a group, so the scope's value would otherwise never be
|
|
68
|
+
* seen. A `shadow` on the op itself wins.
|
|
55
69
|
*/
|
|
56
70
|
draw(graphics) {
|
|
57
71
|
const ops = graphics.ops();
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
const scope = this._shadowScopes[this._shadowScopes.length - 1];
|
|
73
|
+
for (let i = 0; i < ops.length; i++) {
|
|
74
|
+
const op = ops[i];
|
|
75
|
+
if (scope === undefined || op.transform?.shadow !== undefined) {
|
|
76
|
+
this._ops.push(op);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this._ops.push({ ...op, transform: { ...op.transform, shadow: scope } });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
60
82
|
return this;
|
|
61
83
|
}
|
|
62
84
|
// ─── Lights ──────────────────────────────────────────────────────────────
|
|
@@ -96,6 +118,15 @@ export class Scene3D extends RenderContext3D {
|
|
|
96
118
|
return this;
|
|
97
119
|
}
|
|
98
120
|
environment(environment) {
|
|
121
|
+
if (environment) {
|
|
122
|
+
if (environment.src !== undefined || (environment.faces?.length ?? 0) > 0) {
|
|
123
|
+
warnInert3D("environment-src", "An environment's `src` and `faces` (HDR, EXR, cubemap) are recorded, and no backend loads them. Only `preset: \"studio\"` is rendered: "
|
|
124
|
+
+ "without a preset the scene gets no image-based light and its `background` is not drawn.");
|
|
125
|
+
}
|
|
126
|
+
if (environment.params && Object.keys(environment.params).length > 0) {
|
|
127
|
+
warnInert3D("environment-params", "`params` on an environment is not applied: nothing assigns it onto the generated environment.");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
99
130
|
this._environment = environment;
|
|
100
131
|
return this;
|
|
101
132
|
}
|
|
@@ -108,10 +139,12 @@ export class Scene3D extends RenderContext3D {
|
|
|
108
139
|
return this;
|
|
109
140
|
}
|
|
110
141
|
post(effects) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
const added = Array.isArray(effects) ? effects : [effects];
|
|
143
|
+
if (added.length > 0) {
|
|
144
|
+
warnInert3D("post", `Post-processing (${added.map((effect) => `"${effect.type}"`).join(", ")}) is recorded, and no backend applies a pass: the scene renders exactly as it would without \`post\`. `
|
|
145
|
+
+ "Use the Canvas3D's 2D `effects` over the composited result instead.");
|
|
146
|
+
}
|
|
147
|
+
this._post.push(...added);
|
|
115
148
|
return this;
|
|
116
149
|
}
|
|
117
150
|
// ─── Consumption ─────────────────────────────────────────────────────────
|