@motionscript/core 0.1.0-alpha.8 → 0.1.0-alpha.9
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 +6 -0
- package/LICENSE +201 -201
- package/NOTICE +49 -49
- package/README.md +91 -91
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/manifest.js.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/effects/index.js.map +1 -1
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/effects/union.js.map +1 -1
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/index.js.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/vector2.js.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/mask/boolean.js.map +1 -1
- package/dist/attributes/mask/mask.js.map +1 -1
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/corners/index.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +4 -4
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/constants.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shadow/index.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/{chunk-GKM6UZJR.js → chunk-7DB6BI27.js} +2 -2
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
- package/dist/browser/chunks/{chunk-AOT33LMS.js → chunk-IX53IFBD.js} +2 -2
- package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
- package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
- package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/providers/providers.js.map +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +9 -9
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/clip-of.js.map +1 -1
- package/dist/components/factory/commands-for.js.map +1 -1
- package/dist/components/factory/component-audio.js.map +1 -1
- package/dist/components/factory/component2d.js.map +1 -1
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.js.map +1 -1
- package/dist/components/factory/timeline.js.map +1 -1
- package/dist/components/factory/type-def.js.map +1 -1
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/modules/aim.js.map +1 -1
- package/dist/components/modules/corners.js.map +1 -1
- package/dist/components/modules/flow.js.map +1 -1
- package/dist/components/modules/material.js.map +1 -1
- package/dist/components/modules/paint.js.map +1 -1
- package/dist/components/modules/shapes.js.map +1 -1
- package/dist/components/modules/text-layout.js.map +1 -1
- package/dist/components/modules/text-style.d.ts +1 -1
- package/dist/components/modules/text-style.js.map +1 -1
- package/dist/components/modules/three-entries.js.map +1 -1
- package/dist/components/modules/view3d.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/index.js.map +1 -1
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/index.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/freeform.js.map +1 -1
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/item.js.map +1 -1
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.js.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/precompisition.js.map +1 -1
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.js.map +1 -1
- package/dist/util/generateList.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- 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 -250
- 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 +0 -11
- 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 +0 -6
- 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 +0 -10
- 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 +0 -10
- 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 +0 -10
- 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/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-AOT33LMS.js.map +0 -7
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +0 -7
- package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
- package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
- package/dist/component/api.d.ts +0 -508
- package/dist/component/api.d.ts.map +0 -1
- package/dist/component/api.js +0 -4
- package/dist/component/api.js.map +0 -1
- package/dist/component/builtins/audio.d.ts +0 -26
- package/dist/component/builtins/audio.d.ts.map +0 -1
- package/dist/component/builtins/audio.js +0 -41
- package/dist/component/builtins/audio.js.map +0 -1
- package/dist/component/builtins/canvas3d.d.ts +0 -98
- package/dist/component/builtins/canvas3d.d.ts.map +0 -1
- package/dist/component/builtins/canvas3d.js +0 -21
- package/dist/component/builtins/canvas3d.js.map +0 -1
- package/dist/component/builtins/composite.d.ts +0 -56
- package/dist/component/builtins/composite.d.ts.map +0 -1
- package/dist/component/builtins/composite.js +0 -25
- package/dist/component/builtins/composite.js.map +0 -1
- package/dist/component/builtins/geometry.d.ts +0 -505
- package/dist/component/builtins/geometry.d.ts.map +0 -1
- package/dist/component/builtins/geometry.js +0 -107
- package/dist/component/builtins/geometry.js.map +0 -1
- package/dist/component/builtins/layout.d.ts +0 -88
- package/dist/component/builtins/layout.d.ts.map +0 -1
- package/dist/component/builtins/layout.js +0 -84
- package/dist/component/builtins/layout.js.map +0 -1
- package/dist/component/builtins/media.d.ts +0 -95
- package/dist/component/builtins/media.d.ts.map +0 -1
- package/dist/component/builtins/media.js +0 -149
- package/dist/component/builtins/media.js.map +0 -1
- package/dist/component/builtins/providers.d.ts +0 -23
- package/dist/component/builtins/providers.d.ts.map +0 -1
- package/dist/component/builtins/providers.js +0 -30
- package/dist/component/builtins/providers.js.map +0 -1
- package/dist/component/builtins/text.d.ts +0 -193
- package/dist/component/builtins/text.d.ts.map +0 -1
- package/dist/component/builtins/text.js +0 -113
- package/dist/component/builtins/text.js.map +0 -1
- package/dist/component/builtins/three.d.ts +0 -1085
- package/dist/component/builtins/three.d.ts.map +0 -1
- package/dist/component/builtins/three.js +0 -265
- package/dist/component/builtins/three.js.map +0 -1
- package/dist/component/clip-of.d.ts +0 -5
- package/dist/component/clip-of.d.ts.map +0 -1
- package/dist/component/clip-of.js +0 -33
- package/dist/component/clip-of.js.map +0 -1
- package/dist/component/commands-for.d.ts +0 -19
- package/dist/component/commands-for.d.ts.map +0 -1
- package/dist/component/commands-for.js +0 -5
- package/dist/component/commands-for.js.map +0 -1
- package/dist/component/component-audio.d.ts +0 -9
- package/dist/component/component-audio.d.ts.map +0 -1
- package/dist/component/component-audio.js +0 -18
- package/dist/component/component-audio.js.map +0 -1
- package/dist/component/component2d.d.ts +0 -9
- package/dist/component/component2d.d.ts.map +0 -1
- package/dist/component/component2d.js +0 -239
- package/dist/component/component2d.js.map +0 -1
- package/dist/component/component3d.d.ts +0 -9
- package/dist/component/component3d.d.ts.map +0 -1
- package/dist/component/component3d.js +0 -99
- package/dist/component/component3d.js.map +0 -1
- package/dist/component/factory.d.ts +0 -63
- package/dist/component/factory.d.ts.map +0 -1
- package/dist/component/factory.js +0 -313
- package/dist/component/factory.js.map +0 -1
- package/dist/component/modules/aim.d.ts +0 -30
- package/dist/component/modules/aim.d.ts.map +0 -1
- package/dist/component/modules/aim.js +0 -39
- package/dist/component/modules/aim.js.map +0 -1
- package/dist/component/modules/corners.d.ts +0 -13
- package/dist/component/modules/corners.d.ts.map +0 -1
- package/dist/component/modules/corners.js +0 -12
- package/dist/component/modules/corners.js.map +0 -1
- package/dist/component/modules/flow.d.ts +0 -26
- package/dist/component/modules/flow.d.ts.map +0 -1
- package/dist/component/modules/flow.js +0 -55
- package/dist/component/modules/flow.js.map +0 -1
- package/dist/component/modules/material.d.ts +0 -40
- package/dist/component/modules/material.d.ts.map +0 -1
- package/dist/component/modules/material.js +0 -75
- package/dist/component/modules/material.js.map +0 -1
- package/dist/component/modules/paint.d.ts +0 -71
- package/dist/component/modules/paint.d.ts.map +0 -1
- package/dist/component/modules/paint.js +0 -106
- package/dist/component/modules/paint.js.map +0 -1
- package/dist/component/modules/shapes.d.ts +0 -31
- package/dist/component/modules/shapes.d.ts.map +0 -1
- package/dist/component/modules/shapes.js +0 -43
- package/dist/component/modules/shapes.js.map +0 -1
- package/dist/component/modules/text-layout.d.ts +0 -26
- package/dist/component/modules/text-layout.d.ts.map +0 -1
- package/dist/component/modules/text-layout.js +0 -57
- package/dist/component/modules/text-layout.js.map +0 -1
- package/dist/component/modules/text-style.d.ts +0 -48
- package/dist/component/modules/text-style.d.ts.map +0 -1
- package/dist/component/modules/text-style.js +0 -63
- package/dist/component/modules/text-style.js.map +0 -1
- package/dist/component/modules/three-entries.d.ts +0 -23
- package/dist/component/modules/three-entries.d.ts.map +0 -1
- package/dist/component/modules/three-entries.js +0 -41
- package/dist/component/modules/three-entries.js.map +0 -1
- package/dist/component/modules/view3d.d.ts +0 -55
- package/dist/component/modules/view3d.d.ts.map +0 -1
- package/dist/component/modules/view3d.js +0 -160
- package/dist/component/modules/view3d.js.map +0 -1
- package/dist/component/timeline.d.ts +0 -22
- package/dist/component/timeline.d.ts.map +0 -1
- package/dist/component/timeline.js +0 -128
- package/dist/component/timeline.js.map +0 -1
- package/dist/component/type-def.d.ts +0 -26
- package/dist/component/type-def.d.ts.map +0 -1
- package/dist/component/type-def.js +0 -16
- package/dist/component/type-def.js.map +0 -1
- package/dist/component/types.d.ts +0 -91
- package/dist/component/types.d.ts.map +0 -1
- package/dist/component/types.js +0 -88
- package/dist/component/types.js.map +0 -1
- package/dist/component/views.d.ts +0 -121
- package/dist/component/views.d.ts.map +0 -1
- package/dist/component/views.js +0 -413
- package/dist/component/views.js.map +0 -1
- package/dist/document/withdraw.d.ts +0 -28
- package/dist/document/withdraw.d.ts.map +0 -1
- package/dist/document/withdraw.js +0 -61
- package/dist/document/withdraw.js.map +0 -1
- 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 -27
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -26
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js +0 -264
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts +0 -56
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js +0 -86
- 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 +0 -80
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts +0 -63
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js +0 -131
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts +0 -55
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js +0 -73
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts +0 -1111
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js +0 -1665
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -142
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -232
- 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 -2
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts +0 -107
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js +0 -179
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -41
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -71
- 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/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/group-bounds.d.ts +0 -56
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js +0 -87
- package/dist/nodes/geometry/group-bounds.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 -58
- 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 +0 -93
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js +0 -470
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -53
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -35
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -80
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -153
- 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 -350
- 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 +0 -53
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js +0 -23
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts +0 -89
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js +0 -135
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts +0 -39
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js +0 -14
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts +0 -46
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js +0 -74
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts +0 -445
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js +0 -745
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts +0 -32
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js +0 -37
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/root/canvas2d-node.d.ts +0 -163
- package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/root/canvas2d-node.js +0 -264
- package/dist/nodes/root/canvas2d-node.js.map +0 -1
- package/dist/nodes/root/provider-node.d.ts +0 -47
- package/dist/nodes/root/provider-node.d.ts.map +0 -1
- package/dist/nodes/root/provider-node.js +0 -63
- package/dist/nodes/root/provider-node.js.map +0 -1
- package/dist/nodes/root/theme-provider-node.d.ts +0 -29
- package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/root/theme-provider-node.js +0 -43
- package/dist/nodes/root/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -103
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -146
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts +0 -66
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js +0 -227
- 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 +0 -51
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js +0 -77
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -68
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -78
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -118
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -153
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-layout.d.ts +0 -87
- package/dist/nodes/text/text-layout.d.ts.map +0 -1
- package/dist/nodes/text/text-layout.js +0 -368
- package/dist/nodes/text/text-layout.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 -109
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -112
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -295
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -486
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -173
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -284
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -106
- 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 +0 -62
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js +0 -114
- 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 +0 -230
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js +0 -337
- 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 -81
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -137
- package/dist/tween/seekable.js.map +0 -1
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { Color } from "../../attributes/shape/fill/color/parser.js";
|
|
2
|
-
import type { AmbientLightData3D, AreaLightData3D, DirectionalLightData3D, HemisphereLightData3D, LightData3D, PointLightData3D, SpotLightData3D } from "../../render3d/light.js";
|
|
3
|
-
import type { RenderContext3D } from "../../render3d/render-context3d.js";
|
|
4
|
-
import { Node3D, type Node3DProps } from "./node3d.js";
|
|
5
|
-
import type { NodeConfig } from "../../nodes/node/node.js";
|
|
6
|
-
/**
|
|
7
|
-
* The light nodes.
|
|
8
|
-
*
|
|
9
|
-
* A light is a thing in the scene with a position, so it is a `Node3D` like any
|
|
10
|
-
* other — it can sit inside a `Group3D` and be carried by it, be held by a ref,
|
|
11
|
-
* and have its `intensity` or `color` tweened:
|
|
12
|
-
*
|
|
13
|
-
* <DirectionalLight3D ref={key} intensity={2.4} position={[4, 6, 3]} shadow />
|
|
14
|
-
* key().to({ data: { intensity: 0.2 }, duration: 1 });
|
|
15
|
-
*
|
|
16
|
-
* `AmbientLight3D` and `HemisphereLight3D` have no position — they light the
|
|
17
|
-
* whole scene evenly — but are still nodes, so they read the same way in a tree.
|
|
18
|
-
*
|
|
19
|
-
* ── Intensity is one scale ────────────────────────────────────────────────────
|
|
20
|
-
* A point or spot light's `intensity` means the same thing a directional light's
|
|
21
|
-
* does: 1 is a normal light. three measures the first two in candela and the
|
|
22
|
-
* third in lux, which is physically correct and is why scenes ended up written
|
|
23
|
-
* with `intensity={2.4}` beside `intensity={40}`. The renderer converts.
|
|
24
|
-
*/
|
|
25
|
-
/** Params of a light descriptor, minus its discriminant. */
|
|
26
|
-
type ParamsOf<L extends {
|
|
27
|
-
type: string;
|
|
28
|
-
}> = Omit<L, "type" | "shadow">;
|
|
29
|
-
/** Shared base: every light draws itself by declaring itself to the context. */
|
|
30
|
-
declare abstract class Light3DNode<P extends Node3DProps> extends Node3D<P> {
|
|
31
|
-
/** The descriptor this node contributes. */
|
|
32
|
-
protected abstract buildLight(): LightData3D;
|
|
33
|
-
/** Loads nothing — and recording `renderSelf` would make every light prop a dependency. */
|
|
34
|
-
declareAssets(): void;
|
|
35
|
-
protected renderSelf(ctx: RenderContext3D): void;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* A light that can cast a shadow map.
|
|
39
|
-
*
|
|
40
|
-
* `shadow` is the {@link Shadow3D} every node carries, and it defaults to `true`
|
|
41
|
-
* there because that is right for a *mesh* — turning shadows on should make
|
|
42
|
-
* meshes cast and receive without tagging each one. A light is the other half of
|
|
43
|
-
* that trade: every light casting is N shadow maps, and a point light's is six
|
|
44
|
-
* faces. So the default is flipped here, in the constructor rather than by
|
|
45
|
-
* redeclaring the prop, because the property registry keeps the base class's
|
|
46
|
-
* metadata for a key and a subclass decorator would be silently ignored.
|
|
47
|
-
*/
|
|
48
|
-
declare abstract class ShadowCastingLight3D<P extends Node3DProps> extends Light3DNode<P> {
|
|
49
|
-
constructor(props?: NodeConfig<any, P>);
|
|
50
|
-
}
|
|
51
|
-
export interface AmbientLight3DProps extends Node3DProps, Partial<ParamsOf<AmbientLightData3D>> {
|
|
52
|
-
}
|
|
53
|
-
/** Flat, directionless fill light. The cheapest way to stop shadows being black. */
|
|
54
|
-
export declare class AmbientLight3D<P extends AmbientLight3DProps = AmbientLight3DProps> extends Light3DNode<P> {
|
|
55
|
-
color: Color | undefined;
|
|
56
|
-
intensity: number | undefined;
|
|
57
|
-
protected buildLight(): LightData3D;
|
|
58
|
-
}
|
|
59
|
-
export interface HemisphereLight3DProps extends Node3DProps, Partial<ParamsOf<HemisphereLightData3D>> {
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Sky-to-ground gradient fill — ambient light with a sense of up.
|
|
63
|
-
*
|
|
64
|
-
* The two colours are `sky` and `ground`. They were `color` and `groundColor`,
|
|
65
|
-
* and the node's `color` was silently dropped: the descriptor and the renderer
|
|
66
|
-
* both read `skyColor`, which nothing ever wrote.
|
|
67
|
-
*/
|
|
68
|
-
export declare class HemisphereLight3D<P extends HemisphereLight3DProps = HemisphereLight3DProps> extends Light3DNode<P> {
|
|
69
|
-
sky: Color | undefined;
|
|
70
|
-
ground: Color | undefined;
|
|
71
|
-
intensity: number | undefined;
|
|
72
|
-
protected buildLight(): LightData3D;
|
|
73
|
-
}
|
|
74
|
-
export interface DirectionalLight3DProps extends Node3DProps, Partial<ParamsOf<DirectionalLightData3D>> {
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Parallel rays from a direction — the sun. Its `position` sets the direction it
|
|
78
|
-
* shines *from*, toward `target` (the origin by default).
|
|
79
|
-
*/
|
|
80
|
-
export declare class DirectionalLight3D<P extends DirectionalLight3DProps = DirectionalLight3DProps> extends ShadowCastingLight3D<P> {
|
|
81
|
-
color: Color | undefined;
|
|
82
|
-
intensity: number | undefined;
|
|
83
|
-
target: DirectionalLightData3D["target"];
|
|
84
|
-
protected buildLight(): LightData3D;
|
|
85
|
-
}
|
|
86
|
-
export interface PointLight3DProps extends Node3DProps, Partial<ParamsOf<PointLightData3D>> {
|
|
87
|
-
}
|
|
88
|
-
/** A bulb: light radiating from a point, falling off with distance. */
|
|
89
|
-
export declare class PointLight3D<P extends PointLight3DProps = PointLight3DProps> extends ShadowCastingLight3D<P> {
|
|
90
|
-
color: Color | undefined;
|
|
91
|
-
intensity: number | undefined;
|
|
92
|
-
distance: number | undefined;
|
|
93
|
-
decay: number | undefined;
|
|
94
|
-
protected buildLight(): LightData3D;
|
|
95
|
-
}
|
|
96
|
-
export interface SpotLight3DProps extends Node3DProps, Partial<ParamsOf<SpotLightData3D>> {
|
|
97
|
-
}
|
|
98
|
-
/** A cone of light. `angle` is the cone half-angle, in **degrees**. */
|
|
99
|
-
export declare class SpotLight3D<P extends SpotLight3DProps = SpotLight3DProps> extends ShadowCastingLight3D<P> {
|
|
100
|
-
color: Color | undefined;
|
|
101
|
-
intensity: number | undefined;
|
|
102
|
-
distance: number | undefined;
|
|
103
|
-
angle: number | undefined;
|
|
104
|
-
penumbra: number | undefined;
|
|
105
|
-
decay: number | undefined;
|
|
106
|
-
target: SpotLightData3D["target"];
|
|
107
|
-
protected buildLight(): LightData3D;
|
|
108
|
-
}
|
|
109
|
-
export interface AreaLight3DProps extends Node3DProps, Partial<ParamsOf<AreaLightData3D>> {
|
|
110
|
-
}
|
|
111
|
-
/** A glowing rectangle — a softbox. Lights `standard`/`physical` materials only. */
|
|
112
|
-
export declare class AreaLight3D<P extends AreaLight3DProps = AreaLight3DProps> extends Light3DNode<P> {
|
|
113
|
-
color: Color | undefined;
|
|
114
|
-
intensity: number | undefined;
|
|
115
|
-
width: number | undefined;
|
|
116
|
-
height: number | undefined;
|
|
117
|
-
protected buildLight(): LightData3D;
|
|
118
|
-
}
|
|
119
|
-
export {};
|
|
120
|
-
//# sourceMappingURL=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3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
8
|
-
import { colorProperty, optionalVector3Property } from "../../attributes/properties/typed.js";
|
|
9
|
-
import { Node3D } from "./node3d.js";
|
|
10
|
-
/**
|
|
11
|
-
* A light's own parameters, gathered off the props that were actually set.
|
|
12
|
-
*
|
|
13
|
-
* Omitted keys stay absent so the renderer's default applies, exactly as the
|
|
14
|
-
* `Graphics3D` light sugar does.
|
|
15
|
-
*/
|
|
16
|
-
function lightFrom(type, node, keys) {
|
|
17
|
-
const out = { type };
|
|
18
|
-
for (const key of keys) {
|
|
19
|
-
const value = node[key];
|
|
20
|
-
if (value !== undefined)
|
|
21
|
-
out[key] = value;
|
|
22
|
-
}
|
|
23
|
-
return out;
|
|
24
|
-
}
|
|
25
|
-
/** Shared base: every light draws itself by declaring itself to the context. */
|
|
26
|
-
class Light3DNode extends Node3D {
|
|
27
|
-
/** Loads nothing — and recording `renderSelf` would make every light prop a dependency. */
|
|
28
|
-
declareAssets() { }
|
|
29
|
-
renderSelf(ctx) {
|
|
30
|
-
ctx.light(this.buildLight());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A light that can cast a shadow map.
|
|
35
|
-
*
|
|
36
|
-
* `shadow` is the {@link Shadow3D} every node carries, and it defaults to `true`
|
|
37
|
-
* there because that is right for a *mesh* — turning shadows on should make
|
|
38
|
-
* meshes cast and receive without tagging each one. A light is the other half of
|
|
39
|
-
* that trade: every light casting is N shadow maps, and a point light's is six
|
|
40
|
-
* faces. So the default is flipped here, in the constructor rather than by
|
|
41
|
-
* redeclaring the prop, because the property registry keeps the base class's
|
|
42
|
-
* metadata for a key and a subclass decorator would be silently ignored.
|
|
43
|
-
*/
|
|
44
|
-
class ShadowCastingLight3D extends Light3DNode {
|
|
45
|
-
constructor(props) {
|
|
46
|
-
super(props);
|
|
47
|
-
// Only when the author said nothing: an explicit `shadow` — including
|
|
48
|
-
// `shadow={false}` — has already been written by `initProps`.
|
|
49
|
-
if (props?.shadow === undefined)
|
|
50
|
-
this.applyProp("shadow", false);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const AMBIENT_KEYS = ["color", "intensity"];
|
|
54
|
-
/** Flat, directionless fill light. The cheapest way to stop shadows being black. */
|
|
55
|
-
export class AmbientLight3D extends Light3DNode {
|
|
56
|
-
buildLight() {
|
|
57
|
-
return lightFrom("ambient", this, AMBIENT_KEYS);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
__decorate([
|
|
61
|
-
colorProperty({ default: undefined })
|
|
62
|
-
], AmbientLight3D.prototype, "color", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
property({ default: undefined })
|
|
65
|
-
], AmbientLight3D.prototype, "intensity", void 0);
|
|
66
|
-
const HEMISPHERE_KEYS = ["sky", "ground", "intensity"];
|
|
67
|
-
/**
|
|
68
|
-
* Sky-to-ground gradient fill — ambient light with a sense of up.
|
|
69
|
-
*
|
|
70
|
-
* The two colours are `sky` and `ground`. They were `color` and `groundColor`,
|
|
71
|
-
* and the node's `color` was silently dropped: the descriptor and the renderer
|
|
72
|
-
* both read `skyColor`, which nothing ever wrote.
|
|
73
|
-
*/
|
|
74
|
-
export class HemisphereLight3D extends Light3DNode {
|
|
75
|
-
buildLight() {
|
|
76
|
-
return lightFrom("hemisphere", this, HEMISPHERE_KEYS);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
__decorate([
|
|
80
|
-
colorProperty({ default: undefined })
|
|
81
|
-
], HemisphereLight3D.prototype, "sky", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
colorProperty({ default: undefined })
|
|
84
|
-
], HemisphereLight3D.prototype, "ground", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
property({ default: undefined })
|
|
87
|
-
], HemisphereLight3D.prototype, "intensity", void 0);
|
|
88
|
-
const DIRECTIONAL_KEYS = ["color", "intensity", "target", "shadow"];
|
|
89
|
-
/**
|
|
90
|
-
* Parallel rays from a direction — the sun. Its `position` sets the direction it
|
|
91
|
-
* shines *from*, toward `target` (the origin by default).
|
|
92
|
-
*/
|
|
93
|
-
export class DirectionalLight3D extends ShadowCastingLight3D {
|
|
94
|
-
buildLight() {
|
|
95
|
-
return lightFrom("directional", this, DIRECTIONAL_KEYS);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
__decorate([
|
|
99
|
-
colorProperty({ default: undefined })
|
|
100
|
-
], DirectionalLight3D.prototype, "color", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
property({ default: undefined })
|
|
103
|
-
], DirectionalLight3D.prototype, "intensity", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
optionalVector3Property("origin")
|
|
106
|
-
], DirectionalLight3D.prototype, "target", void 0);
|
|
107
|
-
const POINT_KEYS = ["color", "intensity", "distance", "decay", "shadow"];
|
|
108
|
-
/** A bulb: light radiating from a point, falling off with distance. */
|
|
109
|
-
export class PointLight3D extends ShadowCastingLight3D {
|
|
110
|
-
buildLight() {
|
|
111
|
-
return lightFrom("point", this, POINT_KEYS);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
__decorate([
|
|
115
|
-
colorProperty({ default: undefined })
|
|
116
|
-
], PointLight3D.prototype, "color", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
property({ default: undefined })
|
|
119
|
-
], PointLight3D.prototype, "intensity", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
property({ default: undefined })
|
|
122
|
-
], PointLight3D.prototype, "distance", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
property({ default: undefined })
|
|
125
|
-
], PointLight3D.prototype, "decay", void 0);
|
|
126
|
-
const SPOT_KEYS = ["color", "intensity", "distance", "angle", "penumbra", "decay", "target", "shadow"];
|
|
127
|
-
/** A cone of light. `angle` is the cone half-angle, in **degrees**. */
|
|
128
|
-
export class SpotLight3D extends ShadowCastingLight3D {
|
|
129
|
-
buildLight() {
|
|
130
|
-
return lightFrom("spot", this, SPOT_KEYS);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
__decorate([
|
|
134
|
-
colorProperty({ default: undefined })
|
|
135
|
-
], SpotLight3D.prototype, "color", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
property({ default: undefined })
|
|
138
|
-
], SpotLight3D.prototype, "intensity", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ default: undefined })
|
|
141
|
-
], SpotLight3D.prototype, "distance", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
property({ default: undefined })
|
|
144
|
-
], SpotLight3D.prototype, "angle", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
property({ default: undefined })
|
|
147
|
-
], SpotLight3D.prototype, "penumbra", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
property({ default: undefined })
|
|
150
|
-
], SpotLight3D.prototype, "decay", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
optionalVector3Property("origin")
|
|
153
|
-
], SpotLight3D.prototype, "target", void 0);
|
|
154
|
-
const AREA_KEYS = ["color", "intensity", "width", "height"];
|
|
155
|
-
/** A glowing rectangle — a softbox. Lights `standard`/`physical` materials only. */
|
|
156
|
-
export class AreaLight3D extends Light3DNode {
|
|
157
|
-
buildLight() {
|
|
158
|
-
return lightFrom("area", this, AREA_KEYS);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
__decorate([
|
|
162
|
-
colorProperty({ default: undefined })
|
|
163
|
-
], AreaLight3D.prototype, "color", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
property({ default: undefined })
|
|
166
|
-
], AreaLight3D.prototype, "intensity", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
property({ default: undefined })
|
|
169
|
-
], AreaLight3D.prototype, "width", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
property({ default: undefined })
|
|
172
|
-
], AreaLight3D.prototype, "height", void 0);
|
|
173
|
-
//# sourceMappingURL=light-nodes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"light-nodes.js","sourceRoot":"","sources":["../../../src/nodes/three/light-nodes.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAQvF,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AA4BpD;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAyB,EAAE,IAAY,EAAE,IAAuB;IAC/E,MAAM,GAAG,GAA4B,EAAE,IAAI,EAAE,CAAC;IAC9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,KAAK,GAAI,IAAgC,CAAC,GAAG,CAAC,CAAC;QACrD,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC9C,CAAC;IACD,OAAO,GAA6B,CAAC;AACzC,CAAC;AAED,gFAAgF;AAChF,MAAe,WAAmC,SAAQ,MAAS;IAI/D,2FAA2F;IAClF,aAAa,KAAW,CAAC;IAEf,UAAU,CAAC,GAAoB;QAC9C,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACjC,CAAC;CACJ;AAED;;;;;;;;;;GAUG;AACH,MAAe,oBAA4C,SAAQ,WAAc;IAC7E,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,sEAAsE;QACtE,8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AAE,CAAC;0CAAmC;AAC1B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;6CAAsC;AAC7B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAmC;AACzB;IAA1C,uBAAuB,CAAC,QAAQ,CAAC;2CAA2C;AAWjF,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAErE,oFAAoF;AACpF,MAAM,OAAO,WAA2D,SAAQ,WAAc;IAMvE,UAAU;QACzB,OAAO,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;CACJ;AARkD;IAA9C,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAkC;AAC9B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;8CAAuC;AAC9B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAmC;AAC1B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;2CAAoC","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\r\nimport { colorProperty, optionalVector3Property } from \"@/attributes/properties/typed\";\r\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport type {\r\n AmbientLightData3D, AreaLightData3D, DirectionalLightData3D,\r\n HemisphereLightData3D, LightData3D, PointLightData3D, SpotLightData3D,\r\n} from \"@/render3d/light\";\r\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\r\n\r\nimport { Node3D, type Node3DProps } from \"./node3d\";\r\nimport type { NodeConfig } from \"@/nodes/node/node\";\r\n\r\n/**\r\n * The light nodes.\r\n *\r\n * A light is a thing in the scene with a position, so it is a `Node3D` like any\r\n * other — it can sit inside a `Group3D` and be carried by it, be held by a ref,\r\n * and have its `intensity` or `color` tweened:\r\n *\r\n * <DirectionalLight3D ref={key} intensity={2.4} position={[4, 6, 3]} shadow />\r\n * key().to({ data: { intensity: 0.2 }, duration: 1 });\r\n *\r\n * `AmbientLight3D` and `HemisphereLight3D` have no position — they light the\r\n * whole scene evenly — but are still nodes, so they read the same way in a tree.\r\n *\r\n * ── Intensity is one scale ────────────────────────────────────────────────────\r\n * A point or spot light's `intensity` means the same thing a directional light's\r\n * does: 1 is a normal light. three measures the first two in candela and the\r\n * third in lux, which is physically correct and is why scenes ended up written\r\n * with `intensity={2.4}` beside `intensity={40}`. The renderer converts.\r\n */\r\n\r\n/** Params of a light descriptor, minus its discriminant. */\r\n// `shadow` is dropped because `Node3DProps` already declares it, as the broader\r\n// `Shadow3D` a mesh also takes — one prop, one type, asked of both kinds of node.\r\ntype ParamsOf<L extends { type: string }> = Omit<L, \"type\" | \"shadow\">;\r\n\r\n/**\r\n * A light's own parameters, gathered off the props that were actually set.\r\n *\r\n * Omitted keys stay absent so the renderer's default applies, exactly as the\r\n * `Graphics3D` light sugar does.\r\n */\r\nfunction lightFrom(type: LightData3D[\"type\"], node: object, keys: readonly string[]): LightData3D {\r\n const out: Record<string, unknown> = { type };\r\n for (const key of keys) {\r\n const value = (node as Record<string, unknown>)[key];\r\n if (value !== undefined) out[key] = value;\r\n }\r\n return out as unknown as LightData3D;\r\n}\r\n\r\n/** Shared base: every light draws itself by declaring itself to the context. */\r\nabstract class Light3DNode<P extends Node3DProps> extends Node3D<P> {\r\n /** The descriptor this node contributes. */\r\n protected abstract buildLight(): LightData3D;\r\n\r\n /** Loads nothing — and recording `renderSelf` would make every light prop a dependency. */\r\n override declareAssets(): void { }\r\n\r\n protected override renderSelf(ctx: RenderContext3D): void {\r\n ctx.light(this.buildLight());\r\n }\r\n}\r\n\r\n/**\r\n * A light that can cast a shadow map.\r\n *\r\n * `shadow` is the {@link Shadow3D} every node carries, and it defaults to `true`\r\n * there because that is right for a *mesh* — turning shadows on should make\r\n * meshes cast and receive without tagging each one. A light is the other half of\r\n * that trade: every light casting is N shadow maps, and a point light's is six\r\n * faces. So the default is flipped here, in the constructor rather than by\r\n * redeclaring the prop, because the property registry keeps the base class's\r\n * metadata for a key and a subclass decorator would be silently ignored.\r\n */\r\nabstract class ShadowCastingLight3D<P extends Node3DProps> extends Light3DNode<P> {\r\n constructor(props?: NodeConfig<any, P>) {\r\n super(props);\r\n // Only when the author said nothing: an explicit `shadow` — including\r\n // `shadow={false}` — has already been written by `initProps`.\r\n if (props?.shadow === undefined) this.applyProp(\"shadow\", false);\r\n }\r\n}\r\n\r\n// ─── ambient ─────────────────────────────────────────────────────────────────\r\n\r\nexport interface AmbientLight3DProps extends Node3DProps, Partial<ParamsOf<AmbientLightData3D>> { }\r\n\r\nconst AMBIENT_KEYS = [\"color\", \"intensity\"] as const;\r\n\r\n/** Flat, directionless fill light. The cheapest way to stop shadows being black. */\r\nexport class AmbientLight3D<P extends AmbientLight3DProps = AmbientLight3DProps> extends Light3DNode<P> {\r\n @colorProperty({ default: undefined }) declare color: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"ambient\", this, AMBIENT_KEYS);\r\n }\r\n}\r\n\r\n// ─── hemisphere ──────────────────────────────────────────────────────────────\r\n\r\nexport interface HemisphereLight3DProps extends Node3DProps, Partial<ParamsOf<HemisphereLightData3D>> { }\r\n\r\nconst HEMISPHERE_KEYS = [\"sky\", \"ground\", \"intensity\"] as const;\r\n\r\n/**\r\n * Sky-to-ground gradient fill — ambient light with a sense of up.\r\n *\r\n * The two colours are `sky` and `ground`. They were `color` and `groundColor`,\r\n * and the node's `color` was silently dropped: the descriptor and the renderer\r\n * both read `skyColor`, which nothing ever wrote.\r\n */\r\nexport class HemisphereLight3D<P extends HemisphereLight3DProps = HemisphereLight3DProps> extends Light3DNode<P> {\r\n @colorProperty({ default: undefined }) declare sky: Color | undefined;\r\n @colorProperty({ default: undefined }) declare ground: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"hemisphere\", this, HEMISPHERE_KEYS);\r\n }\r\n}\r\n\r\n// ─── directional ─────────────────────────────────────────────────────────────\r\n\r\nexport interface DirectionalLight3DProps extends Node3DProps, Partial<ParamsOf<DirectionalLightData3D>> { }\r\n\r\nconst DIRECTIONAL_KEYS = [\"color\", \"intensity\", \"target\", \"shadow\"] as const;\r\n\r\n/**\r\n * Parallel rays from a direction — the sun. Its `position` sets the direction it\r\n * shines *from*, toward `target` (the origin by default).\r\n */\r\nexport class DirectionalLight3D<P extends DirectionalLight3DProps = DirectionalLight3DProps> extends ShadowCastingLight3D<P> {\r\n @colorProperty({ default: undefined }) declare color: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n @optionalVector3Property(\"origin\") declare target: DirectionalLightData3D[\"target\"];\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"directional\", this, DIRECTIONAL_KEYS);\r\n }\r\n}\r\n\r\n// ─── point ───────────────────────────────────────────────────────────────────\r\n\r\nexport interface PointLight3DProps extends Node3DProps, Partial<ParamsOf<PointLightData3D>> { }\r\n\r\nconst POINT_KEYS = [\"color\", \"intensity\", \"distance\", \"decay\", \"shadow\"] as const;\r\n\r\n/** A bulb: light radiating from a point, falling off with distance. */\r\nexport class PointLight3D<P extends PointLight3DProps = PointLight3DProps> extends ShadowCastingLight3D<P> {\r\n @colorProperty({ default: undefined }) declare color: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n @property({ default: undefined }) declare distance: number | undefined;\r\n @property({ default: undefined }) declare decay: number | undefined;\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"point\", this, POINT_KEYS);\r\n }\r\n}\r\n\r\n// ─── spot ────────────────────────────────────────────────────────────────────\r\n\r\nexport interface SpotLight3DProps extends Node3DProps, Partial<ParamsOf<SpotLightData3D>> { }\r\n\r\nconst SPOT_KEYS = [\"color\", \"intensity\", \"distance\", \"angle\", \"penumbra\", \"decay\", \"target\", \"shadow\"] as const;\r\n\r\n/** A cone of light. `angle` is the cone half-angle, in **degrees**. */\r\nexport class SpotLight3D<P extends SpotLight3DProps = SpotLight3DProps> extends ShadowCastingLight3D<P> {\r\n @colorProperty({ default: undefined }) declare color: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n @property({ default: undefined }) declare distance: number | undefined;\r\n @property({ default: undefined }) declare angle: number | undefined;\r\n @property({ default: undefined }) declare penumbra: number | undefined;\r\n @property({ default: undefined }) declare decay: number | undefined;\r\n @optionalVector3Property(\"origin\") declare target: SpotLightData3D[\"target\"];\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"spot\", this, SPOT_KEYS);\r\n }\r\n}\r\n\r\n// ─── area ────────────────────────────────────────────────────────────────────\r\n\r\nexport interface AreaLight3DProps extends Node3DProps, Partial<ParamsOf<AreaLightData3D>> { }\r\n\r\nconst AREA_KEYS = [\"color\", \"intensity\", \"width\", \"height\"] as const;\r\n\r\n/** A glowing rectangle — a softbox. Lights `standard`/`physical` materials only. */\r\nexport class AreaLight3D<P extends AreaLight3DProps = AreaLight3DProps> extends Light3DNode<P> {\r\n @colorProperty({ default: undefined }) declare color: Color | undefined;\r\n @property({ default: undefined }) declare intensity: number | undefined;\r\n @property({ default: undefined }) declare width: number | undefined;\r\n @property({ default: undefined }) declare height: number | undefined;\r\n\r\n protected override buildLight(): LightData3D {\r\n return lightFrom(\"area\", this, AREA_KEYS);\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { Color } from "../../attributes/shape/fill/color/parser.js";
|
|
2
|
-
import { Graphics3D, type MaterialShorthand3D } from "../../render3d/graphics3d.js";
|
|
3
|
-
import { type Fill3D } from "../../render3d/fill3d.js";
|
|
4
|
-
import type { Geometry3D } from "../../render3d/geometry.js";
|
|
5
|
-
import type { Material3D, Shading3D } from "../../render3d/material.js";
|
|
6
|
-
import type { Texture3D } from "../../render3d/texture.js";
|
|
7
|
-
import type { RenderContext3D } from "../../render3d/render-context3d.js";
|
|
8
|
-
import type { Blend3D, Faces3D } from "../../render3d/transform.js";
|
|
9
|
-
import { Node3D, type Node3DProps } from "./node3d.js";
|
|
10
|
-
/**
|
|
11
|
-
* The material shorthand, as node props.
|
|
12
|
-
*
|
|
13
|
-
* Exactly the keys {@link MaterialShorthand3D} promotes onto the `Graphics3D`
|
|
14
|
-
* sugar methods, so `<Box3D fill="red" roughness={0.3} />` and
|
|
15
|
-
* `g3.box({ fill: "red", roughness: 0.3 })` describe the same mesh — and each is
|
|
16
|
-
* a real prop here, so any of them can be tweened.
|
|
17
|
-
*
|
|
18
|
-
* Ten props, where there were twenty-four. What went is everything that was a
|
|
19
|
-
* renderer knob rather than a design decision — `depthWrite`, `depthTest`,
|
|
20
|
-
* `alphaTest`, `toneMapped`, `polygonOffset`, `dithering` — which now live only
|
|
21
|
-
* on a `Mat.*` descriptor passed through {@link material}; plus `transparent`,
|
|
22
|
-
* which is derived; plus five texture slots, which are fills.
|
|
23
|
-
*/
|
|
24
|
-
export interface Material3DProps {
|
|
25
|
-
/** A full descriptor (or an array, for multi-material). Wins over the rest. */
|
|
26
|
-
material: Material3D | readonly Material3D[] | undefined;
|
|
27
|
-
/** What the surface is made of — the same value a 2D `fill` takes. */
|
|
28
|
-
fill: Fill3D;
|
|
29
|
-
opacity: number;
|
|
30
|
-
roughness: number;
|
|
31
|
-
metalness: number;
|
|
32
|
-
emission: Color | undefined;
|
|
33
|
-
emissionStrength: number;
|
|
34
|
-
normalMap: Texture3D | undefined;
|
|
35
|
-
roughnessMap: Texture3D | undefined;
|
|
36
|
-
metalnessMap: Texture3D | undefined;
|
|
37
|
-
aoMap: Texture3D | undefined;
|
|
38
|
-
alphaMap: Texture3D | undefined;
|
|
39
|
-
envMapIntensity: number;
|
|
40
|
-
wireframe: boolean;
|
|
41
|
-
/** Facet or smooth shading. Default `"smooth"`. */
|
|
42
|
-
shading: Shading3D;
|
|
43
|
-
/** Which faces to rasterize. Default `"front"`. */
|
|
44
|
-
faces: Faces3D;
|
|
45
|
-
vertexColors: boolean;
|
|
46
|
-
blend: Blend3D;
|
|
47
|
-
/** Shade with an unlit `basic` material instead of `standard`. */
|
|
48
|
-
unlit: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface Mesh3DProps extends Node3DProps, Partial<Material3DProps> {
|
|
51
|
-
/** The geometry to draw. Set directly, or by a geometry subclass's props. */
|
|
52
|
-
geometry: Geometry3D;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* A drawable 3D object — geometry plus a material.
|
|
56
|
-
*
|
|
57
|
-
* The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and
|
|
58
|
-
* the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to
|
|
59
|
-
* supply a geometry from their own props.
|
|
60
|
-
*
|
|
61
|
-
* <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill="tomato" roughness={0.2} />
|
|
62
|
-
* <Box3D fill={["#1a1a2e", Fills.linearGradient(["#e0533d", "#8b5cf6"])]} />
|
|
63
|
-
*
|
|
64
|
-
* Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: "cyan" }, duration: 1 })`
|
|
65
|
-
* animates in place — three writes the values onto the live material rather than
|
|
66
|
-
* recompiling. Geometry *parameters* are the exception: three geometries are
|
|
67
|
-
* immutable, so tweening a `radius` reallocates the mesh every frame. Tween
|
|
68
|
-
* `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.
|
|
69
|
-
*/
|
|
70
|
-
export declare class Mesh3D<P extends Mesh3DProps = Mesh3DProps> extends Node3D<P> {
|
|
71
|
-
geometry: Geometry3D;
|
|
72
|
-
material: Material3D | readonly Material3D[] | undefined;
|
|
73
|
-
fill: Fill3D;
|
|
74
|
-
opacity: number | undefined;
|
|
75
|
-
roughness: number | undefined;
|
|
76
|
-
metalness: number | undefined;
|
|
77
|
-
emission: Color | undefined;
|
|
78
|
-
emissionStrength: number | undefined;
|
|
79
|
-
normalMap: Texture3D | undefined;
|
|
80
|
-
roughnessMap: Texture3D | undefined;
|
|
81
|
-
metalnessMap: Texture3D | undefined;
|
|
82
|
-
aoMap: Texture3D | undefined;
|
|
83
|
-
alphaMap: Texture3D | undefined;
|
|
84
|
-
envMapIntensity: number | undefined;
|
|
85
|
-
wireframe: boolean | undefined;
|
|
86
|
-
shading: Shading3D | undefined;
|
|
87
|
-
faces: Faces3D | undefined;
|
|
88
|
-
vertexColors: boolean | undefined;
|
|
89
|
-
blend: Blend3D | undefined;
|
|
90
|
-
unlit: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* The geometry this node draws.
|
|
93
|
-
*
|
|
94
|
-
* Overridden by each sugar subclass to build one from its own props; the base
|
|
95
|
-
* returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works
|
|
96
|
-
* for anything the sugar doesn't cover.
|
|
97
|
-
*/
|
|
98
|
-
protected buildGeometry(): Geometry3D | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* The material shorthand, gathered off the props that were actually set.
|
|
101
|
-
*
|
|
102
|
-
* `undefined` defaults are deliberate: an omitted key must stay absent from
|
|
103
|
-
* the descriptor so `Graphics3D` picks the renderer's own default, rather than
|
|
104
|
-
* being pinned to a value this node invented.
|
|
105
|
-
*/
|
|
106
|
-
protected materialShorthand(): MaterialShorthand3D;
|
|
107
|
-
/**
|
|
108
|
-
* What this node draws this frame.
|
|
109
|
-
*
|
|
110
|
-
* The single seam both the real render and the asset-declaration pass go
|
|
111
|
-
* through — the same discipline as `Rect.shapeGraphics()` — so the textures
|
|
112
|
-
* that get loaded can never drift from the ones that get drawn.
|
|
113
|
-
*/
|
|
114
|
-
protected buildGraphics3D(): Graphics3D;
|
|
115
|
-
protected renderSelf(ctx: RenderContext3D): void;
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=mesh3d.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1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SAAS,CAAC;IAClC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IAErD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,IAAI,UAAU,GAAG,SAAS;IAIjD;;;;;;OAMG;IACH,SAAS,CAAC,iBAAiB,IAAI,mBAAmB;IAalD;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,IAAI,UAAU;cAOpB,UAAU,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;CAG5D"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
8
|
-
import { colorProperty } from "../../attributes/properties/typed.js";
|
|
9
|
-
import { Graphics3D, resolveMaterialShorthand3D } from "../../render3d/graphics3d.js";
|
|
10
|
-
import { lerpFill3D } from "../../render3d/fill3d.js";
|
|
11
|
-
import { Node3D } from "./node3d.js";
|
|
12
|
-
/** The shorthand keys, in the order they are copied onto a built descriptor. */
|
|
13
|
-
const MATERIAL_PROP_KEYS = [
|
|
14
|
-
"opacity", "roughness", "metalness",
|
|
15
|
-
"emission", "emissionStrength", "normalMap", "roughnessMap",
|
|
16
|
-
"metalnessMap", "aoMap", "alphaMap", "envMapIntensity", "wireframe",
|
|
17
|
-
"shading", "faces", "vertexColors", "blend",
|
|
18
|
-
];
|
|
19
|
-
/**
|
|
20
|
-
* A drawable 3D object — geometry plus a material.
|
|
21
|
-
*
|
|
22
|
-
* The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and
|
|
23
|
-
* the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to
|
|
24
|
-
* supply a geometry from their own props.
|
|
25
|
-
*
|
|
26
|
-
* <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill="tomato" roughness={0.2} />
|
|
27
|
-
* <Box3D fill={["#1a1a2e", Fills.linearGradient(["#e0533d", "#8b5cf6"])]} />
|
|
28
|
-
*
|
|
29
|
-
* Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: "cyan" }, duration: 1 })`
|
|
30
|
-
* animates in place — three writes the values onto the live material rather than
|
|
31
|
-
* recompiling. Geometry *parameters* are the exception: three geometries are
|
|
32
|
-
* immutable, so tweening a `radius` reallocates the mesh every frame. Tween
|
|
33
|
-
* `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.
|
|
34
|
-
*/
|
|
35
|
-
export class Mesh3D extends Node3D {
|
|
36
|
-
/**
|
|
37
|
-
* The geometry this node draws.
|
|
38
|
-
*
|
|
39
|
-
* Overridden by each sugar subclass to build one from its own props; the base
|
|
40
|
-
* returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works
|
|
41
|
-
* for anything the sugar doesn't cover.
|
|
42
|
-
*/
|
|
43
|
-
buildGeometry() {
|
|
44
|
-
return this.geometry;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The material shorthand, gathered off the props that were actually set.
|
|
48
|
-
*
|
|
49
|
-
* `undefined` defaults are deliberate: an omitted key must stay absent from
|
|
50
|
-
* the descriptor so `Graphics3D` picks the renderer's own default, rather than
|
|
51
|
-
* being pinned to a value this node invented.
|
|
52
|
-
*/
|
|
53
|
-
materialShorthand() {
|
|
54
|
-
const out = {};
|
|
55
|
-
const material = this.material;
|
|
56
|
-
if (material !== undefined)
|
|
57
|
-
out.material = material;
|
|
58
|
-
if (this.fill !== undefined)
|
|
59
|
-
out.fill = this.fill;
|
|
60
|
-
for (const key of MATERIAL_PROP_KEYS) {
|
|
61
|
-
const value = this[key];
|
|
62
|
-
if (value !== undefined)
|
|
63
|
-
out[key] = value;
|
|
64
|
-
}
|
|
65
|
-
if (this.unlit)
|
|
66
|
-
out.unlit = true;
|
|
67
|
-
return out;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* What this node draws this frame.
|
|
71
|
-
*
|
|
72
|
-
* The single seam both the real render and the asset-declaration pass go
|
|
73
|
-
* through — the same discipline as `Rect.shapeGraphics()` — so the textures
|
|
74
|
-
* that get loaded can never drift from the ones that get drawn.
|
|
75
|
-
*/
|
|
76
|
-
buildGraphics3D() {
|
|
77
|
-
const g3 = new Graphics3D();
|
|
78
|
-
const geometry = this.buildGeometry();
|
|
79
|
-
if (geometry)
|
|
80
|
-
g3.mesh(geometry, resolveMaterialShorthand3D(this.materialShorthand()));
|
|
81
|
-
return g3;
|
|
82
|
-
}
|
|
83
|
-
renderSelf(ctx) {
|
|
84
|
-
ctx.draw(this.buildGraphics3D());
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
__decorate([
|
|
88
|
-
property({ default: undefined })
|
|
89
|
-
], Mesh3D.prototype, "geometry", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
property({ default: undefined })
|
|
92
|
-
], Mesh3D.prototype, "material", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
property({ default: "white", tween: lerpFill3D })
|
|
95
|
-
], Mesh3D.prototype, "fill", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
property({ default: undefined })
|
|
98
|
-
], Mesh3D.prototype, "opacity", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ default: undefined })
|
|
101
|
-
], Mesh3D.prototype, "roughness", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
property({ default: undefined })
|
|
104
|
-
], Mesh3D.prototype, "metalness", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
colorProperty({ default: undefined })
|
|
107
|
-
], Mesh3D.prototype, "emission", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
property({ default: undefined })
|
|
110
|
-
], Mesh3D.prototype, "emissionStrength", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
property({ default: undefined })
|
|
113
|
-
], Mesh3D.prototype, "normalMap", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
property({ default: undefined })
|
|
116
|
-
], Mesh3D.prototype, "roughnessMap", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
property({ default: undefined })
|
|
119
|
-
], Mesh3D.prototype, "metalnessMap", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
property({ default: undefined })
|
|
122
|
-
], Mesh3D.prototype, "aoMap", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
property({ default: undefined })
|
|
125
|
-
], Mesh3D.prototype, "alphaMap", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
property({ default: undefined })
|
|
128
|
-
], Mesh3D.prototype, "envMapIntensity", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
property({ default: undefined })
|
|
131
|
-
], Mesh3D.prototype, "wireframe", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
property({ default: undefined })
|
|
134
|
-
], Mesh3D.prototype, "shading", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
property({ default: undefined })
|
|
137
|
-
], Mesh3D.prototype, "faces", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property({ default: undefined })
|
|
140
|
-
], Mesh3D.prototype, "vertexColors", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ default: undefined })
|
|
143
|
-
], Mesh3D.prototype, "blend", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
property({ default: false })
|
|
146
|
-
], Mesh3D.prototype, "unlit", void 0);
|
|
147
|
-
//# sourceMappingURL=mesh3d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mesh3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C;4CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAsC;AAC7B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;wCAAyC;AAChC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;+CAA6C;AACpC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAwC;AAC/B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;uCAAwC;AAC/B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAoC;AAC3B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAA2C;AAClC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAoC;AAC/B;IAArC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;qCAAwB","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\r\nimport { colorProperty } from \"@/attributes/properties/typed\";\r\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport { Graphics3D, resolveMaterialShorthand3D, type MaterialShorthand3D } from \"@/render3d/graphics3d\";\r\nimport { lerpFill3D, type Fill3D } from \"@/render3d/fill3d\";\r\nimport type { Geometry3D } from \"@/render3d/geometry\";\r\nimport type { Material3D, Shading3D } from \"@/render3d/material\";\r\nimport type { Texture3D } from \"@/render3d/texture\";\r\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\r\nimport type { Blend3D, Faces3D } from \"@/render3d/transform\";\r\nimport { Node3D, type Node3DProps } from \"./node3d\";\r\n\r\n/**\r\n * The material shorthand, as node props.\r\n *\r\n * Exactly the keys {@link MaterialShorthand3D} promotes onto the `Graphics3D`\r\n * sugar methods, so `<Box3D fill=\"red\" roughness={0.3} />` and\r\n * `g3.box({ fill: \"red\", roughness: 0.3 })` describe the same mesh — and each is\r\n * a real prop here, so any of them can be tweened.\r\n *\r\n * Ten props, where there were twenty-four. What went is everything that was a\r\n * renderer knob rather than a design decision — `depthWrite`, `depthTest`,\r\n * `alphaTest`, `toneMapped`, `polygonOffset`, `dithering` — which now live only\r\n * on a `Mat.*` descriptor passed through {@link material}; plus `transparent`,\r\n * which is derived; plus five texture slots, which are fills.\r\n */\r\nexport interface Material3DProps {\r\n /** A full descriptor (or an array, for multi-material). Wins over the rest. */\r\n material: Material3D | readonly Material3D[] | undefined;\r\n /** What the surface is made of — the same value a 2D `fill` takes. */\r\n fill: Fill3D;\r\n opacity: number;\r\n roughness: number;\r\n metalness: number;\r\n emission: Color | undefined;\r\n emissionStrength: number;\r\n normalMap: Texture3D | undefined;\r\n roughnessMap: Texture3D | undefined;\r\n metalnessMap: Texture3D | undefined;\r\n aoMap: Texture3D | undefined;\r\n alphaMap: Texture3D | undefined;\r\n envMapIntensity: number;\r\n wireframe: boolean;\r\n /** Facet or smooth shading. Default `\"smooth\"`. */\r\n shading: Shading3D;\r\n /** Which faces to rasterize. Default `\"front\"`. */\r\n faces: Faces3D;\r\n vertexColors: boolean;\r\n blend: Blend3D;\r\n /** Shade with an unlit `basic` material instead of `standard`. */\r\n unlit: boolean;\r\n}\r\n\r\nexport interface Mesh3DProps extends Node3DProps, Partial<Material3DProps> {\r\n /** The geometry to draw. Set directly, or by a geometry subclass's props. */\r\n geometry: Geometry3D;\r\n}\r\n\r\n/** The shorthand keys, in the order they are copied onto a built descriptor. */\r\nconst MATERIAL_PROP_KEYS = [\r\n \"opacity\", \"roughness\", \"metalness\",\r\n \"emission\", \"emissionStrength\", \"normalMap\", \"roughnessMap\",\r\n \"metalnessMap\", \"aoMap\", \"alphaMap\", \"envMapIntensity\", \"wireframe\",\r\n \"shading\", \"faces\", \"vertexColors\", \"blend\",\r\n] as const;\r\n\r\n/**\r\n * A drawable 3D object — geometry plus a material.\r\n *\r\n * The 3D counterpart of {@link ShapeNode}: it owns the material vocabulary, and\r\n * the geometry sugar nodes ({@link Box3D}, {@link Sphere3D}, …) subclass it to\r\n * supply a geometry from their own props.\r\n *\r\n * <Mesh3D geometry={Geo.torusKnot({ radius: 1.2 })} fill=\"tomato\" roughness={0.2} />\r\n * <Box3D fill={[\"#1a1a2e\", Fills.linearGradient([\"#e0533d\", \"#8b5cf6\"])]} />\r\n *\r\n * Every material key is a prop, so `mesh().to({ data: { roughness: 1, fill: \"cyan\" }, duration: 1 })`\r\n * animates in place — three writes the values onto the live material rather than\r\n * recompiling. Geometry *parameters* are the exception: three geometries are\r\n * immutable, so tweening a `radius` reallocates the mesh every frame. Tween\r\n * `scale` (or `scaleX`/`scaleY`/`scaleZ`) instead.\r\n */\r\nexport class Mesh3D<P extends Mesh3DProps = Mesh3DProps> extends Node3D<P> {\r\n @property({ default: undefined }) declare geometry: Geometry3D;\r\n @property({ default: undefined }) declare material: Material3D | readonly Material3D[] | undefined;\r\n\r\n @property({ default: \"white\", tween: lerpFill3D }) declare fill: Fill3D;\r\n @property({ default: undefined }) declare opacity: number | undefined;\r\n @property({ default: undefined }) declare roughness: number | undefined;\r\n @property({ default: undefined }) declare metalness: number | undefined;\r\n @colorProperty({ default: undefined }) declare emission: Color | undefined;\r\n @property({ default: undefined }) declare emissionStrength: number | undefined;\r\n @property({ default: undefined }) declare normalMap: Texture3D | undefined;\r\n @property({ default: undefined }) declare roughnessMap: Texture3D | undefined;\r\n @property({ default: undefined }) declare metalnessMap: Texture3D | undefined;\r\n @property({ default: undefined }) declare aoMap: Texture3D | undefined;\r\n @property({ default: undefined }) declare alphaMap: Texture3D | undefined;\r\n @property({ default: undefined }) declare envMapIntensity: number | undefined;\r\n @property({ default: undefined }) declare wireframe: boolean | undefined;\r\n @property({ default: undefined }) declare shading: Shading3D | undefined;\r\n @property({ default: undefined }) declare faces: Faces3D | undefined;\r\n @property({ default: undefined }) declare vertexColors: boolean | undefined;\r\n @property({ default: undefined }) declare blend: Blend3D | undefined;\r\n @property({ default: false }) declare unlit: boolean;\r\n\r\n /**\r\n * The geometry this node draws.\r\n *\r\n * Overridden by each sugar subclass to build one from its own props; the base\r\n * returns the `geometry` prop, so `<Mesh3D geometry={Geo.lathe(...)} />` works\r\n * for anything the sugar doesn't cover.\r\n */\r\n protected buildGeometry(): Geometry3D | undefined {\r\n return this.geometry;\r\n }\r\n\r\n /**\r\n * The material shorthand, gathered off the props that were actually set.\r\n *\r\n * `undefined` defaults are deliberate: an omitted key must stay absent from\r\n * the descriptor so `Graphics3D` picks the renderer's own default, rather than\r\n * being pinned to a value this node invented.\r\n */\r\n protected materialShorthand(): MaterialShorthand3D {\r\n const out: Record<string, unknown> = {};\r\n const material = this.material;\r\n if (material !== undefined) out.material = material;\r\n if (this.fill !== undefined) out.fill = this.fill;\r\n for (const key of MATERIAL_PROP_KEYS) {\r\n const value = (this as unknown as Record<string, unknown>)[key];\r\n if (value !== undefined) out[key] = value;\r\n }\r\n if (this.unlit) out.unlit = true;\r\n return out as MaterialShorthand3D;\r\n }\r\n\r\n /**\r\n * What this node draws this frame.\r\n *\r\n * The single seam both the real render and the asset-declaration pass go\r\n * through — the same discipline as `Rect.shapeGraphics()` — so the textures\r\n * that get loaded can never drift from the ones that get drawn.\r\n */\r\n protected buildGraphics3D(): Graphics3D {\r\n const g3 = new Graphics3D();\r\n const geometry = this.buildGeometry();\r\n if (geometry) g3.mesh(geometry, resolveMaterialShorthand3D(this.materialShorthand()));\r\n return g3;\r\n }\r\n\r\n protected override renderSelf(ctx: RenderContext3D): void {\r\n ctx.draw(this.buildGraphics3D());\r\n }\r\n}\r\n\r\n"]}
|