@motionscript/core 0.1.0-alpha.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +20 -5
- 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-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/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/manifest.json +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.d.ts.map +1 -1
- package/dist/components/factory/views.js +41 -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.d.ts +3 -4
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +13 -10
- 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.d.ts +8 -0
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +17 -0
- 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.d.ts +6 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +18 -1
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +26 -6
- 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.d.ts +5 -0
- 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/index.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/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 +0 -13
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
- package/dist/browser/chunks/chunk-GKM6UZJR.js +0 -6
- 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 +0 -3
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orbit.js","sourceRoot":"","sources":["../../../src/attributes/render3d/orbit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,UAAU,GAGX,MAAM,sCAAsC,CAAA;AAG7C,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,KAAY;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAC9D,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,WAAW,CACzB,IAAqB,EACrB,EAAmB,EACnB,CAAS;IAET,OAAO;QACL,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;KAChC,CAAA;AACH,CAAC;AAED,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC5D,IAAI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AAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAS;IACjE,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAA;IACxC,MAAM,YAAY,GAAG,SAAS,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAA;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAA;IACpD,OAAO;QACL,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,UAAU;QAClC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,QAAQ;QACpC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,UAAU;KACnC,CAAA;AACH,CAAC;AAuBD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,MAAmB;IAC1C,MAAM,KAAK,GAA2B,EAAE,CAAA;IACxC,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;IAC1D,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;QAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAA;IACtE,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;IACvD,OAAO,KAAK,CAAA;AAChB,CAAC","sourcesContent":["/**\n * The vocabulary of an orbit camera, and the lerps a 3D component tweens with.\n *\n * Unrelated node types are flown by one — a globe, a surface plot — and they\n * are unrelated on purpose: what they share is a camera, not a subject. So this\n * belongs to none of them, and a package per subject would either duplicate it\n * or make one depend on another.\n */\nimport {\n parseColor,\n type Color,\n type NormalizedColor,\n} from \"@/attributes/shape/fill/color/parser\"\nimport type { Vector3 } from \"@/render3d/vector3\"\n\n// --- Colour ----------------------------------------------------------------\n\n/**\n * Mapper: any {@link Color} → a normalized RGBA tuple.\n *\n * Resolving at *write* time rather than at draw time is the point. A tuple can\n * be interpolated channel by channel; `\"#3B82F6\"` cannot, and re-parsing a\n * string per frame would be wasted work besides. The tuple is still a valid\n * `Color`, so it goes straight back to `Graphics3D` with no conversion.\n */\nexport function resolveColor3D(value: Color): NormalizedColor {\n return typeof value === \"string\" ? parseColor(value) : value\n}\n\n/** Tween: per-channel interpolation of two resolved colours. */\nexport function lerpColor3D(\n from: NormalizedColor,\n to: NormalizedColor,\n t: number\n): NormalizedColor {\n return [\n from[0] + (to[0] - from[0]) * t,\n from[1] + (to[1] - from[1]) * t,\n from[2] + (to[2] - from[2]) * t,\n from[3] + (to[3] - from[3]) * t,\n ]\n}\n\n// --- Numbers ---------------------------------------------------------------\n\n/**\n * Interpolates two numbers, tolerating non-finite endpoints.\n *\n * A resolved options bag can legitimately hold `Infinity` (an unset `maxZoom`\n * means \"no ceiling\"), and the plain form would produce `NaN` from\n * `Infinity + (Infinity - Infinity) * t`. Non-finite endpoints hold `from` and\n * switch at the end instead.\n */\nexport function lerpFinite(from: number, to: number, t: number): number {\n if (!Number.isFinite(from) || !Number.isFinite(to)) return t < 1 ? from : to\n return from + (to - from) * t\n}\n\n/**\n * Interpolates a value that indexes geometry — a segment or division count.\n * Rounded, because a fractional count is meaningless to the loops that consume\n * it.\n */\nexport function lerpCount(from: number, to: number, t: number): number {\n return Math.round(from + (to - from) * t)\n}\n\n/**\n * Tweens a value that has no in-between — a flag, a representation, a colour\n * scheme — by holding `from` until the tween lands.\n *\n * There is no halfway point between a wireframe and a solid surface, and a\n * mid-tween flip reads as a glitch rather than a transition, so the switch\n * happens once at the end. Snapping at the *midpoint* would be worse still: the\n * change would land while the command was still running, so a `to` would appear\n * to finish early.\n */\nexport function snapValue<T>(from: T, to: T, t: number): T {\n return t < 1 ? from : to\n}\n\n/** {@link snapValue}, narrowed to a boolean where that is all a caller has. */\nexport const snapFlag: (from: boolean, to: boolean, t: number) => boolean =\n snapValue\n\n// --- Camera ----------------------------------------------------------------\n\n/** A camera placement in spherical terms — what `orbit`/`elevation`/`zoom` hold. */\nexport interface Orbit {\n /** Angle about the vertical axis, in **degrees**. */\n orbit: number\n /** Angle above the ground plane, in **degrees**. 0 is edge-on, 90 straight down. */\n elevation: number\n /** Distance from the target. */\n distance: number\n}\n\n/**\n * A stored `orbit` in the camera's own terms.\n *\n * The engine's camera takes `orbit`/`elevation`/`distance` directly now,\n * which is what these nodes always wanted — but the two conventions disagree\n * about zero: a stored `orbit` here is measured from **+X**, and the camera\n * measures from **+Z** (head-on). A quarter turn separates them.\n *\n * Converting at this one seam is what keeps every document that already holds an\n * `orbit` value framed exactly as it was. Redefining the stored field instead\n * would silently rotate every saved 3D scene by ninety degrees, which is not a\n * change a scene can notice or a reader can debug.\n */\nexport function cameraOrbit(orbit: number): number {\n return 90 - orbit\n}\n\n/**\n * The Cartesian position for a spherical camera placement.\n *\n * Spherical is the useful parameterisation for a timeline: each of the three\n * numbers is independently tweenable and means something an author can reason\n * about, whereas tweening a raw `[x, y, z]` couples \"spin\" and \"pull back\"\n * together and cuts a chord through the sphere on the way.\n *\n * The **camera** no longer goes through this: it takes the three numbers itself\n * (see {@link cameraOrbit}), so converting to a position and back was one more\n * place for the two conventions to drift. What is left is placing something\n * *else* spherically — a light on an arc, a marker ring.\n */\nexport function orbitPosition({ orbit, elevation, distance }: Orbit): Vector3 {\n const orbitRad = orbit * (Math.PI / 180)\n const elevationRad = elevation * (Math.PI / 180)\n const horizontal = Math.cos(elevationRad) * distance\n return {\n x: Math.cos(orbitRad) * horizontal,\n y: Math.sin(elevationRad) * distance,\n z: Math.sin(orbitRad) * horizontal,\n }\n}\n\n/**\n * A camera placement to move *to*, with every axis optional.\n *\n * The argument `orbitTo` takes, shared by every node that frames a 3D scene\n * spherically — a globe, a surface plot. One object rather than\n * three positional numbers because the common edit is one axis: \"pull back\" and\n * \"spin round\" are separate intentions, and a positional form would make each\n * of them restate the two it does not mean.\n *\n * `zoom` rather than {@link Orbit}'s `distance`, because that is what these\n * nodes call the prop.\n */\nexport interface OrbitTarget {\n /** Angle about the vertical axis, in degrees. */\n orbit?: number\n /** Angle above the ground plane, in degrees. */\n elevation?: number\n /** Distance from the target. */\n zoom?: number\n}\n\n/**\n * `target` as props to write, with the axes it does not name left out.\n *\n * Omitted rather than passed as `undefined`: a tween reads its `from` off the\n * node when the command is built, and handing it an explicit `undefined`\n * destination would interpolate towards `NaN` rather than leaving the axis\n * alone.\n */\nexport function orbitProps(target: OrbitTarget): Record<string, number> {\n const props: Record<string, number> = {}\n if (target.orbit !== undefined) props.orbit = target.orbit\n if (target.elevation !== undefined) props.elevation = target.elevation\n if (target.zoom !== undefined) props.zoom = target.zoom\n return props\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corner-radius.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-radius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAyB,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAajG;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC5C,6EAA6E;IAC7E,qEAAqE;IACrE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,KAA6B,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;IACnI,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC;IAC3D,cAAc,EAAE,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ;IACrE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC7C,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC;CACtH,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\
|
|
1
|
+
{"version":3,"file":"corner-radius.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-radius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAyB,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAajG;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC5C,6EAA6E;IAC7E,qEAAqE;IACrE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,KAA6B,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;IACnI,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC;IAC3D,cAAc,EAAE,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ;IACrE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC7C,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC;CACtH,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { CornerRadiusOps } from \"@/attributes/shared/operators\";\nimport { Corners, CornersInput, resolveCorners, lerpCorners, isUniformCorners } from \"./corners\";\n\n/** Per-corner border radius values, all fully resolved to numbers. */\nexport type CornerRadiusResolved = Corners<number>;\n\n/**\n * Accepted corner radius input for a Rect: a single number applies uniformly to\n * all corners; an object overrides corners individually (`{ topLeft, … }`) or by\n * axis (`{ top, bottom }` / `{ left, right }`). An already-resolved value passes\n * through. Unspecified corners fall back to a previous value or 0 when resolved.\n */\nexport type RectCornerRadius = CornersInput<number> | CornerRadiusResolved;\n\n/**\n * The corner-radius attribute's op set: `resolve`/`lerp` for `Shapes.corners`,\n * plus the uniform/zero checks a renderer needs to pick a cheap draw path.\n */\nexport const cornerRadiusOps: CornerRadiusOps = {\n // A resolved value is structurally a full per-corner `CornersInput<number>`,\n // so pin T=number and let resolveCorners re-resolve it idempotently.\n resolve: (value, previous) => resolveCorners(value as CornersInput<number>, 0, previous, (v): v is number => typeof v === \"number\"),\n lerp: (from, to, t) => lerpCorners(from, to, t, lerpNumber),\n isUniformInput: (value): value is number => typeof value === \"number\",\n isUniform: (value) => isUniformCorners(value),\n isZero: (value) => value.topLeft === 0 && value.topRight === 0 && value.bottomLeft === 0 && value.bottomRight === 0,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corner-style.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAqBjG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GACmC;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,KAAkC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,QAAQ,CAAC;IACjK,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,cAAc,EAAE,CAAC,KAAK,EAAwB,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ;IAC1F,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;CAChD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA8B,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { LerpFunction } from \"@/tween/lerp\";\
|
|
1
|
+
{"version":3,"file":"corner-style.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAqBjG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GACmC;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,KAAkC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,QAAQ,CAAC;IACjK,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,cAAc,EAAE,CAAC,KAAK,EAAwB,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ;IAC1F,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;CAChD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA8B,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { LerpFunction } from \"@/tween/lerp\";\nimport type { AttributeOps, HasUniformCheck } from \"@/attributes/shared/operators\";\nimport { Corners, CornersInput, resolveCorners, lerpCorners, isUniformCorners } from \"./corners\";\n\n/**\n * How a single corner is shaped once it has a non-zero radius:\n * - `'rounded'` — a circular arc;\n * - `'angled'` — a straight diagonal chamfer cut across the corner.\n */\nexport type CornerStyle = \"rounded\" | \"angled\";\n\n/** Per-corner resolved styles. */\nexport type CornerStyleResolved = Corners<CornerStyle>;\n\n/**\n * Accepted corner style input for a Rect: a single {@link CornerStyle} applies to\n * all corners; an object overrides corners individually (`{ topLeft, … }`) or by\n * axis (`{ top, bottom }` / `{ left, right }`). An already-resolved value passes\n * through. Unspecified corners fall back to a previous value or `'rounded'` when\n * resolved.\n */\nexport type RectCornerStyle = CornersInput<CornerStyle> | CornerStyleResolved;\n\n/**\n * The corner-style attribute's op set — no zero check, since style has no zero\n * value. \"Interpolating\" corner styles means snapping at the midpoint — corner\n * style is a discrete enum, so it switches at `t = 0.5` rather than blending,\n * matching the codebase's convention for discrete properties (see e.g. the\n * pixelate effect).\n */\nexport const cornerStyleOps: AttributeOps<RectCornerStyle, CornerStyleResolved>\n & HasUniformCheck<RectCornerStyle, CornerStyleResolved> = {\n resolve: (value, previous) => resolveCorners(value as CornersInput<CornerStyle>, \"rounded\", previous, (v): v is CornerStyle => v === \"rounded\" || v === \"angled\"),\n lerp: (from, to, t) => lerpCorners(from, to, t, (f, g) => (t < 0.5 ? f : g)),\n isUniformInput: (value): value is CornerStyle => value === \"rounded\" || value === \"angled\",\n isUniform: (value) => isUniformCorners(value),\n};\n\n/**\n * Scalar (single-value) corner style tween for shapes whose vertices don't map to\n * named corners — polygons and polygrams apply one style to every vertex, so they\n * use this instead of {@link cornerStyleOps}'s per-corner form.\n */\nexport const lerpCornerScalarStyle: LerpFunction<CornerStyle> = (from, to, t) => (t < 0.5 ? from : to);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corners.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corners.ts"],"names":[],"mappings":"AA+BA,SAAS,WAAW,CAAI,KAAQ;IAC5B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AACtF,CAAC;AAED,+EAA+E;AAC/E,4EAA4E;AAC5E,wDAAwD;AACxD,SAAS,aAAa,CAAI,CAA0B,EAAE,EAAc;IAChE,OAAO;QACH,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,OAAO;QAC5B,QAAQ,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,QAAQ;QAC9B,UAAU,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,UAAU;QACrC,WAAW,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,WAAW;KAC1C,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAAI,CAA0B,EAAE,EAAc;IAChE,OAAO;QACH,OAAO,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO;QAC7B,QAAQ,EAAE,CA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IACpD,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;AACrB,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CACvB,IAAgB,EAChB,EAAc,EACd,CAAS,EACT,IAAqB;IAErB,OAAO;QACH,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7C,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACnD,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;KACzD,CAAC;AACN,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,gBAAgB,CAAI,CAAa,EAAE,KAA8B,MAAM,CAAC,EAAE;IACtF,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;AACpG,CAAC","sourcesContent":["import { LerpFunction } from \"@/tween/lerp\";\
|
|
1
|
+
{"version":3,"file":"corners.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corners.ts"],"names":[],"mappings":"AA+BA,SAAS,WAAW,CAAI,KAAQ;IAC5B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AACtF,CAAC;AAED,+EAA+E;AAC/E,4EAA4E;AAC5E,wDAAwD;AACxD,SAAS,aAAa,CAAI,CAA0B,EAAE,EAAc;IACh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AAW,CAAC,CAAC;AACpG,CAAC","sourcesContent":["import { LerpFunction } from \"@/tween/lerp\";\n\n/** A value supplied independently for each of the four corners. */\nexport interface Corners<T> {\n topLeft: T;\n topRight: T;\n bottomLeft: T;\n bottomRight: T;\n}\n\n/**\n * The accepted input grammar for any per-corner property (radius, style),\n * generic over the corner value type `T`:\n *\n * - a single `T` applies uniformly to all four corners;\n * - `{ topLeft, … }` overrides individual corners (unspecified corners fall back\n * to a previous value or the type's default when resolved);\n * - `{ top, bottom }` sets the top pair (`topLeft`, `topRight`) and/or the bottom\n * pair (`bottomLeft`, `bottomRight`);\n * - `{ left, right }` sets the left pair (`topLeft`, `bottomLeft`) and/or the\n * right pair (`topRight`, `bottomRight`).\n */\nexport type CornersInput<T> =\n | T\n | Partial<Corners<T>>\n | { top?: T; bottom?: T }\n | { left?: T; right?: T };\n\n/** Narrows a {@link CornersInput} to its scalar form. */\nexport type CornerScalarGuard<T> = (value: CornersInput<T>) => value is T;\n\nfunction makeUniform<T>(value: T): Corners<T> {\n return { topLeft: value, topRight: value, bottomLeft: value, bottomRight: value };\n}\n\n// The {top,bottom} / {left,right} axis shorthands map to corners as documented\n// on CornersInput. Centralised here so the mapping is a single, test-pinned\n// chokepoint rather than scattered across the resolver.\nfunction fromTopBottom<T>(v: { top?: T; bottom?: T }, fb: Corners<T>): Corners<T> {\n return {\n topLeft: v.top ?? fb.topLeft,\n topRight: v.top ?? fb.topRight,\n bottomLeft: v.bottom ?? fb.bottomLeft,\n bottomRight: v.bottom ?? fb.bottomRight,\n };\n}\n\nfunction fromLeftRight<T>(v: { left?: T; right?: T }, fb: Corners<T>): Corners<T> {\n return {\n topLeft: v.left ?? fb.topLeft,\n topRight: v.right ?? fb.topRight,\n bottomLeft: v.left ?? fb.bottomLeft,\n bottomRight: v.right ?? fb.bottomRight,\n };\n}\n\n/**\n * Resolves a {@link CornersInput} into a fully-specified {@link Corners}.\n *\n * Precedence per corner mirrors the rest of the codebase's mappers:\n * supplied value → `previous` → `fallback`. `isScalar` discriminates the scalar\n * form from the object forms (e.g. `typeof v === \"number\"` for radius, or a\n * string-literal check for style).\n */\nexport function resolveCorners<T>(\n value: CornersInput<T>,\n fallback: T,\n previous: Corners<T> | undefined,\n isScalar: CornerScalarGuard<T>,\n): Corners<T> {\n if (isScalar(value)) {\n return makeUniform(value);\n }\n\n const fb: Corners<T> = previous ?? makeUniform(fallback);\n const obj = value as Record<string, T | undefined>;\n\n // Per-corner keys take precedence over the axis shorthands when mixed, so\n // the more specific form wins.\n if (\"topLeft\" in obj || \"topRight\" in obj || \"bottomLeft\" in obj || \"bottomRight\" in obj) {\n const v = value as Partial<Corners<T>>;\n return {\n topLeft: v.topLeft ?? fb.topLeft,\n topRight: v.topRight ?? fb.topRight,\n bottomLeft: v.bottomLeft ?? fb.bottomLeft,\n bottomRight: v.bottomRight ?? fb.bottomRight,\n };\n }\n if (\"top\" in obj || \"bottom\" in obj) {\n return fromTopBottom(value as { top?: T; bottom?: T }, fb);\n }\n if (\"left\" in obj || \"right\" in obj) {\n return fromLeftRight(value as { left?: T; right?: T }, fb);\n }\n // Empty object: keep the fallback for every corner.\n return { ...fb };\n}\n\n/** Interpolates each corner independently with the supplied per-value lerp. */\nexport function lerpCorners<T>(\n from: Corners<T>,\n to: Corners<T>,\n t: number,\n lerp: LerpFunction<T>,\n): Corners<T> {\n return {\n topLeft: lerp(from.topLeft, to.topLeft, t),\n topRight: lerp(from.topRight, to.topRight, t),\n bottomLeft: lerp(from.bottomLeft, to.bottomLeft, t),\n bottomRight: lerp(from.bottomRight, to.bottomRight, t),\n };\n}\n\n/** Returns true when all four corners are equal (under `eq`, default `Object.is`). */\nexport function isUniformCorners<T>(c: Corners<T>, eq: (a: T, b: T) => boolean = Object.is): boolean {\n return eq(c.topLeft, c.topRight) && eq(c.topLeft, c.bottomLeft) && eq(c.topLeft, c.bottomRight);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/index.ts"],"names":[],"mappings":"AACA,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG3F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export type { Corners, CornersInput } from \"./corners\";\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/index.ts"],"names":[],"mappings":"AACA,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG3F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export type { Corners, CornersInput } from \"./corners\";\n/** @internal */ export { resolveCorners, lerpCorners, isUniformCorners } from \"./corners\";\n\nexport type { CornerRadiusResolved, RectCornerRadius } from \"./corner-radius\";\nexport { cornerRadiusOps } from \"./corner-radius\";\n\nexport type { CornerStyle, CornerStyleResolved, RectCornerStyle } from \"./corner-style\";\nexport { cornerStyleOps } from \"./corner-style\";\n\n/** @internal */ export { lerpCornerScalarStyle } from \"./corner-style\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/backdrop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAkB,EAAW,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,IAAI,GAAiB,EAAE,CAAC;AAE9B,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAqB,EAAgB,EAAE,CACnE,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAqB;IACzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;AACzF,CAAC","sourcesContent":["import type { NodeEffect } from \"./union\";\
|
|
1
|
+
{"version":3,"file":"backdrop.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/backdrop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAkB,EAAW,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,IAAI,GAAiB,EAAE,CAAC;AAE9B,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAqB,EAAgB,EAAE,CACnE,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAqB;IACzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;AACzF,CAAC","sourcesContent":["import type { NodeEffect } from \"./union\";\nimport { effectSurface } from \"./registry\";\n\n/**\n * Backdrop/foreground classification for effects.\n *\n * Every effect carries a uniform {@link EffectMode} via {@link ModedEffect}, so\n * classification is a single field read — no branching on `effect.type`. An\n * effect with `mode === \"backdrop\"` runs on the content painted *beneath* the\n * node (clipped to its silhouette); anything else is a foreground effect over\n * the node's own content.\n */\n\n/** Does this effect target the backdrop beneath the node rather than its own content? */\nexport const isBackdropEffect = (effect: NodeEffect): boolean => effect.mode === \"backdrop\";\n\n/**\n * Shared result for the overwhelmingly common \"this node has no effects\" case.\n *\n * Both classifiers below run once per node per frame during render, and `.filter`\n * allocates a fresh array even when there is nothing to filter. On a scene with\n * thousands of plain shapes that is thousands of throwaway arrays per frame, for\n * an answer that is always the same empty list.\n */\nconst NONE: NodeEffect[] = [];\n\n/** The backdrop-targeting effects in `effects`, for the renderer's backdrop pass. */\nexport const backdropEffects = (effects: NodeEffect[]): NodeEffect[] =>\n effects.length === 0 ? NONE : effects.filter(isBackdropEffect);\n\n/**\n * Foreground effects that warp/band the node's *own* content and therefore need\n * a snapshot-and-redraw scope rather than a composable image filter.\n *\n * Driven by each effect's declared {@link EffectSurface}, so adding a shader\n * effect needs no edit here. Author chain order is preserved: index 0 is the\n * outermost scope, and the renderer nests the rest inside it.\n */\nexport function foregroundShaderEffects(effects: NodeEffect[]): NodeEffect[] {\n if (effects.length === 0) return NONE;\n return effects.filter((e) => e.mode !== \"backdrop\" && effectSurface(e) === \"shader\");\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../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,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACT,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\r\nimport type { BlendMode } from \"../fill/blend\";\r\nimport type { EffectOptions } from \"./effect-data\";\r\nimport { scalarOptions, withEffectOptions } from \"./effect-data\";\r\nimport { resolveEffect, lerpEffect } from \"./registry\";\r\nimport { buildEffect, type EffectOptionsOf } from \"./spec\";\r\nimport { blurSpec } from \"./implementations/blur\";\r\nimport { directionalBlurSpec } from \"./implementations/directional-blur\";\r\nimport { grayscaleSpec } from \"./implementations/grayscale\";\r\nimport { pixelateSpec } from \"./implementations/pixelate\";\r\nimport { bulgeSpec } from \"./implementations/bulge\";\r\nimport { magnifySpec } from \"./implementations/magnify\";\r\nimport { bloomSpec } from \"./implementations/bloom\";\r\nimport { vintageSpec } from \"./implementations/vintage\";\r\nimport { chromaticAberrationSpec } from \"./implementations/chromatic-aberration\";\r\nimport { invertSpec } from \"./implementations/invert\";\r\nimport { scatterSpec } from \"./implementations/scatter\";\r\nimport { posterizeSpec } from \"./implementations/posterize\";\r\nimport { motionBlurSpec } from \"./implementations/motion-blur\";\r\nimport { outlineSpec } from \"./implementations/outline\";\r\nimport { dropShadowSpec } from \"./implementations/drop-shadow\";\r\nimport { vignetteSpec } from \"./implementations/vignette\";\r\nimport { lutSpec } from \"./implementations/lut\";\r\nimport { grainSpec } from \"./implementations/grain\";\r\nimport { sharpenSpec } from \"./implementations/sharpen\";\r\nimport { edgesSpec } from \"./implementations/edges\";\r\nimport { thresholdSpec } from \"./implementations/threshold\";\r\nimport { radialBlurSpec } from \"./implementations/radial-blur\";\r\nimport { halftoneSpec } from \"./implementations/halftone\";\r\nimport { ditherSpec } from \"./implementations/dither\";\r\nimport { duotoneSpec } from \"./implementations/duotone\";\r\nimport { curvesSpec } from \"./implementations/curves\";\r\nimport { rgbShiftSpec } from \"./implementations/rgb-shift\";\r\nimport { scanlinesSpec } from \"./implementations/scanlines\";\r\nimport { blockDisplaceSpec } from \"./implementations/block-displace\";\r\nimport { bitCrushSpec } from \"./implementations/bit-crush\";\r\nimport { asciiSpec } from \"./implementations/ascii\";\r\nimport { oilPaintSpec } from \"./implementations/oil-paint\";\r\nimport { streakSpec } from \"./implementations/streak\";\r\nimport { glowSpec } from \"./implementations/glow\";\r\nimport { waveSpec } from \"./implementations/wave\";\r\nimport { twirlSpec } from \"./implementations/twirl\";\r\nimport { progressiveBlurSpec } from \"./implementations/progressive-blur\";\r\nimport { kaleidoscopeSpec } from \"./implementations/kaleidoscope\";\r\nimport { glassSpec } from \"./implementations/glass\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\nimport { normalizeUniforms, type ShaderUniform, type ShaderUniformRecord } from \"../shaders/uniforms\";\r\nimport { resolveShaderProperties, type ShaderPropertyValues } from \"../shaders/resolve\";\r\nimport type { EffectShader } from \"../shaders/pack\";\r\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\r\n\r\n/**\r\n * Every effect builder takes **exactly one argument**: an options object\r\n * carrying all of that effect's data. Builders with one dominant animated\r\n * scalar also accept that scalar directly, so the common case stays terse:\r\n *\r\n * Effects.blur(8)\r\n * Effects.blur({ radius: 8, mode: 'backdrop' })\r\n *\r\n * Field names are shared vocabulary across every effect — `radius` is always a\r\n * pixel distance, `amount` always a 0–1 intensity, `angle` always degrees,\r\n * `center` always a 0–1 normalised point, `axis` always an {@link EffectAxis}.\r\n */\r\n\r\n/** Gaussian blur. Scalar shorthand sets `radius`. */\r\nexport type BlurOptions = EffectOptionsOf<typeof blurSpec.params>;\r\n\r\n/** Directional (linear) blur. Scalar shorthand sets `radius`. */\r\nexport type DirectionalBlurOptions = EffectOptionsOf<typeof directionalBlurSpec.params>;\r\n\r\n/** Desaturation. Scalar shorthand sets `amount`. */\r\nexport type GrayscaleOptions = EffectOptionsOf<typeof grayscaleSpec.params>;\r\n\r\n/**\r\n * After Effects-style Mosaic. Scalar shorthand sets `blocks` on both axes.\r\n *\r\n * `blocks` is the *number of blocks* across the node, so a count equal to the\r\n * node's pixel size on that axis is pristine and lower counts are coarser.\r\n */\r\nexport type PixelateOptions = EffectOptionsOf<typeof pixelateSpec.params>;\r\n\r\n/** Bulge / pinch lens over the node's content, or the backdrop. Scalar shorthand sets `strength`. */\r\nexport type BulgeOptions = EffectOptionsOf<typeof bulgeSpec.params>;\r\n\r\n/** Magnifier lens over the backdrop. Scalar shorthand sets `scale`. */\r\nexport type MagnifyOptions = EffectOptionsOf<typeof magnifySpec.params>;\r\n\r\n/** Bloom (glow). Scalar shorthand sets `intensity`. */\r\nexport type BloomOptions = EffectOptionsOf<typeof bloomSpec.params>;\r\n\r\n/** Vintage / film-look colour grading. Scalar shorthand sets `amount`. */\r\nexport type VintageOptions = EffectOptionsOf<typeof vintageSpec.params>;\r\n\r\n/** Lens-dispersion colour fringing. Scalar shorthand sets `amount`. */\r\nexport type ChromaticAberrationOptions = EffectOptionsOf<typeof chromaticAberrationSpec.params>;\r\n\r\n/** Colour invert. Scalar shorthand sets `strength`. */\r\nexport type InvertOptions = EffectOptionsOf<typeof invertSpec.params>;\r\n\r\n/** Per-pixel random jitter. Scalar shorthand sets `strength`. */\r\nexport type ScatterOptions = EffectOptionsOf<typeof scatterSpec.params>;\r\n\r\n/** Colour banding. Scalar shorthand sets `levels`. */\r\nexport type PosterizeOptions = EffectOptionsOf<typeof posterizeSpec.params>;\r\n\r\n/** Velocity-driven motion blur. Scalar shorthand sets `length`. */\r\nexport type MotionBlurOptions = EffectOptionsOf<typeof motionBlurSpec.params>;\r\n\r\n/**\r\n * A custom shader. `mode` selects the path:\r\n *\r\n * - `'foreground'` (the default) — `sample_src` reads the node's layer; the output\r\n * replaces it, or composites onto it with `blendMode`.\r\n * - `'backdrop'` — `sample_src` reads a snapshot of what is painted beneath the\r\n * node. `blendMode` is unused.\r\n */\r\nexport interface ShaderEffectOptions extends EffectOptions {\r\n /**\r\n * The WGSL program, or a registered\r\n * **shader pack** — a program plus the editable values it publishes.\r\n *\r\n * A pack resolves to plain uniforms here, so nothing below this builder\r\n * knows one exists; what survives into the document is the resolved record\r\n * plus a `shaderId` naming the pack, which is what lets a host reopen its\r\n * property panel from a saved scene.\r\n */\r\n source: string | EffectShader;\r\n /**\r\n * Property overrides, by property id, when {@link source} is a pack.\r\n *\r\n * Anything not named here takes the pack's own default. Ignored — with a\r\n * warning — for a bare source string, which has no properties to override.\r\n */\r\n values?: ShaderPropertyValues;\r\n /**\r\n * Uniform values by name — lerped between animation frames (default `{}`).\r\n *\r\n * The positional `[{ name, value }]` array still works; both are bound by\r\n * name now, so the array's order no longer means anything.\r\n */\r\n uniforms?: ShaderUniformRecord | ShaderUniform[];\r\n /** How a foreground shader composites onto the layer; its output replaces the layer when absent. */\r\n blendMode?: BlendMode;\r\n /** How far past the node's box (logical px) a WGSL effect may draw. Default 0. */\r\n reach?: number;\r\n}\r\n\r\n/** Coloured band around the node's silhouette. Scalar shorthand sets `width`. */\r\nexport type OutlineOptions = EffectOptionsOf<typeof outlineSpec.params>;\r\n\r\n/**\r\n * A shadow cast from the node's silhouette. Scalar shorthand sets `blur`, since\r\n * softness is the knob a shadow is usually reached for by.\r\n */\r\nexport type DropShadowOptions = EffectOptionsOf<typeof dropShadowSpec.params>;\r\n\r\n/** Darkened edges / lens falloff. Scalar shorthand sets `amount`. */\r\nexport type VignetteOptions = EffectOptionsOf<typeof vignetteSpec.params>;\r\n\r\n/** Film grain. Scalar shorthand sets `amount`. */\r\n/**\r\n * A 3D colour lookup table — see {@link LutEffect} for the table's layout and\r\n * why it is compared by reference.\r\n *\r\n * No scalar shorthand: the dominant argument is a whole cube, and a builder that\r\n * took `Effects.lut(table)` would still need the size beside it to read it.\r\n */\r\nexport type LutOptions = EffectOptionsOf<typeof lutSpec.params>;\r\n\r\nexport type GrainOptions = EffectOptionsOf<typeof grainSpec.params>;\r\n\r\n/** Unsharp-mask sharpen. Scalar shorthand sets `amount`. */\r\nexport type SharpenOptions = EffectOptionsOf<typeof sharpenSpec.params>;\r\n\r\n/** Edge detection. Scalar shorthand sets `strength`. */\r\nexport type EdgesOptions = EffectOptionsOf<typeof edgesSpec.params>;\r\n\r\n/** Two-tone luminance cut. Scalar shorthand sets `level`. */\r\nexport type ThresholdOptions = EffectOptionsOf<typeof thresholdSpec.params>;\r\n\r\n/** Zoom / spin blur about a point. Scalar shorthand sets `amount`. */\r\nexport type RadialBlurOptions = EffectOptionsOf<typeof radialBlurSpec.params>;\r\n\r\n/** Halftone print screen. Scalar shorthand sets `size`. */\r\nexport type HalftoneOptions = EffectOptionsOf<typeof halftoneSpec.params>;\r\n\r\n/** Ordered (Bayer) dithering. Scalar shorthand sets `levels`. */\r\nexport type DitherOptions = EffectOptionsOf<typeof ditherSpec.params>;\r\n\r\n/** Two-colour luminance ramp. Scalar shorthand sets `amount`. */\r\nexport type DuotoneOptions = EffectOptionsOf<typeof duotoneSpec.params>;\r\n\r\n/** Tone curve through control points. */\r\nexport type CurvesOptions = EffectOptionsOf<typeof curvesSpec.params>;\r\n\r\n/** Photographic grading. Every field is optional and defaults to neutral. */\r\nexport type ColorAdjustmentOptions = Omit<ColorAdjustmentEffect, 'type'> & EffectOptions;\r\n\r\n/**\r\n * Per-channel RGB offset. Scalar shorthand sets `amount`, which spreads red and\r\n * blue apart horizontally by that many pixels and leaves green put — the\r\n * everyday case. Name `red`/`green`/`blue` for full control.\r\n */\r\nexport type RgbShiftOptions = EffectOptionsOf<typeof rgbShiftSpec.params> & {\r\n /** Shorthand: ±px horizontal spread of red vs. blue (default 4); `red`/`blue` override it. */\r\n amount?: number;\r\n};\r\n\r\n/** CRT scanlines. Scalar shorthand sets `darkness`. */\r\nexport type ScanlinesOptions = EffectOptionsOf<typeof scanlinesSpec.params>;\r\n\r\n/** Datamosh-style band tearing. Scalar shorthand sets `amount`. */\r\nexport type BlockDisplaceOptions = EffectOptionsOf<typeof blockDisplaceSpec.params>;\r\n\r\n/** ASCII art from a glyph grid. Scalar shorthand sets `size`. */\r\nexport type AsciiOptions = EffectOptionsOf<typeof asciiSpec.params>;\r\n\r\n/** Anamorphic glare — a bright pass smeared along one axis. Scalar shorthand sets `intensity`. */\r\nexport type StreakOptions = EffectOptionsOf<typeof streakSpec.params>;\r\n\r\n/**\r\n * A glow — bright (or opaque) areas spread outward and composited back, with\r\n * optional recolouring. Scalar shorthand sets `intensity`.\r\n *\r\n * Unlike `bloom`, this spreads past the node's own box, chooses how the source\r\n * composites against it, and can be coloured through a ramp.\r\n */\r\nexport type GlowOptions = EffectOptionsOf<typeof glowSpec.params>;\r\n\r\n/** Kuwahara brushwork. Scalar shorthand sets `radius`. */\r\nexport type OilPaintOptions = EffectOptionsOf<typeof oilPaintSpec.params>;\r\n\r\n/** Sine warp. Scalar shorthand sets `amplitude` on the Y axis — the everyday ripple. */\r\nexport type WaveOptions = EffectOptionsOf<typeof waveSpec.params>;\r\n\r\n/** Twirl / swirl vortex. Scalar shorthand sets `angle`. */\r\nexport type TwirlOptions = EffectOptionsOf<typeof twirlSpec.params>;\r\n\r\n/**\r\n * Blur that ramps across the node. Scalar shorthand sets `radius`.\r\n *\r\n * `mode: 'backdrop'` gives the frosted panel whose blur fades out rather than\r\n * ending at a hard edge.\r\n */\r\nexport type ProgressiveBlurOptions = EffectOptionsOf<typeof progressiveBlurSpec.params>;\r\n\r\n/** Mirrored wedges around a point. Scalar shorthand sets `segments`. */\r\nexport type KaleidoscopeOptions = EffectOptionsOf<typeof kaleidoscopeSpec.params>;\r\n\r\n/**\r\n * Figma's Glass over the backdrop. Scalar shorthand sets `refraction`.\r\n *\r\n * Figma's fields, units and defaults (light `-45°` at 80, refraction 80, depth\r\n * 20 px, dispersion 50, frost 4, splay 0), so a bare `Effects.glass()` is the\r\n * glass Figma adds and values copied from a Figma file render the same.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; there is nothing to refract in a node's\r\n * own paint, so the foreground is a no-op.\r\n */\r\nexport type GlassOptions = EffectOptionsOf<typeof glassSpec.params>;\r\n\r\n/** Colour-depth reduction. Scalar shorthand sets `bits`. */\r\nexport type BitCrushOptions = EffectOptionsOf<typeof bitCrushSpec.params>;\r\n\r\n/**\r\n * Immutable, chainable list of node effects.\r\n *\r\n * Each builder method returns a new `EffectChain` with the effect appended,\r\n * so chains are safe to share and branch.\r\n *\r\n * @example\r\n * const fx = Effects.blur(4).grayscale(0.5);\r\n * node.effects = fx; // assign directly\r\n * node.effects = [...fx, { type: 'pixelate', ... }]; // spread into array\r\n */\r\nexport class EffectChain {\r\n constructor(public list: NodeEffect[] = []) { }\r\n\r\n private append(effect: NodeEffect): EffectChain {\r\n return new EffectChain([...this.list, effect]);\r\n }\r\n\r\n /**\r\n * Append a Gaussian blur. Pass `{ mode: \"backdrop\" }` to blur the content\r\n * beneath the node (clipped to its silhouette, Figma-style) instead of the\r\n * node's own content.\r\n */\r\n blur(options: number | BlurOptions) {\r\n return this.append(buildEffect(blurSpec, options));\r\n }\r\n\r\n /**\r\n * Append a motion-blur-style directional (linear) blur, smearing the node's\r\n * own content along a single axis (or the backdrop, with `{ mode: \"backdrop\" }`).\r\n */\r\n directionalBlur(options: number | DirectionalBlurOptions) {\r\n return this.append(buildEffect(directionalBlurSpec, options));\r\n }\r\n\r\n /**\r\n * Append an After Effects-style Mosaic / pixelate. `blocks` is the *number of\r\n * blocks* across the node (a count equal to the node's pixel size on that\r\n * axis is pristine; lower is coarser), not a pixel block size.\r\n */\r\n pixelate(options: number | PixelateOptions) {\r\n return this.append(buildEffect(pixelateSpec, options));\r\n }\r\n\r\n /** Append a grayscale effect. `{ mode: \"backdrop\" }` desaturates the backdrop. */\r\n grayscale(options: number | GrayscaleOptions) {\r\n return this.append(buildEffect(grayscaleSpec, options));\r\n }\r\n\r\n /**\r\n * Append a bulge/pinch lens. A barrel distortion magnifies the centre and\r\n * pins the edges; a negative strength pinches the centre inward instead.\r\n * `mode: \"backdrop\"` points the same lens at what is painted beneath the\r\n * node, giving a glass dome over the layers below rather than a warp of the\r\n * node's own paint.\r\n */\r\n bulge(options: number | BulgeOptions) {\r\n return this.append(buildEffect(bulgeSpec, options));\r\n }\r\n\r\n /**\r\n * Append a magnify lens that magnifies the backdrop beneath the node. The lens\r\n * fills the node's bounding box and is clipped to its silhouette, so whatever\r\n * is painted underneath shows through scaled about `center` — like a\r\n * magnifying glass shaped to the node.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\r\n */\r\n magnify(options?: number | MagnifyOptions) {\r\n return this.append(buildEffect(magnifySpec, options));\r\n }\r\n\r\n /**\r\n * Append a bloom (glow) effect. Bright areas bleed soft light outward via a\r\n * screen-blend of the blurred bright-pass onto the layer.\r\n */\r\n bloom(options?: number | BloomOptions) {\r\n return this.append(buildEffect(bloomSpec, options));\r\n }\r\n\r\n /** Append a vintage / film-look colour grading effect. */\r\n vintage(options?: number | VintageOptions) {\r\n return this.append(buildEffect(vintageSpec, options));\r\n }\r\n\r\n /**\r\n * Append a chromatic aberration effect — red/blue colour fringing that mimics\r\n * lens dispersion.\r\n */\r\n chromaticAberration(options?: number | ChromaticAberrationOptions) {\r\n return this.append(buildEffect(chromaticAberrationSpec, options));\r\n }\r\n\r\n /** Append a colour-invert effect. */\r\n invert(options?: number | InvertOptions) {\r\n return this.append(buildEffect(invertSpec, options));\r\n }\r\n\r\n /**\r\n * Append a scatter effect — randomly jitters the node's own pixels, smearing\r\n * its content like After Effects' Scatter.\r\n */\r\n scatter(options?: number | ScatterOptions) {\r\n return this.append(buildEffect(scatterSpec, options));\r\n }\r\n\r\n /**\r\n * Append an After Effects-style posterize effect — quantizes each colour\r\n * channel into `levels` evenly-spaced bands, flattening gradients into steps.\r\n */\r\n posterize(options?: number | PosterizeOptions) {\r\n return this.append(buildEffect(posterizeSpec, options));\r\n }\r\n\r\n /**\r\n * Append velocity-driven motion blur — smears the node's own content along its\r\n * actual per-frame motion (a static node stays sharp). Modelled on After\r\n * Effects' shutter angle (`length`) and shutter phase (`alignment`).\r\n */\r\n motionBlur(options?: number | MotionBlurOptions) {\r\n return this.append(buildEffect(motionBlurSpec, options));\r\n }\r\n\r\n /**\r\n * Append an outline — a coloured band traced around the node's silhouette,\r\n * including alpha silhouettes (text, an image's cutout, a whole subtree) that\r\n * a geometry `stroke` can't follow.\r\n */\r\n outline(options?: number | OutlineOptions) {\r\n return this.append(buildEffect(outlineSpec, options));\r\n }\r\n\r\n /**\r\n * Append a drop shadow cast from the node's **silhouette** — including alpha\r\n * silhouettes (text, an image's cutout, a whole subtree) that a geometry\r\n * `shadow` can't follow, since that one fills the node's path.\r\n */\r\n dropShadow(options?: number | DropShadowOptions) {\r\n return this.append(buildEffect(dropShadowSpec, options));\r\n }\r\n\r\n /**\r\n * Append a vignette — a soft tint ramping in toward the node's corners. The\r\n * falloff follows the node's aspect ratio, so a wide node darkens along its\r\n * short edges the way a lens would.\r\n */\r\n vignette(options?: number | VignetteOptions) {\r\n return this.append(buildEffect(vignetteSpec, options));\r\n }\r\n\r\n /**\r\n * Append film grain. Static grain reads as texture rather than film, so pass\r\n * `{ animated: true }` to re-seed it each frame — or tween `seed` when the\r\n * render has to stay deterministic.\r\n */\r\n /**\r\n * Apply a 3D colour lookup table.\r\n *\r\n * The whole point of a LUT is that it is *someone else's* colour science, so\r\n * there is nothing to default beyond how much of it to use: `amount` is the\r\n * mix and everything else is the file.\r\n *\r\n * @example\r\n * Effects.lut({ table, size: 33 }) // the full look\r\n * Effects.lut({ table, size: 33, amount: 0.6 })\r\n */\r\n lut(options: LutOptions) {\r\n return this.append(buildEffect(lutSpec, options));\r\n }\r\n\r\n grain(options?: number | GrainOptions) {\r\n return this.append(buildEffect(grainSpec, options));\r\n }\r\n\r\n /** Append an unsharp-mask sharpen — local contrast boosted at `radius` scale. */\r\n sharpen(options?: number | SharpenOptions) {\r\n return this.append(buildEffect(sharpenSpec, options));\r\n }\r\n\r\n /**\r\n * Append edge detection — flat areas go black and boundaries light up with\r\n * the magnitude of the local gradient.\r\n */\r\n edges(options?: number | EdgesOptions) {\r\n return this.append(buildEffect(edgesSpec, options));\r\n }\r\n\r\n /**\r\n * Append a luminance threshold — a two-tone stencil cut at `level`, with\r\n * `smoothness` widening the cut into a ramp.\r\n */\r\n threshold(options?: number | ThresholdOptions) {\r\n return this.append(buildEffect(thresholdSpec, options));\r\n }\r\n\r\n /**\r\n * Append a radial blur — samples smeared along the radius (`'zoom'`, the\r\n * default) or the tangent (`'spin'`) about `center`, leaving the centre sharp.\r\n */\r\n radialBlur(options?: number | RadialBlurOptions) {\r\n return this.append(buildEffect(radialBlurSpec, options));\r\n }\r\n\r\n /**\r\n * Append a halftone screen — the newsprint look, where tone becomes the size\r\n * of a mark on a rotated grid.\r\n */\r\n halftone(options?: number | HalftoneOptions) {\r\n return this.append(buildEffect(halftoneSpec, options));\r\n }\r\n\r\n /**\r\n * Append ordered (Bayer) dithering — quantization to `levels` tones per\r\n * channel with the error traded for a retro crosshatch pattern.\r\n */\r\n dither(options?: number | DitherOptions) {\r\n return this.append(buildEffect(ditherSpec, options));\r\n }\r\n\r\n /**\r\n * Append a duotone / gradient map — the content's luminance remapped onto a\r\n * `shadows` → `highlights` ramp, discarding its original chroma.\r\n */\r\n duotone(options?: number | DuotoneOptions) {\r\n return this.append(buildEffect(duotoneSpec, options));\r\n }\r\n\r\n /**\r\n * Append a tone curve — the same adjustment `Adjustments.curves` applies to a\r\n * photo, on any node.\r\n */\r\n curves(options: CurvesOptions) {\r\n return this.append(buildEffect(curvesSpec, options));\r\n }\r\n\r\n /**\r\n * Append photographic grading (brightness / contrast / saturation / vibrance /\r\n * shadows / highlights / temperature / tint) — `Adjustments.colorAdjustment`\r\n * on any node. For darkened edges use {@link EffectChain.vignette}.\r\n */\r\n colorAdjustment(options: ColorAdjustmentOptions) {\r\n // Destructure `mode` out rather than spreading it through: a caller who\r\n // writes `{ mode: undefined }` would otherwise plant the key on the\r\n // effect, and `equals()` compares `mode` directly. `withEffectOptions`\r\n // skips undefined, so handing it back there is safe.\r\n const { mode, ...fields } = options;\r\n return this.append(withEffectOptions({ type: \"colorAdjustment\" as const, ...fields }, { mode }));\r\n }\r\n\r\n /**\r\n * Append a per-channel RGB offset — the digital cousin of\r\n * {@link EffectChain.chromaticAberration}, where each plane goes where you\r\n * point it instead of following a lens model.\r\n */\r\n rgbShift(options?: number | RgbShiftOptions) {\r\n const o = scalarOptions(options, \"amount\");\r\n const spread = o.amount;\r\n return this.append(buildEffect(rgbShiftSpec, spread === undefined ? o : {\r\n ...o,\r\n red: o.red ?? { x: spread, y: 0 },\r\n blue: o.blue ?? { x: -spread, y: 0 },\r\n }));\r\n }\r\n\r\n /**\r\n * Append CRT scanlines. Animate `offset` past `spacing` to roll the bands;\r\n * the pattern wraps, so a linear tween loops seamlessly.\r\n */\r\n scanlines(options?: number | ScanlinesOptions) {\r\n return this.append(buildEffect(scanlinesSpec, options));\r\n }\r\n\r\n /**\r\n * Append datamosh-style band tearing. Step `seed` in whole numbers to jump\r\n * between distinct glitch states rather than sliding between them.\r\n */\r\n blockDisplace(options?: number | BlockDisplaceOptions) {\r\n return this.append(buildEffect(blockDisplaceSpec, options));\r\n }\r\n\r\n /**\r\n * Append colour-depth reduction — `bits` per channel, or a fixed hardware\r\n * palette. Pair with {@link EffectChain.dither} so gradients survive the cut.\r\n */\r\n bitCrush(options?: number | BitCrushOptions) {\r\n return this.append(buildEffect(bitCrushSpec, options));\r\n }\r\n\r\n /**\r\n * Append ASCII art — the content divided into a grid of cells, each cell's\r\n * tone replaced by the glyph that carries a matching amount of ink.\r\n *\r\n * Set `background: 'transparent'` to lay the glyphs over whatever is behind\r\n * the node instead of over a solid field.\r\n */\r\n ascii(options?: number | AsciiOptions) {\r\n return this.append(buildEffect(asciiSpec, options));\r\n }\r\n\r\n /**\r\n * Append Kuwahara brushwork — averages within a region but never across an\r\n * edge, so flat areas smooth into strokes while boundaries stay crisp.\r\n * By some margin the most expensive effect in the set; keep `radius` small.\r\n */\r\n oilPaint(options?: number | OilPaintOptions) {\r\n return this.append(buildEffect(oilPaintSpec, options));\r\n }\r\n\r\n /**\r\n * Append an anamorphic streak — a bright pass smeared along one axis and\r\n * screened back on. {@link EffectChain.bloom} spreads light in every\r\n * direction; this spreads it in one.\r\n */\r\n streak(options?: number | StreakOptions) {\r\n return this.append(buildEffect(streakSpec, options));\r\n }\r\n\r\n /**\r\n * Append a glow — the bright (or opaque) parts of the layer spread outward\r\n * and composited back, optionally recoloured through a ramp.\r\n *\r\n * `bloom` is the cheaper relative: it screens a blurred bright-pass back\r\n * within the node's own box. This one spreads past that box, lets the source\r\n * sit behind, in front of, or nowhere at all, and can map glow strength onto\r\n * `colors`/`stops` — which is what a heat, neon or aurora look needs.\r\n */\r\n glow(options?: number | GlowOptions) {\r\n return this.append(buildEffect(glowSpec, options));\r\n }\r\n\r\n /**\r\n * Append a custom WGSL shader. `mode` picks the layer it runs on, which\r\n * `sample_src` reads: the node's own layer, or what is painted beneath it\r\n * (`'backdrop'`).\r\n */\r\n shader(options: ShaderEffectOptions) {\r\n const pack = typeof options.source === \"string\" ? undefined : options.source;\r\n if (pack && pack.scope !== \"effect\") {\r\n throw new Error(\r\n `Effects.shader was given a \"${(pack as { scope: string }).scope}\" shader ` +\r\n `(\"${pack.name}\"). A fill shader has no backdrop to sample and is bound to a ` +\r\n `shape's box; use Fills.shader.`,\r\n );\r\n }\r\n // A backdrop pack supplies the default; a caller may still say otherwise.\r\n const mode = options.mode ?? (pack?.backdrop ? \"backdrop\" : \"foreground\");\r\n const source = pack ? pack.source : (options.source as string);\r\n const uniforms = pack\r\n ? { ...resolveShaderProperties(pack, options.values), ...normalizeUniforms(options.uniforms ?? {}) }\r\n : (options.uniforms ?? {});\r\n const base = {\r\n type: \"shader\" as const,\r\n source,\r\n language: \"wgsl\" as const,\r\n ...(options.reach ? { reach: options.reach } : {}),\r\n uniforms,\r\n ...(pack?.id !== undefined ? { shaderId: pack.id } : {}),\r\n };\r\n // blendMode only applies to the foreground overlay; leaving it undefined\r\n // for a backdrop shader keeps `equals()` comparing like with like.\r\n const effect: NodeEffect = mode === \"foreground\" && options.blendMode\r\n ? { ...base, blendMode: options.blendMode }\r\n : base;\r\n return this.append(withEffectOptions(effect, { mode }));\r\n }\r\n\r\n /**\r\n * Append a sine warp. Tween `phase` over 360 to make the wave travel — it\r\n * wraps, so a linear tween loops seamlessly.\r\n */\r\n wave(options?: number | WaveOptions) {\r\n return this.append(buildEffect(waveSpec, options));\r\n }\r\n\r\n /**\r\n * Append a twirl / swirl vortex — a rotation about `center` that falls off\r\n * with distance, so the middle spins while the rim stays pinned.\r\n */\r\n twirl(options?: number | TwirlOptions) {\r\n return this.append(buildEffect(twirlSpec, options));\r\n }\r\n\r\n /**\r\n * Append a blur whose radius ramps across the node rather than being\r\n * uniform. With `{ mode: 'backdrop' }` this is the frosted panel whose blur\r\n * fades out instead of ending at a hard edge.\r\n */\r\n progressiveBlur(options?: number | ProgressiveBlurOptions) {\r\n return this.append(buildEffect(progressiveBlurSpec, options));\r\n }\r\n\r\n /**\r\n * Append a kaleidoscope fold. Animating `angle` sweeps fresh source material\r\n * through the sampled wedge while the pattern itself stays locked — which is\r\n * not what rotating the node does.\r\n */\r\n kaleidoscope(options?: number | KaleidoscopeOptions) {\r\n return this.append(buildEffect(kaleidoscopeSpec, options));\r\n }\r\n\r\n /**\r\n * Append Figma's Glass — the backdrop refracted, dispersed and frosted\r\n * through a curved edge on the node's outline, with a rim of light.\r\n *\r\n * Like `magnify`, this reads what is painted *beneath* the node and is\r\n * clipped to its outline, so the shape's own edges stay sharp. It needs no\r\n * map: the curve is derived from the outline itself, so it follows a\r\n * rounded rect, an ellipse, a hand-drawn path or text equally.\r\n *\r\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\r\n */\r\n glass(options?: number | GlassOptions) {\r\n return this.append(buildEffect(glassSpec, options));\r\n }\r\n\r\n /** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */\r\n *[Symbol.iterator]() {\r\n yield* this.list;\r\n }\r\n\r\n /** Serializes to the raw effect array so frameworks that call `toJSON` get a plain value. */\r\n toJSON() {\r\n return this.list;\r\n }\r\n}\r\n\r\n/**\r\n * Accepted shapes for a node's `effects` prop.\r\n *\r\n * Mirrors {@link Fill}: a single {@link NodeEffect}, an `EffectChain` builder\r\n * result, or an array mixing effects and chains (each chain contributes all its\r\n * effects in place). Already-resolved effects are themselves `NodeEffect`s, so\r\n * a node's read-back `effects` can be assigned straight back.\r\n *\r\n * Effects.blur(8) // chain\r\n * { type: 'blur', radius: 8 } // single effect\r\n * [Effects.blur(8), { type: 'invert' }] // mixed array\r\n * [...Effects.blur(8), grayscaleEffect]\r\n */\r\nexport type Effect =\r\n | NodeEffect\r\n | EffectChain\r\n | (NodeEffect | EffectChain)[];\r\n\r\n/**\r\n * Entry point for building effect chains fluently.\r\n *\r\n * An empty {@link EffectChain}, so `Effects.blur(8)` *is* `new EffectChain().blur(8)`\r\n * — every builder's signature and documentation has exactly one definition, on\r\n * the class, which is also what an editor shows when you hover `Effects.blur`.\r\n * (A parallel object of arrow functions would need its own copy of all 41 docs,\r\n * and hovering it showed none of them.)\r\n *\r\n * The chain is immutable — every builder returns a *new* chain — so sharing one\r\n * empty instance as the entry point is safe.\r\n *\r\n * @example\r\n * node.effects = Effects.blur(8).grayscale(1);\r\n */\r\nexport const Effects = new EffectChain();\r\n\r\n/**\r\n * Normalises any {@link Effect} value to a plain `NodeEffect[]`.\r\n * Used internally when reading props before rendering or interpolation.\r\n *\r\n * Chains used as array elements are flattened so each contributes its effects\r\n * in place: `[Effects.blur(8), grayscaleEffect]` — as is the plain array a chain\r\n * serializes to, which is how that value reads back out of a stored document.\r\n */\r\nexport function resolveChainEffects(effects: Effect | undefined): NodeEffect[] {\r\n if (effects === undefined) return [];\r\n if (effects instanceof EffectChain) return resolveAll(effects.list);\r\n if (Array.isArray(effects)) {\r\n const out: NodeEffect[] = [];\r\n for (const item of effects) {\r\n if (item instanceof EffectChain) out.push(...resolveAll(item.list));\r\n else if (Array.isArray(item)) out.push(...resolveChainEffects(item as Effect));\r\n else out.push(resolveEffect(item));\r\n }\r\n return out;\r\n }\r\n return [resolveEffect(effects)];\r\n}\r\n\r\n/**\r\n * Resolve every effect in `list`, returning **the same array** when none of them\r\n * needed it — which is the overwhelming majority, since one effect type\r\n * registers a `resolve` at all.\r\n *\r\n * The identity is load-bearing, not a micro-optimisation: this runs on every\r\n * write of an `effects` prop, and `lerpEffectArray` short-circuits on\r\n * `from === to`. Copying unconditionally would defeat that for every node in\r\n * every scene to migrate one effect type.\r\n */\r\nfunction resolveAll(list: NodeEffect[]): NodeEffect[] {\r\n let out: NodeEffect[] | undefined;\r\n for (let i = 0; i < list.length; i++) {\r\n const resolved = resolveEffect(list[i]);\r\n if (!out && resolved !== list[i]) out = list.slice(0, i);\r\n out?.push(resolved);\r\n }\r\n return out ?? list;\r\n}\r\n\r\n/** The effect-chain attribute's op set — the `effects` prop's resolve/lerp pair. */\r\nexport const effectsOps: AttributeOps<Effect, NodeEffect[]> = {\r\n resolve: (effects) => resolveChainEffects(effects),\r\n lerp: (from, to, t) => {\r\n if (from === to) return from;\r\n const maxLen = Math.max(from.length, to.length);\r\n const result: NodeEffect[] = [];\r\n for (let i = 0; i < maxLen; i++) {\r\n const a = from[i];\r\n const b = to[i];\r\n if (a && b) {\r\n result.push(lerpEffect(a, b, t));\r\n } else if (a) {\r\n result.push(a);\r\n } else if (b) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n },\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"chain.js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E,CAAC,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACT,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;iBAAM,IAAI,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import { NodeEffect } from \"./union\";\nimport type { BlendMode } from \"../fill/blend\";\nimport type { EffectOptions } from \"./effect-data\";\nimport { scalarOptions, withEffectOptions } from \"./effect-data\";\nimport { resolveEffect, lerpEffect } from \"./registry\";\nimport { buildEffect, type EffectOptionsOf } from \"./spec\";\nimport { blurSpec } from \"./implementations/blur\";\nimport { directionalBlurSpec } from \"./implementations/directional-blur\";\nimport { grayscaleSpec } from \"./implementations/grayscale\";\nimport { pixelateSpec } from \"./implementations/pixelate\";\nimport { bulgeSpec } from \"./implementations/bulge\";\nimport { magnifySpec } from \"./implementations/magnify\";\nimport { bloomSpec } from \"./implementations/bloom\";\nimport { vintageSpec } from \"./implementations/vintage\";\nimport { chromaticAberrationSpec } from \"./implementations/chromatic-aberration\";\nimport { invertSpec } from \"./implementations/invert\";\nimport { scatterSpec } from \"./implementations/scatter\";\nimport { posterizeSpec } from \"./implementations/posterize\";\nimport { motionBlurSpec } from \"./implementations/motion-blur\";\nimport { outlineSpec } from \"./implementations/outline\";\nimport { dropShadowSpec } from \"./implementations/drop-shadow\";\nimport { vignetteSpec } from \"./implementations/vignette\";\nimport { lutSpec } from \"./implementations/lut\";\nimport { grainSpec } from \"./implementations/grain\";\nimport { sharpenSpec } from \"./implementations/sharpen\";\nimport { edgesSpec } from \"./implementations/edges\";\nimport { thresholdSpec } from \"./implementations/threshold\";\nimport { radialBlurSpec } from \"./implementations/radial-blur\";\nimport { halftoneSpec } from \"./implementations/halftone\";\nimport { ditherSpec } from \"./implementations/dither\";\nimport { duotoneSpec } from \"./implementations/duotone\";\nimport { curvesSpec } from \"./implementations/curves\";\nimport { rgbShiftSpec } from \"./implementations/rgb-shift\";\nimport { scanlinesSpec } from \"./implementations/scanlines\";\nimport { blockDisplaceSpec } from \"./implementations/block-displace\";\nimport { bitCrushSpec } from \"./implementations/bit-crush\";\nimport { asciiSpec } from \"./implementations/ascii\";\nimport { oilPaintSpec } from \"./implementations/oil-paint\";\nimport { streakSpec } from \"./implementations/streak\";\nimport { glowSpec } from \"./implementations/glow\";\nimport { waveSpec } from \"./implementations/wave\";\nimport { twirlSpec } from \"./implementations/twirl\";\nimport { progressiveBlurSpec } from \"./implementations/progressive-blur\";\nimport { kaleidoscopeSpec } from \"./implementations/kaleidoscope\";\nimport { glassSpec } from \"./implementations/glass\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\nimport { normalizeUniforms, type ShaderUniform, type ShaderUniformRecord } from \"../shaders/uniforms\";\nimport { resolveShaderProperties, type ShaderPropertyValues } from \"../shaders/resolve\";\nimport type { EffectShader } from \"../shaders/pack\";\nimport type { ColorAdjustmentEffect } from \"./implementations/color-adjustment\";\n\n/**\n * Every effect builder takes **exactly one argument**: an options object\n * carrying all of that effect's data. Builders with one dominant animated\n * scalar also accept that scalar directly, so the common case stays terse:\n *\n * Effects.blur(8)\n * Effects.blur({ radius: 8, mode: 'backdrop' })\n *\n * Field names are shared vocabulary across every effect — `radius` is always a\n * pixel distance, `amount` always a 0–1 intensity, `angle` always degrees,\n * `center` always a 0–1 normalised point, `axis` always an {@link EffectAxis}.\n */\n\n/** Gaussian blur. Scalar shorthand sets `radius`. */\nexport type BlurOptions = EffectOptionsOf<typeof blurSpec.params>;\n\n/** Directional (linear) blur. Scalar shorthand sets `radius`. */\nexport type DirectionalBlurOptions = EffectOptionsOf<typeof directionalBlurSpec.params>;\n\n/** Desaturation. Scalar shorthand sets `amount`. */\nexport type GrayscaleOptions = EffectOptionsOf<typeof grayscaleSpec.params>;\n\n/**\n * After Effects-style Mosaic. Scalar shorthand sets `blocks` on both axes.\n *\n * `blocks` is the *number of blocks* across the node, so a count equal to the\n * node's pixel size on that axis is pristine and lower counts are coarser.\n */\nexport type PixelateOptions = EffectOptionsOf<typeof pixelateSpec.params>;\n\n/** Bulge / pinch lens over the node's content, or the backdrop. Scalar shorthand sets `strength`. */\nexport type BulgeOptions = EffectOptionsOf<typeof bulgeSpec.params>;\n\n/** Magnifier lens over the backdrop. Scalar shorthand sets `scale`. */\nexport type MagnifyOptions = EffectOptionsOf<typeof magnifySpec.params>;\n\n/** Bloom (glow). Scalar shorthand sets `intensity`. */\nexport type BloomOptions = EffectOptionsOf<typeof bloomSpec.params>;\n\n/** Vintage / film-look colour grading. Scalar shorthand sets `amount`. */\nexport type VintageOptions = EffectOptionsOf<typeof vintageSpec.params>;\n\n/** Lens-dispersion colour fringing. Scalar shorthand sets `amount`. */\nexport type ChromaticAberrationOptions = EffectOptionsOf<typeof chromaticAberrationSpec.params>;\n\n/** Colour invert. Scalar shorthand sets `strength`. */\nexport type InvertOptions = EffectOptionsOf<typeof invertSpec.params>;\n\n/** Per-pixel random jitter. Scalar shorthand sets `strength`. */\nexport type ScatterOptions = EffectOptionsOf<typeof scatterSpec.params>;\n\n/** Colour banding. Scalar shorthand sets `levels`. */\nexport type PosterizeOptions = EffectOptionsOf<typeof posterizeSpec.params>;\n\n/** Velocity-driven motion blur. Scalar shorthand sets `length`. */\nexport type MotionBlurOptions = EffectOptionsOf<typeof motionBlurSpec.params>;\n\n/**\n * A custom shader. `mode` selects the path:\n *\n * - `'foreground'` (the default) — `sample_src` reads the node's layer; the output\n * replaces it, or composites onto it with `blendMode`.\n * - `'backdrop'` — `sample_src` reads a snapshot of what is painted beneath the\n * node. `blendMode` is unused.\n */\nexport interface ShaderEffectOptions extends EffectOptions {\n /**\n * The WGSL program, or a registered\n * **shader pack** — a program plus the editable values it publishes.\n *\n * A pack resolves to plain uniforms here, so nothing below this builder\n * knows one exists; what survives into the document is the resolved record\n * plus a `shaderId` naming the pack, which is what lets a host reopen its\n * property panel from a saved scene.\n */\n source: string | EffectShader;\n /**\n * Property overrides, by property id, when {@link source} is a pack.\n *\n * Anything not named here takes the pack's own default. Ignored — with a\n * warning — for a bare source string, which has no properties to override.\n */\n values?: ShaderPropertyValues;\n /**\n * Uniform values by name — lerped between animation frames (default `{}`).\n *\n * The positional `[{ name, value }]` array still works; both are bound by\n * name now, so the array's order no longer means anything.\n */\n uniforms?: ShaderUniformRecord | ShaderUniform[];\n /** How a foreground shader composites onto the layer; its output replaces the layer when absent. */\n blendMode?: BlendMode;\n /** How far past the node's box (logical px) a WGSL effect may draw. Default 0. */\n reach?: number;\n}\n\n/** Coloured band around the node's silhouette. Scalar shorthand sets `width`. */\nexport type OutlineOptions = EffectOptionsOf<typeof outlineSpec.params>;\n\n/**\n * A shadow cast from the node's silhouette. Scalar shorthand sets `blur`, since\n * softness is the knob a shadow is usually reached for by.\n */\nexport type DropShadowOptions = EffectOptionsOf<typeof dropShadowSpec.params>;\n\n/** Darkened edges / lens falloff. Scalar shorthand sets `amount`. */\nexport type VignetteOptions = EffectOptionsOf<typeof vignetteSpec.params>;\n\n/** Film grain. Scalar shorthand sets `amount`. */\n/**\n * A 3D colour lookup table — see {@link LutEffect} for the table's layout and\n * why it is compared by reference.\n *\n * No scalar shorthand: the dominant argument is a whole cube, and a builder that\n * took `Effects.lut(table)` would still need the size beside it to read it.\n */\nexport type LutOptions = EffectOptionsOf<typeof lutSpec.params>;\n\nexport type GrainOptions = EffectOptionsOf<typeof grainSpec.params>;\n\n/** Unsharp-mask sharpen. Scalar shorthand sets `amount`. */\nexport type SharpenOptions = EffectOptionsOf<typeof sharpenSpec.params>;\n\n/** Edge detection. Scalar shorthand sets `strength`. */\nexport type EdgesOptions = EffectOptionsOf<typeof edgesSpec.params>;\n\n/** Two-tone luminance cut. Scalar shorthand sets `level`. */\nexport type ThresholdOptions = EffectOptionsOf<typeof thresholdSpec.params>;\n\n/** Zoom / spin blur about a point. Scalar shorthand sets `amount`. */\nexport type RadialBlurOptions = EffectOptionsOf<typeof radialBlurSpec.params>;\n\n/** Halftone print screen. Scalar shorthand sets `size`. */\nexport type HalftoneOptions = EffectOptionsOf<typeof halftoneSpec.params>;\n\n/** Ordered (Bayer) dithering. Scalar shorthand sets `levels`. */\nexport type DitherOptions = EffectOptionsOf<typeof ditherSpec.params>;\n\n/** Two-colour luminance ramp. Scalar shorthand sets `amount`. */\nexport type DuotoneOptions = EffectOptionsOf<typeof duotoneSpec.params>;\n\n/** Tone curve through control points. */\nexport type CurvesOptions = EffectOptionsOf<typeof curvesSpec.params>;\n\n/** Photographic grading. Every field is optional and defaults to neutral. */\nexport type ColorAdjustmentOptions = Omit<ColorAdjustmentEffect, 'type'> & EffectOptions;\n\n/**\n * Per-channel RGB offset. Scalar shorthand sets `amount`, which spreads red and\n * blue apart horizontally by that many pixels and leaves green put — the\n * everyday case. Name `red`/`green`/`blue` for full control.\n */\nexport type RgbShiftOptions = EffectOptionsOf<typeof rgbShiftSpec.params> & {\n /** Shorthand: ±px horizontal spread of red vs. blue (default 4); `red`/`blue` override it. */\n amount?: number;\n};\n\n/** CRT scanlines. Scalar shorthand sets `darkness`. */\nexport type ScanlinesOptions = EffectOptionsOf<typeof scanlinesSpec.params>;\n\n/** Datamosh-style band tearing. Scalar shorthand sets `amount`. */\nexport type BlockDisplaceOptions = EffectOptionsOf<typeof blockDisplaceSpec.params>;\n\n/** ASCII art from a glyph grid. Scalar shorthand sets `size`. */\nexport type AsciiOptions = EffectOptionsOf<typeof asciiSpec.params>;\n\n/** Anamorphic glare — a bright pass smeared along one axis. Scalar shorthand sets `intensity`. */\nexport type StreakOptions = EffectOptionsOf<typeof streakSpec.params>;\n\n/**\n * A glow — bright (or opaque) areas spread outward and composited back, with\n * optional recolouring. Scalar shorthand sets `intensity`.\n *\n * Unlike `bloom`, this spreads past the node's own box, chooses how the source\n * composites against it, and can be coloured through a ramp.\n */\nexport type GlowOptions = EffectOptionsOf<typeof glowSpec.params>;\n\n/** Kuwahara brushwork. Scalar shorthand sets `radius`. */\nexport type OilPaintOptions = EffectOptionsOf<typeof oilPaintSpec.params>;\n\n/** Sine warp. Scalar shorthand sets `amplitude` on the Y axis — the everyday ripple. */\nexport type WaveOptions = EffectOptionsOf<typeof waveSpec.params>;\n\n/** Twirl / swirl vortex. Scalar shorthand sets `angle`. */\nexport type TwirlOptions = EffectOptionsOf<typeof twirlSpec.params>;\n\n/**\n * Blur that ramps across the node. Scalar shorthand sets `radius`.\n *\n * `mode: 'backdrop'` gives the frosted panel whose blur fades out rather than\n * ending at a hard edge.\n */\nexport type ProgressiveBlurOptions = EffectOptionsOf<typeof progressiveBlurSpec.params>;\n\n/** Mirrored wedges around a point. Scalar shorthand sets `segments`. */\nexport type KaleidoscopeOptions = EffectOptionsOf<typeof kaleidoscopeSpec.params>;\n\n/**\n * Figma's Glass over the backdrop. Scalar shorthand sets `refraction`.\n *\n * Figma's fields, units and defaults (light `-45°` at 80, refraction 80, depth\n * 20 px, dispersion 50, frost 4, splay 0), so a bare `Effects.glass()` is the\n * glass Figma adds and values copied from a Figma file render the same.\n *\n * Defaults to `{ mode: 'backdrop' }`; there is nothing to refract in a node's\n * own paint, so the foreground is a no-op.\n */\nexport type GlassOptions = EffectOptionsOf<typeof glassSpec.params>;\n\n/** Colour-depth reduction. Scalar shorthand sets `bits`. */\nexport type BitCrushOptions = EffectOptionsOf<typeof bitCrushSpec.params>;\n\n/**\n * Immutable, chainable list of node effects.\n *\n * Each builder method returns a new `EffectChain` with the effect appended,\n * so chains are safe to share and branch.\n *\n * @example\n * const fx = Effects.blur(4).grayscale(0.5);\n * node.effects = fx; // assign directly\n * node.effects = [...fx, { type: 'pixelate', ... }]; // spread into array\n */\nexport class EffectChain {\n constructor(public list: NodeEffect[] = []) { }\n\n private append(effect: NodeEffect): EffectChain {\n return new EffectChain([...this.list, effect]);\n }\n\n /**\n * Append a Gaussian blur. Pass `{ mode: \"backdrop\" }` to blur the content\n * beneath the node (clipped to its silhouette, Figma-style) instead of the\n * node's own content.\n */\n blur(options: number | BlurOptions) {\n return this.append(buildEffect(blurSpec, options));\n }\n\n /**\n * Append a motion-blur-style directional (linear) blur, smearing the node's\n * own content along a single axis (or the backdrop, with `{ mode: \"backdrop\" }`).\n */\n directionalBlur(options: number | DirectionalBlurOptions) {\n return this.append(buildEffect(directionalBlurSpec, options));\n }\n\n /**\n * Append an After Effects-style Mosaic / pixelate. `blocks` is the *number of\n * blocks* across the node (a count equal to the node's pixel size on that\n * axis is pristine; lower is coarser), not a pixel block size.\n */\n pixelate(options: number | PixelateOptions) {\n return this.append(buildEffect(pixelateSpec, options));\n }\n\n /** Append a grayscale effect. `{ mode: \"backdrop\" }` desaturates the backdrop. */\n grayscale(options: number | GrayscaleOptions) {\n return this.append(buildEffect(grayscaleSpec, options));\n }\n\n /**\n * Append a bulge/pinch lens. A barrel distortion magnifies the centre and\n * pins the edges; a negative strength pinches the centre inward instead.\n * `mode: \"backdrop\"` points the same lens at what is painted beneath the\n * node, giving a glass dome over the layers below rather than a warp of the\n * node's own paint.\n */\n bulge(options: number | BulgeOptions) {\n return this.append(buildEffect(bulgeSpec, options));\n }\n\n /**\n * Append a magnify lens that magnifies the backdrop beneath the node. The lens\n * fills the node's bounding box and is clipped to its silhouette, so whatever\n * is painted underneath shows through scaled about `center` — like a\n * magnifying glass shaped to the node.\n *\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\n */\n magnify(options?: number | MagnifyOptions) {\n return this.append(buildEffect(magnifySpec, options));\n }\n\n /**\n * Append a bloom (glow) effect. Bright areas bleed soft light outward via a\n * screen-blend of the blurred bright-pass onto the layer.\n */\n bloom(options?: number | BloomOptions) {\n return this.append(buildEffect(bloomSpec, options));\n }\n\n /** Append a vintage / film-look colour grading effect. */\n vintage(options?: number | VintageOptions) {\n return this.append(buildEffect(vintageSpec, options));\n }\n\n /**\n * Append a chromatic aberration effect — red/blue colour fringing that mimics\n * lens dispersion.\n */\n chromaticAberration(options?: number | ChromaticAberrationOptions) {\n return this.append(buildEffect(chromaticAberrationSpec, options));\n }\n\n /** Append a colour-invert effect. */\n invert(options?: number | InvertOptions) {\n return this.append(buildEffect(invertSpec, options));\n }\n\n /**\n * Append a scatter effect — randomly jitters the node's own pixels, smearing\n * its content like After Effects' Scatter.\n */\n scatter(options?: number | ScatterOptions) {\n return this.append(buildEffect(scatterSpec, options));\n }\n\n /**\n * Append an After Effects-style posterize effect — quantizes each colour\n * channel into `levels` evenly-spaced bands, flattening gradients into steps.\n */\n posterize(options?: number | PosterizeOptions) {\n return this.append(buildEffect(posterizeSpec, options));\n }\n\n /**\n * Append velocity-driven motion blur — smears the node's own content along its\n * actual per-frame motion (a static node stays sharp). Modelled on After\n * Effects' shutter angle (`length`) and shutter phase (`alignment`).\n */\n motionBlur(options?: number | MotionBlurOptions) {\n return this.append(buildEffect(motionBlurSpec, options));\n }\n\n /**\n * Append an outline — a coloured band traced around the node's silhouette,\n * including alpha silhouettes (text, an image's cutout, a whole subtree) that\n * a geometry `stroke` can't follow.\n */\n outline(options?: number | OutlineOptions) {\n return this.append(buildEffect(outlineSpec, options));\n }\n\n /**\n * Append a drop shadow cast from the node's **silhouette** — including alpha\n * silhouettes (text, an image's cutout, a whole subtree) that a geometry\n * `shadow` can't follow, since that one fills the node's path.\n */\n dropShadow(options?: number | DropShadowOptions) {\n return this.append(buildEffect(dropShadowSpec, options));\n }\n\n /**\n * Append a vignette — a soft tint ramping in toward the node's corners. The\n * falloff follows the node's aspect ratio, so a wide node darkens along its\n * short edges the way a lens would.\n */\n vignette(options?: number | VignetteOptions) {\n return this.append(buildEffect(vignetteSpec, options));\n }\n\n /**\n * Append film grain. Static grain reads as texture rather than film, so pass\n * `{ animated: true }` to re-seed it each frame — or tween `seed` when the\n * render has to stay deterministic.\n */\n /**\n * Apply a 3D colour lookup table.\n *\n * The whole point of a LUT is that it is *someone else's* colour science, so\n * there is nothing to default beyond how much of it to use: `amount` is the\n * mix and everything else is the file.\n *\n * @example\n * Effects.lut({ table, size: 33 }) // the full look\n * Effects.lut({ table, size: 33, amount: 0.6 })\n */\n lut(options: LutOptions) {\n return this.append(buildEffect(lutSpec, options));\n }\n\n grain(options?: number | GrainOptions) {\n return this.append(buildEffect(grainSpec, options));\n }\n\n /** Append an unsharp-mask sharpen — local contrast boosted at `radius` scale. */\n sharpen(options?: number | SharpenOptions) {\n return this.append(buildEffect(sharpenSpec, options));\n }\n\n /**\n * Append edge detection — flat areas go black and boundaries light up with\n * the magnitude of the local gradient.\n */\n edges(options?: number | EdgesOptions) {\n return this.append(buildEffect(edgesSpec, options));\n }\n\n /**\n * Append a luminance threshold — a two-tone stencil cut at `level`, with\n * `smoothness` widening the cut into a ramp.\n */\n threshold(options?: number | ThresholdOptions) {\n return this.append(buildEffect(thresholdSpec, options));\n }\n\n /**\n * Append a radial blur — samples smeared along the radius (`'zoom'`, the\n * default) or the tangent (`'spin'`) about `center`, leaving the centre sharp.\n */\n radialBlur(options?: number | RadialBlurOptions) {\n return this.append(buildEffect(radialBlurSpec, options));\n }\n\n /**\n * Append a halftone screen — the newsprint look, where tone becomes the size\n * of a mark on a rotated grid.\n */\n halftone(options?: number | HalftoneOptions) {\n return this.append(buildEffect(halftoneSpec, options));\n }\n\n /**\n * Append ordered (Bayer) dithering — quantization to `levels` tones per\n * channel with the error traded for a retro crosshatch pattern.\n */\n dither(options?: number | DitherOptions) {\n return this.append(buildEffect(ditherSpec, options));\n }\n\n /**\n * Append a duotone / gradient map — the content's luminance remapped onto a\n * `shadows` → `highlights` ramp, discarding its original chroma.\n */\n duotone(options?: number | DuotoneOptions) {\n return this.append(buildEffect(duotoneSpec, options));\n }\n\n /**\n * Append a tone curve — the same adjustment `Adjustments.curves` applies to a\n * photo, on any node.\n */\n curves(options: CurvesOptions) {\n return this.append(buildEffect(curvesSpec, options));\n }\n\n /**\n * Append photographic grading (brightness / contrast / saturation / vibrance /\n * shadows / highlights / temperature / tint) — `Adjustments.colorAdjustment`\n * on any node. For darkened edges use {@link EffectChain.vignette}.\n */\n colorAdjustment(options: ColorAdjustmentOptions) {\n // Destructure `mode` out rather than spreading it through: a caller who\n // writes `{ mode: undefined }` would otherwise plant the key on the\n // effect, and `equals()` compares `mode` directly. `withEffectOptions`\n // skips undefined, so handing it back there is safe.\n const { mode, ...fields } = options;\n return this.append(withEffectOptions({ type: \"colorAdjustment\" as const, ...fields }, { mode }));\n }\n\n /**\n * Append a per-channel RGB offset — the digital cousin of\n * {@link EffectChain.chromaticAberration}, where each plane goes where you\n * point it instead of following a lens model.\n */\n rgbShift(options?: number | RgbShiftOptions) {\n const o = scalarOptions(options, \"amount\");\n const spread = o.amount;\n return this.append(buildEffect(rgbShiftSpec, spread === undefined ? o : {\n ...o,\n red: o.red ?? { x: spread, y: 0 },\n blue: o.blue ?? { x: -spread, y: 0 },\n }));\n }\n\n /**\n * Append CRT scanlines. Animate `offset` past `spacing` to roll the bands;\n * the pattern wraps, so a linear tween loops seamlessly.\n */\n scanlines(options?: number | ScanlinesOptions) {\n return this.append(buildEffect(scanlinesSpec, options));\n }\n\n /**\n * Append datamosh-style band tearing. Step `seed` in whole numbers to jump\n * between distinct glitch states rather than sliding between them.\n */\n blockDisplace(options?: number | BlockDisplaceOptions) {\n return this.append(buildEffect(blockDisplaceSpec, options));\n }\n\n /**\n * Append colour-depth reduction — `bits` per channel, or a fixed hardware\n * palette. Pair with {@link EffectChain.dither} so gradients survive the cut.\n */\n bitCrush(options?: number | BitCrushOptions) {\n return this.append(buildEffect(bitCrushSpec, options));\n }\n\n /**\n * Append ASCII art — the content divided into a grid of cells, each cell's\n * tone replaced by the glyph that carries a matching amount of ink.\n *\n * Set `background: 'transparent'` to lay the glyphs over whatever is behind\n * the node instead of over a solid field.\n */\n ascii(options?: number | AsciiOptions) {\n return this.append(buildEffect(asciiSpec, options));\n }\n\n /**\n * Append Kuwahara brushwork — averages within a region but never across an\n * edge, so flat areas smooth into strokes while boundaries stay crisp.\n * By some margin the most expensive effect in the set; keep `radius` small.\n */\n oilPaint(options?: number | OilPaintOptions) {\n return this.append(buildEffect(oilPaintSpec, options));\n }\n\n /**\n * Append an anamorphic streak — a bright pass smeared along one axis and\n * screened back on. {@link EffectChain.bloom} spreads light in every\n * direction; this spreads it in one.\n */\n streak(options?: number | StreakOptions) {\n return this.append(buildEffect(streakSpec, options));\n }\n\n /**\n * Append a glow — the bright (or opaque) parts of the layer spread outward\n * and composited back, optionally recoloured through a ramp.\n *\n * `bloom` is the cheaper relative: it screens a blurred bright-pass back\n * within the node's own box. This one spreads past that box, lets the source\n * sit behind, in front of, or nowhere at all, and can map glow strength onto\n * `colors`/`stops` — which is what a heat, neon or aurora look needs.\n */\n glow(options?: number | GlowOptions) {\n return this.append(buildEffect(glowSpec, options));\n }\n\n /**\n * Append a custom WGSL shader. `mode` picks the layer it runs on, which\n * `sample_src` reads: the node's own layer, or what is painted beneath it\n * (`'backdrop'`).\n */\n shader(options: ShaderEffectOptions) {\n const pack = typeof options.source === \"string\" ? undefined : options.source;\n if (pack && pack.scope !== \"effect\") {\n throw new Error(\n `Effects.shader was given a \"${(pack as { scope: string }).scope}\" shader ` +\n `(\"${pack.name}\"). A fill shader has no backdrop to sample and is bound to a ` +\n `shape's box; use Fills.shader.`,\n );\n }\n // A backdrop pack supplies the default; a caller may still say otherwise.\n const mode = options.mode ?? (pack?.backdrop ? \"backdrop\" : \"foreground\");\n const source = pack ? pack.source : (options.source as string);\n const uniforms = pack\n ? { ...resolveShaderProperties(pack, options.values), ...normalizeUniforms(options.uniforms ?? {}) }\n : (options.uniforms ?? {});\n const base = {\n type: \"shader\" as const,\n source,\n language: \"wgsl\" as const,\n ...(options.reach ? { reach: options.reach } : {}),\n uniforms,\n ...(pack?.id !== undefined ? { shaderId: pack.id } : {}),\n };\n // blendMode only applies to the foreground overlay; leaving it undefined\n // for a backdrop shader keeps `equals()` comparing like with like.\n const effect: NodeEffect = mode === \"foreground\" && options.blendMode\n ? { ...base, blendMode: options.blendMode }\n : base;\n return this.append(withEffectOptions(effect, { mode }));\n }\n\n /**\n * Append a sine warp. Tween `phase` over 360 to make the wave travel — it\n * wraps, so a linear tween loops seamlessly.\n */\n wave(options?: number | WaveOptions) {\n return this.append(buildEffect(waveSpec, options));\n }\n\n /**\n * Append a twirl / swirl vortex — a rotation about `center` that falls off\n * with distance, so the middle spins while the rim stays pinned.\n */\n twirl(options?: number | TwirlOptions) {\n return this.append(buildEffect(twirlSpec, options));\n }\n\n /**\n * Append a blur whose radius ramps across the node rather than being\n * uniform. With `{ mode: 'backdrop' }` this is the frosted panel whose blur\n * fades out instead of ending at a hard edge.\n */\n progressiveBlur(options?: number | ProgressiveBlurOptions) {\n return this.append(buildEffect(progressiveBlurSpec, options));\n }\n\n /**\n * Append a kaleidoscope fold. Animating `angle` sweeps fresh source material\n * through the sampled wedge while the pattern itself stays locked — which is\n * not what rotating the node does.\n */\n kaleidoscope(options?: number | KaleidoscopeOptions) {\n return this.append(buildEffect(kaleidoscopeSpec, options));\n }\n\n /**\n * Append Figma's Glass — the backdrop refracted, dispersed and frosted\n * through a curved edge on the node's outline, with a rim of light.\n *\n * Like `magnify`, this reads what is painted *beneath* the node and is\n * clipped to its outline, so the shape's own edges stay sharp. It needs no\n * map: the curve is derived from the outline itself, so it follows a\n * rounded rect, an ellipse, a hand-drawn path or text equally.\n *\n * Defaults to `{ mode: 'backdrop' }`; pass `mode` explicitly to override.\n */\n glass(options?: number | GlassOptions) {\n return this.append(buildEffect(glassSpec, options));\n }\n\n /** Allows spreading the chain into an array: `[...Effects.blur(5)]`. */\n *[Symbol.iterator]() {\n yield* this.list;\n }\n\n /** Serializes to the raw effect array so frameworks that call `toJSON` get a plain value. */\n toJSON() {\n return this.list;\n }\n}\n\n/**\n * Accepted shapes for a node's `effects` prop.\n *\n * Mirrors {@link Fill}: a single {@link NodeEffect}, an `EffectChain` builder\n * result, or an array mixing effects and chains (each chain contributes all its\n * effects in place). Already-resolved effects are themselves `NodeEffect`s, so\n * a node's read-back `effects` can be assigned straight back.\n *\n * Effects.blur(8) // chain\n * { type: 'blur', radius: 8 } // single effect\n * [Effects.blur(8), { type: 'invert' }] // mixed array\n * [...Effects.blur(8), grayscaleEffect]\n */\nexport type Effect =\n | NodeEffect\n | EffectChain\n | (NodeEffect | EffectChain)[];\n\n/**\n * Entry point for building effect chains fluently.\n *\n * An empty {@link EffectChain}, so `Effects.blur(8)` *is* `new EffectChain().blur(8)`\n * — every builder's signature and documentation has exactly one definition, on\n * the class, which is also what an editor shows when you hover `Effects.blur`.\n * (A parallel object of arrow functions would need its own copy of all 41 docs,\n * and hovering it showed none of them.)\n *\n * The chain is immutable — every builder returns a *new* chain — so sharing one\n * empty instance as the entry point is safe.\n *\n * @example\n * node.effects = Effects.blur(8).grayscale(1);\n */\nexport const Effects = new EffectChain();\n\n/**\n * Normalises any {@link Effect} value to a plain `NodeEffect[]`.\n * Used internally when reading props before rendering or interpolation.\n *\n * Chains used as array elements are flattened so each contributes its effects\n * in place: `[Effects.blur(8), grayscaleEffect]` — as is the plain array a chain\n * serializes to, which is how that value reads back out of a stored document.\n */\nexport function resolveChainEffects(effects: Effect | undefined): NodeEffect[] {\n if (effects === undefined) return [];\n if (effects instanceof EffectChain) return resolveAll(effects.list);\n if (Array.isArray(effects)) {\n const out: NodeEffect[] = [];\n for (const item of effects) {\n if (item instanceof EffectChain) out.push(...resolveAll(item.list));\n else if (Array.isArray(item)) out.push(...resolveChainEffects(item as Effect));\n else out.push(resolveEffect(item));\n }\n return out;\n }\n return [resolveEffect(effects)];\n}\n\n/**\n * Resolve every effect in `list`, returning **the same array** when none of them\n * needed it — which is the overwhelming majority, since one effect type\n * registers a `resolve` at all.\n *\n * The identity is load-bearing, not a micro-optimisation: this runs on every\n * write of an `effects` prop, and `lerpEffectArray` short-circuits on\n * `from === to`. Copying unconditionally would defeat that for every node in\n * every scene to migrate one effect type.\n */\nfunction resolveAll(list: NodeEffect[]): NodeEffect[] {\n let out: NodeEffect[] | undefined;\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveEffect(list[i]);\n if (!out && resolved !== list[i]) out = list.slice(0, i);\n out?.push(resolved);\n }\n return out ?? list;\n}\n\n/** The effect-chain attribute's op set — the `effects` prop's resolve/lerp pair. */\nexport const effectsOps: AttributeOps<Effect, NodeEffect[]> = {\n resolve: (effects) => resolveChainEffects(effects),\n lerp: (from, to, t) => {\n if (from === to) return from;\n const maxLen = Math.max(from.length, to.length);\n const result: NodeEffect[] = [];\n for (let i = 0; i < maxLen; i++) {\n const a = from[i];\n const b = to[i];\n if (a && b) {\n result.push(lerpEffect(a, b, t));\n } else if (a) {\n result.push(a);\n } else if (b) {\n result.push(b);\n }\n }\n return result;\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-data.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/effect-data.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAmClD,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAAC,IAAgB;IAC9C,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAChC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAChC,KAAK,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;IAC7C,CAAC;AACL,CAAC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AE,OAAO,GAAG,CAAC;IACzB,KAAK,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,qEAAqE;QACrE,wEAAwE;QACxE,+DAA+D;QAC/D,IAAI,KAAK,KAAK,SAAS;YAAG,GAA+B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC3E,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CACzB,GAA2B,EAC3B,GAAY;IAEZ,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAgC,CAAC;IACjF,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\nimport type { Color, NormalizedColor } from \"../fill/color/parser\";\r\nimport { parseColor } from \"../fill/color/parser\";\r\n\r\n/**\r\n * Which layer an effect runs on: the node's own content (`\"foreground\"`, the\r\n * default) or the **backdrop** — the content already painted beneath the node.\r\n * A backdrop effect is applied to whatever lies underneath the node and clipped\r\n * to the node's silhouette, so the node's own edges stay sharp (Figma-style).\r\n */\r\nexport type EffectMode = \"foreground\" | \"backdrop\";\r\n\r\n/**\r\n * How a backend must realise an effect.\r\n *\r\n * - `\"filter\"` (the default) — the effect transforms colours in place, so it\r\n * composes as a plain image filter alongside its neighbours in the chain.\r\n * - `\"shader\"` — the effect *resamples pixel positions* (warps, bands, or\r\n * otherwise reads neighbouring texels), so it needs the content snapshotted\r\n * into a texture and redrawn through a lens rather than composed.\r\n *\r\n * This is a statement about the effect, not about any particular backend: it\r\n * says the effect needs random access to its source, which is why it belongs\r\n * here next to `lerp`/`equals` rather than in the renderer.\r\n */\r\nexport type EffectSurface = \"filter\" | \"shader\";\r\n\r\n/**\r\n * Axis (or axes) an effect acts along.\r\n *\r\n * `\"both\"` (= `{ x: 1, y: 1 }`) uses the full 2D vector; `\"x\"`/`\"y\"` isolate a\r\n * single axis; a {@link Vector2} gives fractional control per axis. Shared by\r\n * every axis-selecting effect so `scatter` and `motionBlur` speak the same\r\n * vocabulary.\r\n */\r\nexport type EffectAxis = \"x\" | \"y\" | \"both\" | Vector2;\r\n\r\n/** Resolve an {@link EffectAxis} to its per-axis scale vector. */\r\nexport function resolveEffectAxis(axis: EffectAxis): Vector2 {\r\n switch (axis) {\r\n case \"x\": return { x: 1, y: 0 };\r\n case \"y\": return { x: 0, y: 1 };\r\n case \"both\": return { x: 1, y: 1 };\r\n default: return { x: axis.x, y: axis.y };\r\n }\r\n}\r\n\r\n/** Do two {@link EffectAxis} values resolve to the same scale vector? */\r\nexport function sameEffectAxis(a: EffectAxis, b: EffectAxis): boolean {\r\n const av = resolveEffectAxis(a);\r\n const bv = resolveEffectAxis(b);\r\n return av.x === bv.x && av.y === bv.y;\r\n}\r\n\r\n/**\r\n * Resolve a colour-valued effect option to its RGBA tuple.\r\n *\r\n * Colour options are stored **as authored** (a CSS string, a theme alias, or an\r\n * already-normalised tuple) rather than parsed at build time, so a raw effect\r\n * literal — `{ type: 'outline', color: 'primary', … }` — behaves exactly like the\r\n * builder form, and a theme alias still resolves against whatever `setTheme`\r\n * installed. Backends call this to get numbers; `lerp` calls it on both ends.\r\n */\r\nexport function resolveEffectColor(color: Color): NormalizedColor {\r\n return Array.isArray(color) ? color : parseColor(color);\r\n}\r\n\r\n/** Do two colour options resolve to the same RGBA? (`'red'` === `'#ff0000'`.) */\r\nexport function sameEffectColor(a: Color, b: Color): boolean {\r\n if (a === b) return true;\r\n const av = resolveEffectColor(a);\r\n const bv = resolveEffectColor(b);\r\n return av[0] === bv[0] && av[1] === bv[1] && av[2] === bv[2] && av[3] === bv[3];\r\n}\r\n\r\n/**\r\n * Mixin: every effect declares the layer it targets via {@link EffectMode}.\r\n * Omitted is treated as `\"foreground\"`. A single uniform field across all effects\r\n * means the backdrop/foreground classifier never has to branch on `type`.\r\n */\r\nexport interface ModedEffect {\r\n mode?: EffectMode;\r\n /**\r\n * Confine the effect's output to the alpha it was handed — the node's own\r\n * silhouette, rather than the rectangle its bleed would otherwise fill.\r\n *\r\n * Off (the default) a blur, bloom, outline or streak spreads *past* the\r\n * content that produced it, which is usually the point. On, the effect is\r\n * clipped back into the shape: a bloom that lights the node without\r\n * haloing the page around it, a blur that softens a fill without fraying its\r\n * edge — Figma's \"clip content\" applied to the effect rather than the layer.\r\n *\r\n * Honoured on both render paths — `EffectRegistry.compose` clips an\r\n * ImageFilter chain per effect, and `resolveForegroundCapture` blends a\r\n * shader effect's lens into the content it was given — so the flag means the\r\n * same thing whichever way an effect happens to be realised.\r\n *\r\n * Redundant in `mode: 'backdrop'`, where the effect is already confined to\r\n * the node's silhouette by definition.\r\n */\r\n clip?: boolean;\r\n}\r\n\r\n/**\r\n * Cross-cutting options accepted by every effect builder — the builder-side view\r\n * of {@link ModedEffect}. Each builder's own options type intersects this, so\r\n * `mode` is spelled the same way everywhere:\r\n *\r\n * Effects.blur({ radius: 8, mode: 'backdrop' })\r\n *\r\n * This is the extension point for future chain-wide options (e.g. a wet/dry\r\n * `mix`): add the field here and to {@link EFFECT_OPTION_KEYS} and every builder\r\n * picks it up.\r\n */\r\nexport type EffectOptions = ModedEffect;\r\n\r\n/**\r\n * The {@link EffectOptions} keys {@link withEffectOptions} copies onto a built\r\n * effect. `satisfies` keeps this in lockstep with the interface (mirroring\r\n * `TEXT_STYLE_KEYS`), and `withEffectOptions` iterates it rather than naming\r\n * fields, so adding an option here is the only edit needed.\r\n */\r\nexport const EFFECT_OPTION_KEYS = [\"mode\", \"clip\"] as const satisfies readonly (keyof EffectOptions)[];\r\n\r\n/**\r\n * Merge cross-cutting options onto a built effect, **skipping undefined keys**.\r\n *\r\n * Omitting rather than writing `undefined` matters: the per-effect `equals()`\r\n * implementations compare `mode` directly, so a spread that sets `mode:\r\n * undefined` is not equal to an effect that never set it at all.\r\n */\r\nexport function withEffectOptions<T extends object>(base: T, options?: EffectOptions): T & EffectOptions {\r\n const out = { ...base } as T & EffectOptions;\r\n if (!options) return out;\r\n for (const key of EFFECT_OPTION_KEYS) {\r\n const value = options[key];\r\n // Indexed write through a widened view: the keys no longer share one\r\n // value type (`mode` is an EffectMode, `clip` a boolean), so `out[key]`\r\n // narrows to their intersection — `never` — under a union key.\r\n if (value !== undefined) (out as Record<string, unknown>)[key] = value;\r\n }\r\n return out;\r\n}\r\n\r\n/**\r\n * Normalise a builder's single argument to its options object.\r\n *\r\n * Every effect builder takes exactly one parameter; those with a dominant\r\n * animated scalar also accept that scalar directly, so `blur(8)` and\r\n * `blur({ radius: 8 })` produce the same effect. `key` names the field a bare\r\n * number maps onto.\r\n */\r\nexport function scalarOptions<O extends object>(\r\n arg: number | O | undefined,\r\n key: keyof O,\r\n): Partial<O> & EffectOptions {\r\n if (arg === undefined) return {};\r\n if (typeof arg === \"number\") return { [key]: arg } as Partial<O> & EffectOptions;\r\n return arg;\r\n}\r\n\r\nexport interface EffectData<T> {\r\n /**\r\n * Linearly interpolates between two effect states.\r\n * @param from The starting state of the effect.\r\n * @param to The target state of the effect.\r\n * @param t The interpolation factor (usually a normalized value between 0 and 1).\r\n * @returns A new effect state representing the blended value.\r\n */\r\n lerp: (from: T, to: T, t: number) => T;\r\n\r\n /**\r\n * Compares two effect states for deep equality.\r\n * @param a The first effect state.\r\n * @param b The second effect state.\r\n * @returns True if the effects are structurally identical, otherwise false.\r\n */\r\n equals: (a: T, b: T) => boolean;\r\n\r\n /**\r\n * How a backend must realise this effect. Defaults to `\"filter\"`; effects\r\n * that resample pixel positions declare `\"shader\"`. Drives which render path\r\n * the effect takes — see {@link EffectSurface}.\r\n *\r\n * A predicate handles effects whose surface depends on their own fields —\r\n * a foreground shader composes as a filter, while the same effect in\r\n * backdrop mode resamples what is beneath it.\r\n */\r\n surface?: EffectSurface | ((effect: T) => EffectSurface);\r\n\r\n /**\r\n * Normalise an authored effect into the shape the rest of the pipeline\r\n * expects — the mirror of `FillData.resolve`, which a fill has and an effect\r\n * did not.\r\n *\r\n * Called once per property write, through `resolveChainEffects`, which is\r\n * the single funnel every effect reaches a node by (the `effects` prop's\r\n * mapper and `Graphics2D.effects`). That makes it the one place a stored\r\n * document can be migrated forward — an older spelling of a type or a field\r\n * is rewritten here rather than being understood separately by `lerp`,\r\n * `equals`, the surface predicate and the backend.\r\n *\r\n * **Return the effect unchanged when nothing needs rewriting.** It runs on\r\n * every write, so allocating a copy per call would churn for the\r\n * overwhelming majority of effects, which need no normalisation at all.\r\n */\r\n resolve?(effect: T): T;\r\n\r\n /**\r\n * An effect that samples a texture declares it here, as an image fill does:\r\n * an undeclared asset is a lookup the effect can only read as \"no texture\".\r\n */\r\n declare?(effect: T, assets: AssetScope): void;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"effect-data.js","sourceRoot":"","sources":["../../../../src/attributes/shape/effects/effect-data.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAmClD,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAAC,IAAgB;IAC9C,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAChC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAChC,KAAK,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;IAC7C,CAAC;AACL,CAAC;A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,OAAO,GAAG,CAAC;IACzB,KAAK,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,qEAAqE;QACrE,wEAAwE;QACxE,+DAA+D;QAC/D,IAAI,KAAK,KAAK,SAAS;YAAG,GAA+B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC3E,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CACzB,GAA2B,EAC3B,GAAY;IAEZ,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAgC,CAAC;IACjF,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { AssetScope } from \"@/assets/scope\";\nimport type { Color, NormalizedColor } from \"../fill/color/parser\";\nimport { parseColor } from \"../fill/color/parser\";\n\n/**\n * Which layer an effect runs on: the node's own content (`\"foreground\"`, the\n * default) or the **backdrop** — the content already painted beneath the node.\n * A backdrop effect is applied to whatever lies underneath the node and clipped\n * to the node's silhouette, so the node's own edges stay sharp (Figma-style).\n */\nexport type EffectMode = \"foreground\" | \"backdrop\";\n\n/**\n * How a backend must realise an effect.\n *\n * - `\"filter\"` (the default) — the effect transforms colours in place, so it\n * composes as a plain image filter alongside its neighbours in the chain.\n * - `\"shader\"` — the effect *resamples pixel positions* (warps, bands, or\n * otherwise reads neighbouring texels), so it needs the content snapshotted\n * into a texture and redrawn through a lens rather than composed.\n *\n * This is a statement about the effect, not about any particular backend: it\n * says the effect needs random access to its source, which is why it belongs\n * here next to `lerp`/`equals` rather than in the renderer.\n */\nexport type EffectSurface = \"filter\" | \"shader\";\n\n/**\n * Axis (or axes) an effect acts along.\n *\n * `\"both\"` (= `{ x: 1, y: 1 }`) uses the full 2D vector; `\"x\"`/`\"y\"` isolate a\n * single axis; a {@link Vector2} gives fractional control per axis. Shared by\n * every axis-selecting effect so `scatter` and `motionBlur` speak the same\n * vocabulary.\n */\nexport type EffectAxis = \"x\" | \"y\" | \"both\" | Vector2;\n\n/** Resolve an {@link EffectAxis} to its per-axis scale vector. */\nexport function resolveEffectAxis(axis: EffectAxis): Vector2 {\n switch (axis) {\n case \"x\": return { x: 1, y: 0 };\n case \"y\": return { x: 0, y: 1 };\n case \"both\": return { x: 1, y: 1 };\n default: return { x: axis.x, y: axis.y };\n }\n}\n\n/** Do two {@link EffectAxis} values resolve to the same scale vector? */\nexport function sameEffectAxis(a: EffectAxis, b: EffectAxis): boolean {\n const av = resolveEffectAxis(a);\n const bv = resolveEffectAxis(b);\n return av.x === bv.x && av.y === bv.y;\n}\n\n/**\n * Resolve a colour-valued effect option to its RGBA tuple.\n *\n * Colour options are stored **as authored** (a CSS string, a theme alias, or an\n * already-normalised tuple) rather than parsed at build time, so a raw effect\n * literal — `{ type: 'outline', color: 'primary', … }` — behaves exactly like the\n * builder form, and a theme alias still resolves against whatever `setTheme`\n * installed. Backends call this to get numbers; `lerp` calls it on both ends.\n */\nexport function resolveEffectColor(color: Color): NormalizedColor {\n return Array.isArray(color) ? color : parseColor(color);\n}\n\n/** Do two colour options resolve to the same RGBA? (`'red'` === `'#ff0000'`.) */\nexport function sameEffectColor(a: Color, b: Color): boolean {\n if (a === b) return true;\n const av = resolveEffectColor(a);\n const bv = resolveEffectColor(b);\n return av[0] === bv[0] && av[1] === bv[1] && av[2] === bv[2] && av[3] === bv[3];\n}\n\n/**\n * Mixin: every effect declares the layer it targets via {@link EffectMode}.\n * Omitted is treated as `\"foreground\"`. A single uniform field across all effects\n * means the backdrop/foreground classifier never has to branch on `type`.\n */\nexport interface ModedEffect {\n mode?: EffectMode;\n /**\n * Confine the effect's output to the alpha it was handed — the node's own\n * silhouette, rather than the rectangle its bleed would otherwise fill.\n *\n * Off (the default) a blur, bloom, outline or streak spreads *past* the\n * content that produced it, which is usually the point. On, the effect is\n * clipped back into the shape: a bloom that lights the node without\n * haloing the page around it, a blur that softens a fill without fraying its\n * edge — Figma's \"clip content\" applied to the effect rather than the layer.\n *\n * Honoured on both render paths — `EffectRegistry.compose` clips an\n * ImageFilter chain per effect, and `resolveForegroundCapture` blends a\n * shader effect's lens into the content it was given — so the flag means the\n * same thing whichever way an effect happens to be realised.\n *\n * Redundant in `mode: 'backdrop'`, where the effect is already confined to\n * the node's silhouette by definition.\n */\n clip?: boolean;\n}\n\n/**\n * Cross-cutting options accepted by every effect builder — the builder-side view\n * of {@link ModedEffect}. Each builder's own options type intersects this, so\n * `mode` is spelled the same way everywhere:\n *\n * Effects.blur({ radius: 8, mode: 'backdrop' })\n *\n * This is the extension point for future chain-wide options (e.g. a wet/dry\n * `mix`): add the field here and to {@link EFFECT_OPTION_KEYS} and every builder\n * picks it up.\n */\nexport type EffectOptions = ModedEffect;\n\n/**\n * The {@link EffectOptions} keys {@link withEffectOptions} copies onto a built\n * effect. `satisfies` keeps this in lockstep with the interface (mirroring\n * `TEXT_STYLE_KEYS`), and `withEffectOptions` iterates it rather than naming\n * fields, so adding an option here is the only edit needed.\n */\nexport const EFFECT_OPTION_KEYS = [\"mode\", \"clip\"] as const satisfies readonly (keyof EffectOptions)[];\n\n/**\n * Merge cross-cutting options onto a built effect, **skipping undefined keys**.\n *\n * Omitting rather than writing `undefined` matters: the per-effect `equals()`\n * implementations compare `mode` directly, so a spread that sets `mode:\n * undefined` is not equal to an effect that never set it at all.\n */\nexport function withEffectOptions<T extends object>(base: T, options?: EffectOptions): T & EffectOptions {\n const out = { ...base } as T & EffectOptions;\n if (!options) return out;\n for (const key of EFFECT_OPTION_KEYS) {\n const value = options[key];\n // Indexed write through a widened view: the keys no longer share one\n // value type (`mode` is an EffectMode, `clip` a boolean), so `out[key]`\n // narrows to their intersection — `never` — under a union key.\n if (value !== undefined) (out as Record<string, unknown>)[key] = value;\n }\n return out;\n}\n\n/**\n * Normalise a builder's single argument to its options object.\n *\n * Every effect builder takes exactly one parameter; those with a dominant\n * animated scalar also accept that scalar directly, so `blur(8)` and\n * `blur({ radius: 8 })` produce the same effect. `key` names the field a bare\n * number maps onto.\n */\nexport function scalarOptions<O extends object>(\n arg: number | O | undefined,\n key: keyof O,\n): Partial<O> & EffectOptions {\n if (arg === undefined) return {};\n if (typeof arg === \"number\") return { [key]: arg } as Partial<O> & EffectOptions;\n return arg;\n}\n\nexport interface EffectData<T> {\n /**\n * Linearly interpolates between two effect states.\n * @param from The starting state of the effect.\n * @param to The target state of the effect.\n * @param t The interpolation factor (usually a normalized value between 0 and 1).\n * @returns A new effect state representing the blended value.\n */\n lerp: (from: T, to: T, t: number) => T;\n\n /**\n * Compares two effect states for deep equality.\n * @param a The first effect state.\n * @param b The second effect state.\n * @returns True if the effects are structurally identical, otherwise false.\n */\n equals: (a: T, b: T) => boolean;\n\n /**\n * How a backend must realise this effect. Defaults to `\"filter\"`; effects\n * that resample pixel positions declare `\"shader\"`. Drives which render path\n * the effect takes — see {@link EffectSurface}.\n *\n * A predicate handles effects whose surface depends on their own fields —\n * a foreground shader composes as a filter, while the same effect in\n * backdrop mode resamples what is beneath it.\n */\n surface?: EffectSurface | ((effect: T) => EffectSurface);\n\n /**\n * Normalise an authored effect into the shape the rest of the pipeline\n * expects — the mirror of `FillData.resolve`, which a fill has and an effect\n * did not.\n *\n * Called once per property write, through `resolveChainEffects`, which is\n * the single funnel every effect reaches a node by (the `effects` prop's\n * mapper and `Graphics2D.effects`). That makes it the one place a stored\n * document can be migrated forward — an older spelling of a type or a field\n * is rewritten here rather than being understood separately by `lerp`,\n * `equals`, the surface predicate and the backend.\n *\n * **Return the effect unchanged when nothing needs rewriting.** It runs on\n * every write, so allocating a copy per call would churn for the\n * overwhelming majority of effects, which need no normalisation at all.\n */\n resolve?(effect: T): T;\n\n /**\n * An effect that samples a texture declares it here, as an image fill does:\n * an undeclared asset is a lookup the effect can only read as \"no texture\".\n */\n declare?(effect: T, assets: AssetScope): void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ascii.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/ascii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAsB/E,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAiC;IACxD,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,kBAAkB;CAC1B,CAAC;AAEF,6FAA6F;AAC7F,MAAM,UAAU,mBAAmB,CAAC,OAA8B;IAC9D,OAAO,cAAc,CAAC,OAAuB,CAAC,IAAI,OAAO,CAAC;AAC9D,CAAC;AAaD,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,6DAA6D;IAC7D,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,MAAM;IACd,gDAAgD;IAChD,OAAO,EAAE,IAAI;IACb,MAAM,EAAE;QACJ,wDAAwD;QACxD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACxF,gEAAgE;QAChE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAyB,CAAC;YACvC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;YACpC,YAAY,EAAE,cAAc;SAC/B,CAAC;QACF,mEAAmE;QACnE,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAChD,4CAA4C;QAC5C,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QACtC,6DAA6D;QAC7D,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAC7C,yEAAyE;QACzE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KAC7C;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"ascii.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/ascii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAsB/E,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAiC;IACxD,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,kBAAkB;CAC1B,CAAC;AAEF,6FAA6F;AAC7F,MAAM,UAAU,mBAAmB,CAAC,OAA8B;IAC9D,OAAO,cAAc,CAAC,OAAuB,CAAC,IAAI,OAAO,CAAC;AAC9D,CAAC;AAaD,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,6DAA6D;IAC7D,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,MAAM;IACd,gDAAgD;IAChD,OAAO,EAAE,IAAI;IACb,MAAM,EAAE;QACJ,wDAAwD;QACxD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACxF,gEAAgE;QAChE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAyB,CAAC;YACvC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;YACpC,YAAY,EAAE,cAAc;SAC/B,CAAC;QACF,mEAAmE;QACnE,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAChD,4CAA4C;QAC5C,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QACtC,6DAA6D;QAC7D,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAC7C,yEAAyE;QACzE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KAC7C;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\n/**\n * Built-in glyph ramps, each ordered **least ink first**: `charset[0]` stands in\n * for the darkest cells and the last entry for the lightest.\n *\n * That ordering is about the *result*, not the glyph. On the default white ink\n * over black, an empty cell is the darkest thing the effect can draw and a solid\n * one the brightest, so least-ink-first is exactly dark-to-light. Invert the ink\n * and background — black on white, the paper look — and the same ramp is used\n * back to front automatically, so a custom ramp only ever has to be written once.\n *\n * - `'standard'` — the classic ten-step ASCII ramp.\n * - `'blocks'` — Unicode shading blocks; the most legible at small cell sizes,\n * because each step really is a fixed fraction of coverage.\n * - `'braille'` — braille dot patterns, the finest ramp of the set.\n * - `'binary'` — just `0` and `1`: a two-tone cut rather than a ramp.\n * - `'hex'` — `0`–`F`, the hex-dump look. Its \"ramp\" is nominal, since a glyph's\n * ink doesn't track its digit, so expect texture rather than tone.\n */\nexport type AsciiCharset = \"standard\" | \"blocks\" | \"braille\" | \"binary\" | \"hex\";\n\n/** The ramp each named charset expands to. Exported so a backend needn't guess. */\nexport const ASCII_CHARSETS: Record<AsciiCharset, string> = {\n standard: \" .:-=+*#%@\",\n blocks: \" ░▒▓█\",\n braille: \" ⠄⣀⣄⣤⣶⣷⣿\",\n binary: \"01\",\n hex: \"0123456789ABCDEF\",\n};\n\n/** Resolve a charset option to its literal ramp; unknown names fall back to `'standard'`. */\nexport function resolveAsciiCharset(charset: AsciiCharset | string): string {\n return ASCII_CHARSETS[charset as AsciiCharset] ?? charset;\n}\n\n/**\n * ASCII art: the content is divided into a grid of cells, each cell's tone is\n * matched to a glyph, and that glyph is drawn in its place.\n *\n * The glyphs come from a texture baked once per charset/font/size — the first\n * effect to use the renderer's resource hook.\n */\nexport interface AsciiEffect extends ModedEffect, EffectFields<typeof asciiSpec.params> {\n type: \"ascii\";\n}\n\n/** The {@link AsciiEffect} spec: its parameters, defaults and ranges. */\nexport const asciiSpec = defineEffect({\n type: \"ascii\",\n group: \"stylize\",\n // Reads one texel per cell and a glyph texture alongside it.\n surface: \"shader\",\n scalar: \"size\",\n // Replaces the image with glyphs at every size.\n neutral: null,\n params: {\n /** Cell size in pixels — the width of one character. */\n size: param.number({ default: 12, min: 2, unit: \"px\", label: \"cellSize\", inline: true }),\n /** A named ramp, or a custom string ordered least-ink-first. */\n charset: param.of<AsciiCharset | string>()({\n kind: \"enum\",\n default: \"standard\",\n options: Object.keys(ASCII_CHARSETS),\n optionsLabel: \"asciiCharset\",\n }),\n /** Family the glyphs are baked in; a monospace face reads best. */\n fontFamily: param.text({ default: \"monospace\" }),\n /** Glyph colour when `colored` is false. */\n ink: param.color({ default: \"white\" }),\n /** Colour behind the glyphs (`'transparent'` to overlay). */\n background: param.color({ default: \"black\" }),\n /** Tint each glyph with its own cell's colour instead of using `ink`. */\n colored: param.boolean({ default: false }),\n },\n});\n\nexport const asciiEffect: EffectData<AsciiEffect> = effectDataOf(asciiSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bit-crush.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bit-crush.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AA4B/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,SAAS;IAChB,gFAAgF;IAChF,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,wDAAwD;QACxD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzE,uFAAuF;QACvF,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;QAC1I,8CAA8C;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;KAC1E;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAA+B,YAAY,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"bit-crush.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bit-crush.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AA4B/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,SAAS;IAChB,gFAAgF;IAChF,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,wDAAwD;QACxD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzE,uFAAuF;QACvF,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;QAC1I,8CAA8C;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;KAC1E;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAA+B,YAAY,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\n/**\n * A fixed hardware palette to snap colours to.\n *\n * - `'none'` — no palette; quantize each channel to `bits` instead.\n * - `'gameboy'` — the DMG's four greens.\n * - `'cga'` — IBM CGA palette 1 high-intensity (black, cyan, magenta, white).\n * - `'nes'` — a representative 16-colour cut of the NES master palette.\n */\nexport type BitCrushPalette = \"none\" | \"gameboy\" | \"cga\" | \"nes\";\n\n/**\n * Colour-depth reduction: either quantize each channel to `bits`, or snap every\n * pixel to its nearest entry in a fixed hardware palette.\n *\n * The distinction from `posterize` and `dither` is *which* colours survive.\n * Posterize keeps an evenly-spaced grid per channel; this can instead force an\n * arbitrary, uneven, historically-specific set — which is what actually makes\n * something look like a Game Boy rather than merely low-colour.\n *\n * Pairs naturally with `dither`: quantize here, and let an ordered dither carry\n * the error so gradients survive the palette cut.\n */\nexport interface BitCrushEffect extends ModedEffect, EffectFields<typeof bitCrushSpec.params> {\n type: \"bitCrush\";\n}\n\n/** The {@link BitCrushEffect} spec: its parameters, defaults and ranges. */\nexport const bitCrushSpec = defineEffect({\n type: \"bitCrush\",\n group: \"stylize\",\n // A palette search is per-pixel non-linear; no LUT colour filter in this build.\n surface: \"shader\",\n scalar: \"bits\",\n neutral: { amount: 0 },\n params: {\n /** Bits per channel when `palette` is `'none'`, 1–8. */\n bits: param.number({ default: 3, min: 1, max: 8, step: 1, inline: true }),\n /** Fixed hardware palette to snap to. A halfway palette is meaningless, so it cuts. */\n palette: param.choice([\"none\", \"gameboy\", \"cga\", \"nes\"] satisfies BitCrushPalette[], { default: \"none\", optionsLabel: \"bitCrushPalette\" }),\n /** 0–1 blend between original and crushed. */\n amount: param.number({ default: 1, min: 0, max: 1, control: \"slider\" }),\n },\n});\n\nexport const bitCrushEffect: EffectData<BitCrushEffect> = effectDataOf(bitCrushSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-displace.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/block-displace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAmB/E,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,gDAAgD;IAChD,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,kCAAkC;QAClC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACvE,4BAA4B;QAC5B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QAC1E,8CAA8C;QAC9C,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC1E,mEAAmE;QACnE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QAC3C,6BAA6B;QAC7B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;KACrF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAoC,YAAY,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"block-displace.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/block-displ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-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\n/**\n * Datamosh-style tearing: the content is cut into bands and each band is\n * displaced by a random amount.\n *\n * `density` is what separates this from noise — only that fraction of bands\n * move at all, so the image stays readable and the tear reads as a fault rather\n * than as static. Turn it to 1 and every band shifts.\n *\n * The displacement is a pure function of the band index and `seed`, so a frame\n * always re-renders identically. Animate `seed` (in whole steps) to make the\n * glitch jump between distinct states rather than sliding smoothly, which is\n * what makes it read as digital.\n */\nexport interface BlockDisplaceEffect extends ModedEffect, EffectFields<typeof blockDisplaceSpec.params> {\n type: \"blockDisplace\";\n}\n\n/** The {@link BlockDisplaceEffect} spec: its parameters, defaults and ranges. */\nexport const blockDisplaceSpec = defineEffect({\n type: \"blockDisplace\",\n group: \"glitch\",\n // Resamples the source at a displaced position.\n surface: \"shader\",\n scalar: \"amount\",\n neutral: { amount: 0 },\n params: {\n /** Maximum displacement in px. */\n amount: param.number({ default: 20, min: 0, unit: \"px\", inline: true }),\n /** Band thickness in px. */\n size: param.number({ default: 16, min: 1, unit: \"px\", label: \"bandSize\" }),\n /** 0–1 fraction of bands that move at all. */\n density: param.number({ default: 0.3, min: 0, max: 1, control: \"slider\" }),\n /** Random field offset — step it to jump between glitch states. */\n seed: param.number({ default: 0, step: 1 }),\n /** Which way bands slide. */\n axis: param.axis({ default: \"x\", label: \"direction\", optionsLabel: \"effectAxis\" }),\n },\n});\n\nexport const blockDisplaceEffect: EffectData<BlockDisplaceEffect> = effectDataOf(blockDisplaceSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bloom.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bloom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;IACzB,MAAM,EAAE;QACJ,mEAAmE;QACnE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC5E,wBAAwB;QACxB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACzD,8CAA8C;QAC9C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAC3F;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"bloom.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bloom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;IACzB,MAAM,EAAE;QACJ,mEAAmE;QACnE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC5E,wBAAwB;QACxB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACzD,8CAA8C;QAC9C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAC3F;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\nexport interface BloomEffect extends ModedEffect, EffectFields<typeof bloomSpec.params> {\n type: \"bloom\";\n}\n\n/** The {@link BloomEffect} spec: its parameters, defaults and ranges. */\nexport const bloomSpec = defineEffect({\n type: \"bloom\",\n group: \"light\",\n scalar: \"intensity\",\n neutral: { intensity: 0 },\n params: {\n /** 0–1 luminance cutoff — only pixels brighter than this bloom. */\n threshold: param.number({ default: 0.7, min: 0, max: 1, control: \"slider\" }),\n /** Spread in pixels. */\n radius: param.number({ default: 12, min: 0, unit: \"px\" }),\n /** Additive multiplier for the bloom pass. */\n intensity: param.number({ default: 1, min: 0, max: 3, control: \"slider\", inline: true }),\n },\n});\n\nexport const bloomEffect: EffectData<BloomEffect> = effectDataOf(bloomSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/blur.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,wEAAwE;AACxE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;IACjC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,6BAA6B;QAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;KACrG;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAA2B,YAAY,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/blur.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,wEAAwE;AACxE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;IACjC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,6BAA6B;QAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;KACrG;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAA2B,YAAY,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\nexport interface BlurEffect extends ModedEffect, EffectFields<typeof blurSpec.params> {\n type: \"blur\";\n}\n\n/** The {@link BlurEffect} spec: its parameters, defaults and ranges. */\nexport const blurSpec = defineEffect({\n type: \"blur\",\n group: \"blur\",\n scalar: \"radius\",\n neutral: { radius: 0 },\n params: {\n /** Blur spread in pixels. */\n radius: param.number({ default: 0, required: true, min: 0, unit: \"px\", inline: true, initial: 4 }),\n },\n});\n\nexport const blurEffect: EffectData<BlurEffect> = effectDataOf(blurSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulge.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bulge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAMvF,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,4DAA4D;IAC5D,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IACxB,MAAM,EAAE;QACJ,6EAA6E;QAC7E,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QACtH,uCAAuC;QACvC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;KAC/G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"bulge.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bulge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAMvF,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,4DAA4D;IAC5D,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IACxB,MAAM,EAAE;QACJ,6EAA6E;QAC7E,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QACtH,uCAAuC;QACvC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;KAC/G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA4B,YAAY,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { CENTER, defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\nexport interface BulgeEffect extends ModedEffect, EffectFields<typeof bulgeSpec.params> {\n type: \"bulge\";\n}\n\n/** The {@link BulgeEffect} spec: its parameters, defaults and ranges. */\nexport const bulgeSpec = defineEffect({\n type: \"bulge\",\n group: \"distort\",\n // Warps its source: samples a displaced texel per fragment.\n surface: \"shader\",\n scalar: \"strength\",\n neutral: { strength: 0 },\n params: {\n /** Positive bulges (barrel), negative pinches (pincushion). Range ≈ −1…1. */\n strength: param.number({ default: 0, required: true, min: -1, max: 1, control: \"slider\", inline: true, initial: 0.5 }),\n /** Lens centre in 0–1 layer coords. */\n center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: \"normalized\", label: \"lensCenter\" }),\n },\n});\n\nexport const bulgeEffect: EffectData<BulgeEffect> = effectDataOf(bulgeSpec);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;IAChD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,gDAAgD;QAChD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,iEAAiE;QACjE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KACnD;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAA0C,YAAY,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\
|
|
1
|
+
{"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;IAChD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,gDAAgD;QAChD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,iEAAiE;QACjE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KACnD;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAA0C,YAAY,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\n\nexport interface ChromaticAberrationEffect extends ModedEffect, EffectFields<typeof chromaticAberrationSpec.params> {\n type: \"chromaticAberration\";\n}\n\n/** The {@link ChromaticAberrationEffect} spec: its parameters, defaults and ranges. */\nexport const chromaticAberrationSpec = defineEffect({\n type: \"chromaticAberration\",\n group: \"glitch\",\n scalar: \"amount\",\n neutral: { amount: 0 },\n params: {\n /** Pixel offset distance for the R/B fringe. */\n amount: param.number({ default: 4, min: 0, unit: \"px\", inline: true }),\n /** Fringe axis in degrees — 0 = horizontal, R right / B left. */\n angle: param.number({ default: 0, unit: \"deg\" }),\n },\n});\n\nexport const chromaticAberrationEffect: EffectData<ChromaticAberrationEffect> = effectDataOf(chromaticAberrationSpec);\n"]}
|