@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +220 -0
- package/LICENSE +201 -201
- package/NOTICE +48 -0
- package/README.md +93 -72
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +79 -4
- 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.d.ts +3 -3
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +1 -1
- package/dist/attributes/audio/filters/chain.js.map +1 -1
- package/dist/attributes/audio/filters/curve.d.ts +8 -8
- package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
- package/dist/attributes/audio/filters/curve.js +20 -19
- package/dist/attributes/audio/filters/curve.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
- package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/filters/index.d.ts +1 -1
- package/dist/attributes/audio/filters/index.d.ts.map +1 -1
- package/dist/attributes/audio/filters/index.js +1 -1
- package/dist/attributes/audio/filters/index.js.map +1 -1
- package/dist/attributes/audio/filters/registry.js.map +1 -1
- package/dist/attributes/audio/filters/union.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +17 -2
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +4 -2
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +15 -8
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +4 -2
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -4
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/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/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.d.ts +3 -1
- package/dist/attributes/properties/decorator.d.ts.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.d.ts +9 -2
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +15 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.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.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +28 -120
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +16 -88
- 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.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
- 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.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.d.ts +15 -24
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- 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.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +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.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +15 -8
- 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.d.ts +2 -6
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +23 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +44 -10
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/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 +81 -44
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +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.d.ts +4 -10
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -13
- 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.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +2 -2
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +6 -7
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/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.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.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/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.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-FUZVFT3W.js +18 -0
- package/dist/browser/chunks/chunk-FUZVFT3W.js.map +7 -0
- package/dist/browser/chunks/chunk-QG6C23IJ.js +3 -0
- package/dist/browser/chunks/chunk-QG6C23IJ.js.map +7 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
- package/dist/browser/jsx-jsx-runtime.js +1 -1
- package/dist/browser/manifest.json +3 -2
- package/dist/browser/sdk.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/document/audio.d.ts +1 -1
- package/dist/document/audio.js +4 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +8 -14
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +1 -1
- package/dist/document/command-traits.js +13 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +2 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +19 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +70 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +2 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/registry.d.ts +17 -0
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +29 -2
- package/dist/document/registry.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +73 -18
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +192 -40
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +12 -12
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +2 -2
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +37 -31
- package/dist/document/validate.js.map +1 -1
- package/dist/document/withdraw.d.ts +28 -0
- package/dist/document/withdraw.d.ts.map +1 -0
- package/dist/document/withdraw.js +61 -0
- package/dist/document/withdraw.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +9 -1
- package/dist/jsx/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx/jsx-runtime.js +13 -3
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/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.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/nodes/2d/node-lifecycle.js.map +1 -1
- package/dist/nodes/2d/node-motion.js.map +1 -1
- package/dist/nodes/2d/node-render.d.ts +3 -3
- package/dist/nodes/2d/node-render.d.ts.map +1 -1
- package/dist/nodes/2d/node-render.js.map +1 -1
- package/dist/nodes/2d/node-transform.js.map +1 -1
- package/dist/nodes/2d/node2d.d.ts +115 -3
- package/dist/nodes/2d/node2d.d.ts.map +1 -1
- package/dist/nodes/2d/node2d.js +180 -28
- package/dist/nodes/2d/node2d.js.map +1 -1
- package/dist/nodes/2d/paint-node.d.ts +27 -0
- package/dist/nodes/2d/paint-node.d.ts.map +1 -1
- package/dist/nodes/2d/paint-node.js +42 -0
- package/dist/nodes/2d/paint-node.js.map +1 -1
- package/dist/nodes/audio/audio-bus.js.map +1 -1
- package/dist/nodes/audio/index.js.map +1 -1
- package/dist/nodes/audio/node-audio.js.map +1 -1
- package/dist/nodes/audio/sound-node.d.ts +2 -2
- package/dist/nodes/audio/sound-node.d.ts.map +1 -1
- package/dist/nodes/audio/sound-node.js +1 -1
- package/dist/nodes/audio/sound-node.js.map +1 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
- package/dist/nodes/geometry/bounds-shape-node.js +2 -2
- package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
- package/dist/nodes/geometry/box-path-node.d.ts +3 -3
- package/dist/nodes/geometry/box-path-node.js +2 -2
- package/dist/nodes/geometry/box-path-node.js.map +1 -1
- package/dist/nodes/geometry/ellipse-node.js.map +1 -1
- package/dist/nodes/geometry/group-bounds.d.ts +2 -2
- package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
- package/dist/nodes/geometry/group-bounds.js +1 -2
- package/dist/nodes/geometry/group-bounds.js.map +1 -1
- package/dist/nodes/geometry/path-node.d.ts.map +1 -1
- package/dist/nodes/geometry/path-node.js +6 -0
- package/dist/nodes/geometry/path-node.js.map +1 -1
- package/dist/nodes/geometry/polygon-node.js.map +1 -1
- package/dist/nodes/geometry/polygram-node.js.map +1 -1
- package/dist/nodes/geometry/rect-node.js.map +1 -1
- package/dist/nodes/geometry/shape-node.js.map +1 -1
- package/dist/nodes/geometry/shape-outline.d.ts +2 -2
- package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
- package/dist/nodes/geometry/shape-outline.js +2 -13
- package/dist/nodes/geometry/shape-outline.js.map +1 -1
- package/dist/nodes/index.d.ts +3 -8
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +3 -8
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/layout/camera-node.d.ts +9 -0
- package/dist/nodes/layout/camera-node.d.ts.map +1 -1
- package/dist/nodes/layout/camera-node.js +38 -3
- package/dist/nodes/layout/camera-node.js.map +1 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
- package/dist/nodes/layout/orbit-camera-node.js +1 -1
- package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
- package/dist/nodes/layout/rotated-box.js.map +1 -1
- package/dist/nodes/media/video-node.d.ts.map +1 -1
- package/dist/nodes/media/video-node.js +2 -0
- package/dist/nodes/media/video-node.js.map +1 -1
- package/dist/nodes/node/declare-paints.js.map +1 -1
- package/dist/nodes/node/node-editor-state.js.map +1 -1
- package/dist/nodes/node/node-reactive.js.map +1 -1
- package/dist/nodes/node/node-time.d.ts +3 -3
- package/dist/nodes/node/node-time.d.ts.map +1 -1
- package/dist/nodes/node/node-time.js +1 -1
- package/dist/nodes/node/node-time.js.map +1 -1
- package/dist/nodes/node/node-walk.js.map +1 -1
- package/dist/nodes/node/node.d.ts +5 -3
- package/dist/nodes/node/node.d.ts.map +1 -1
- package/dist/nodes/node/node.js +44 -19
- package/dist/nodes/node/node.js.map +1 -1
- package/dist/nodes/node/text-defaults.d.ts +10 -12
- package/dist/nodes/node/text-defaults.d.ts.map +1 -1
- package/dist/nodes/node/text-defaults.js +10 -12
- package/dist/nodes/node/text-defaults.js.map +1 -1
- package/dist/nodes/{scene → root}/canvas2d-node.d.ts +2 -2
- package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
- package/dist/nodes/{scene → root}/canvas2d-node.js +2 -2
- package/dist/nodes/root/canvas2d-node.js.map +1 -0
- package/dist/nodes/root/provider-node.d.ts.map +1 -0
- package/dist/nodes/root/provider-node.js.map +1 -0
- package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
- package/dist/nodes/root/theme-provider-node.js.map +1 -0
- package/dist/nodes/text/default-text-style-node.d.ts +5 -2
- package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
- package/dist/nodes/text/default-text-style-node.js +10 -4
- package/dist/nodes/text/default-text-style-node.js.map +1 -1
- package/dist/nodes/text/number-format.d.ts +1 -1
- package/dist/nodes/text/number-format.js +1 -1
- package/dist/nodes/text/number-format.js.map +1 -1
- package/dist/nodes/text/number-node.js.map +1 -1
- package/dist/nodes/text/number-pattern.js.map +1 -1
- package/dist/nodes/text/richtext-node.js +1 -1
- package/dist/nodes/text/richtext-node.js.map +1 -1
- package/dist/nodes/text/text-base.d.ts.map +1 -1
- package/dist/nodes/text/text-base.js +1 -1
- package/dist/nodes/text/text-base.js.map +1 -1
- package/dist/nodes/text/text-node.js.map +1 -1
- package/dist/nodes/text/text-selection.js.map +1 -1
- package/dist/nodes/three/camera-nodes.d.ts +21 -3
- package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
- package/dist/nodes/three/camera-nodes.js +42 -1
- package/dist/nodes/three/camera-nodes.js.map +1 -1
- package/dist/nodes/three/canvas3d-node.d.ts +29 -6
- package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
- package/dist/nodes/three/canvas3d-node.js +44 -2
- package/dist/nodes/three/canvas3d-node.js.map +1 -1
- package/dist/nodes/three/drawable-nodes.d.ts +25 -11
- package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
- package/dist/nodes/three/drawable-nodes.js +43 -13
- package/dist/nodes/three/drawable-nodes.js.map +1 -1
- package/dist/nodes/three/environment-nodes.d.ts +9 -3
- package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
- package/dist/nodes/three/environment-nodes.js.map +1 -1
- package/dist/nodes/three/geometry-nodes.d.ts +2 -2
- package/dist/nodes/three/geometry-nodes.js +2 -2
- package/dist/nodes/three/geometry-nodes.js.map +1 -1
- package/dist/nodes/three/grid-geometry3d.js.map +1 -1
- package/dist/nodes/three/group3d.js.map +1 -1
- package/dist/nodes/three/light-nodes.d.ts.map +1 -1
- package/dist/nodes/three/light-nodes.js +3 -3
- package/dist/nodes/three/light-nodes.js.map +1 -1
- package/dist/nodes/three/mesh3d.js.map +1 -1
- package/dist/nodes/three/node3d.d.ts +48 -0
- package/dist/nodes/three/node3d.d.ts.map +1 -1
- package/dist/nodes/three/node3d.js +53 -3
- package/dist/nodes/three/node3d.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +2 -2
- package/dist/render/canvas-render-context2d.d.ts.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/latex.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.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.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.d.ts +2 -2
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.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.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +8 -4
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +18 -10
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/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.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -0
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +39 -6
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +9 -0
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +18 -1
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +27 -0
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.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.d.ts +5 -3
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +10 -6
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +9 -0
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +19 -0
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -0
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +44 -3
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +118 -3
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +2 -1
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +5 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +31 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +63 -6
- 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.d.ts +9 -7
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +12 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +1 -1
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +19 -15
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +11 -6
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +2 -0
- package/dist/tween/command-decorator.d.ts.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.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +15 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +37 -0
- package/dist/tween/ease/describe.js.map +1 -0
- 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.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/seekable.d.ts +1 -1
- package/dist/tween/seekable.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.d.ts +1 -1
- package/dist/util/metrics.js +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 +2 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
- package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
- package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
- package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/provider-node.js +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
|
@@ -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;AAED,yEAAyE;AACzE,MAAM,UAAU,cAAc,CAAC,CAAa,EAAE,CAAa;IACvD,MAAM,EAAE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AAM,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 `sksl` overlay 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
|
+
{"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2\";\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 `sksl` overlay 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"]}
|
|
@@ -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,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAChG,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,eAAe,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;QAC7B,eAAe,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;QAC3C,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,6DAA6D;IAC7D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\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 {\n type: \"ascii\";\n /** Cell size in px — the width of one character. */\n size: number;\n /** A named ramp, or a custom string ordered least-ink-first. */\n charset: AsciiCharset | string;\n /** Family the glyphs are baked in. Best results from a monospace face. */\n fontFamily: string;\n /** Colour of the glyphs when `colored` is false. */\n ink: Color;\n /** Colour behind the glyphs. Fully transparent leaves the backdrop showing. */\n background: Color;\n /** Tint each glyph with its own cell's colour instead of using `ink`. */\n colored: boolean;\n}\n\nexport const asciiEffect: EffectData<AsciiEffect> = {\n lerp: (from, to, t) => ({\n type: \"ascii\",\n size: lerpNumber(from.size, to.size, t),\n // A charset, a family and the colour mode are all discrete — snap.\n charset: t < 0.5 ? from.charset : to.charset,\n fontFamily: t < 0.5 ? from.fontFamily : to.fontFamily,\n ink: lerpColor(resolveEffectColor(from.ink), resolveEffectColor(to.ink), t),\n background: lerpColor(resolveEffectColor(from.background), resolveEffectColor(to.background), t),\n colored: t < 0.5 ? from.colored : to.colored,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.size === b.size &&\n a.charset === b.charset &&\n a.fontFamily === b.fontFamily &&\n sameEffectColor(a.ink, b.ink) &&\n sameEffectColor(a.background, b.background) &&\n a.colored === b.colored &&\n a.mode === b.mode,\n // Reads one texel per cell and a glyph texture alongside it.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ascii.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/ascii.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAsBrE,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;AAyBD,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,mEAAmE;QACnE,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC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import type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\r\n\r\n/**\r\n * Built-in glyph ramps, each ordered **least ink first**: `charset[0]` stands in\r\n * for the darkest cells and the last entry for the lightest.\r\n *\r\n * That ordering is about the *result*, not the glyph. On the default white ink\r\n * over black, an empty cell is the darkest thing the effect can draw and a solid\r\n * one the brightest, so least-ink-first is exactly dark-to-light. Invert the ink\r\n * and background — black on white, the paper look — and the same ramp is used\r\n * back to front automatically, so a custom ramp only ever has to be written once.\r\n *\r\n * - `'standard'` — the classic ten-step ASCII ramp.\r\n * - `'blocks'` — Unicode shading blocks; the most legible at small cell sizes,\r\n * because each step really is a fixed fraction of coverage.\r\n * - `'braille'` — braille dot patterns, the finest ramp of the set.\r\n * - `'binary'` — just `0` and `1`: a two-tone cut rather than a ramp.\r\n * - `'hex'` — `0`–`F`, the hex-dump look. Its \"ramp\" is nominal, since a glyph's\r\n * ink doesn't track its digit, so expect texture rather than tone.\r\n */\r\nexport type AsciiCharset = \"standard\" | \"blocks\" | \"braille\" | \"binary\" | \"hex\";\r\n\r\n/** The ramp each named charset expands to. Exported so a backend needn't guess. */\r\nexport const ASCII_CHARSETS: Record<AsciiCharset, string> = {\r\n standard: \" .:-=+*#%@\",\r\n blocks: \" ░▒▓█\",\r\n braille: \" ⠄⣀⣄⣤⣶⣷⣿\",\r\n binary: \"01\",\r\n hex: \"0123456789ABCDEF\",\r\n};\r\n\r\n/** Resolve a charset option to its literal ramp; unknown names fall back to `'standard'`. */\r\nexport function resolveAsciiCharset(charset: AsciiCharset | string): string {\r\n return ASCII_CHARSETS[charset as AsciiCharset] ?? charset;\r\n}\r\n\r\n/**\r\n * ASCII art: the content is divided into a grid of cells, each cell's tone is\r\n * matched to a glyph, and that glyph is drawn in its place.\r\n *\r\n * The glyphs come from a texture baked once per charset/font/size — the first\r\n * effect to use the renderer's resource hook.\r\n */\r\nexport interface AsciiEffect extends ModedEffect {\r\n type: \"ascii\";\r\n /** Cell size in px — the width of one character. */\r\n size: number;\r\n /** A named ramp, or a custom string ordered least-ink-first. */\r\n charset: AsciiCharset | string;\r\n /** Family the glyphs are baked in. Best results from a monospace face. */\r\n fontFamily: string;\r\n /** Colour of the glyphs when `colored` is false. */\r\n ink: Color;\r\n /** Colour behind the glyphs. Fully transparent leaves the backdrop showing. */\r\n background: Color;\r\n /** Tint each glyph with its own cell's colour instead of using `ink`. */\r\n colored: boolean;\r\n}\r\n\r\nexport const asciiEffect: EffectData<AsciiEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"ascii\",\r\n size: lerpNumber(from.size, to.size, t),\r\n // A charset, a family and the colour mode are all discrete — snap.\r\n charset: t < 0.5 ? from.charset : to.charset,\r\n fontFamily: t < 0.5 ? from.fontFamily : to.fontFamily,\r\n ink: lerpColor(resolveEffectColor(from.ink), resolveEffectColor(to.ink), t),\r\n background: lerpColor(resolveEffectColor(from.background), resolveEffectColor(to.background), t),\r\n colored: t < 0.5 ? from.colored : to.colored,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.size === b.size &&\r\n a.charset === b.charset &&\r\n a.fontFamily === b.fontFamily &&\r\n sameEffectColor(a.ink, b.ink) &&\r\n sameEffectColor(a.background, b.background) &&\r\n a.colored === b.colored &&\r\n a.mode === b.mode,\r\n // Reads one texel per cell and a glyph texture alongside it.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bit-crush.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bit-crush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmC1C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,4EAA4E;QAC5E,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gFAAgF;IAChF,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\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 {\n type: \"bitCrush\";\n /** Bits per channel when `palette` is `'none'` (1–8). */\n bits: number;\n /** Fixed palette to snap to, or `'none'` to use `bits`. */\n palette: BitCrushPalette;\n /** 0–1 blend between the original colour and the crushed one. */\n amount: number;\n}\n\nexport const bitCrushEffect: EffectData<BitCrushEffect> = {\n lerp: (from, to, t) => ({\n type: \"bitCrush\",\n bits: lerpNumber(from.bits, to.bits, t),\n // A halfway palette is meaningless — snap, and let `amount` carry the fade.\n palette: t < 0.5 ? from.palette : to.palette,\n amount: lerpNumber(from.amount, to.amount, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.bits === b.bits &&\n a.palette === b.palette &&\n a.amount === b.amount &&\n a.mode === b.mode,\n // A palette search is per-pixel non-linear; no LUT colour filter in this build.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"bit-crush.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bit-crush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmC1C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,4EAA4E;QAC5E,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gFAAgF;IAChF,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * A fixed hardware palette to snap colours to.\r\n *\r\n * - `'none'` — no palette; quantize each channel to `bits` instead.\r\n * - `'gameboy'` — the DMG's four greens.\r\n * - `'cga'` — IBM CGA palette 1 high-intensity (black, cyan, magenta, white).\r\n * - `'nes'` — a representative 16-colour cut of the NES master palette.\r\n */\r\nexport type BitCrushPalette = \"none\" | \"gameboy\" | \"cga\" | \"nes\";\r\n\r\n/**\r\n * Colour-depth reduction: either quantize each channel to `bits`, or snap every\r\n * pixel to its nearest entry in a fixed hardware palette.\r\n *\r\n * The distinction from `posterize` and `dither` is *which* colours survive.\r\n * Posterize keeps an evenly-spaced grid per channel; this can instead force an\r\n * arbitrary, uneven, historically-specific set — which is what actually makes\r\n * something look like a Game Boy rather than merely low-colour.\r\n *\r\n * Pairs naturally with `dither`: quantize here, and let an ordered dither carry\r\n * the error so gradients survive the palette cut.\r\n */\r\nexport interface BitCrushEffect extends ModedEffect {\r\n type: \"bitCrush\";\r\n /** Bits per channel when `palette` is `'none'` (1–8). */\r\n bits: number;\r\n /** Fixed palette to snap to, or `'none'` to use `bits`. */\r\n palette: BitCrushPalette;\r\n /** 0–1 blend between the original colour and the crushed one. */\r\n amount: number;\r\n}\r\n\r\nexport const bitCrushEffect: EffectData<BitCrushEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"bitCrush\",\r\n bits: lerpNumber(from.bits, to.bits, t),\r\n // A halfway palette is meaningless — snap, and let `amount` carry the fade.\r\n palette: t < 0.5 ? from.palette : to.palette,\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.bits === b.bits &&\r\n a.palette === b.palette &&\r\n a.amount === b.amount &&\r\n a.mode === b.mode,\r\n // A palette search is per-pixel non-linear; no LUT colour filter in this build.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-displace.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/block-displace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6BhD,MAAM,CAAC,MAAM,mBAAmB,GAAoC;IAChE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;QACnC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData, EffectAxis } from \"../effect-data\";\nimport { sameEffectAxis } from \"../effect-data\";\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 {\n type: \"blockDisplace\";\n /** Maximum displacement in px. 0 = off. */\n amount: number;\n /** Band thickness in px. */\n size: number;\n /** 0–1 fraction of bands that move at all. */\n density: number;\n /** Random field offset — step it to jump between glitch states. */\n seed: number;\n /** Which way bands slide, and how they are cut: `'x'` = horizontal tears. */\n axis: EffectAxis;\n}\n\nexport const blockDisplaceEffect: EffectData<BlockDisplaceEffect> = {\n lerp: (from, to, t) => ({\n type: \"blockDisplace\",\n amount: lerpNumber(from.amount, to.amount, t),\n size: lerpNumber(from.size, to.size, t),\n density: lerpNumber(from.density, to.density, t),\n seed: lerpNumber(from.seed, to.seed, t),\n axis: t < 0.5 ? from.axis : to.axis,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.amount === b.amount &&\n a.size === b.size &&\n a.density === b.density &&\n a.seed === b.seed &&\n sameEffectAxis(a.axis, b.axis) &&\n a.mode === b.mode,\n // Resamples the source at a displaced position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"block-displace.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/block-displace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6BhD,MAAM,CAAC,MAAM,mBAAmB,GAAoC;IAChE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;QACnC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData, EffectAxis } from \"../effect-data\";\r\nimport { sameEffectAxis } from \"../effect-data\";\r\n\r\n/**\r\n * Datamosh-style tearing: the content is cut into bands and each band is\r\n * displaced by a random amount.\r\n *\r\n * `density` is what separates this from noise — only that fraction of bands\r\n * move at all, so the image stays readable and the tear reads as a fault rather\r\n * than as static. Turn it to 1 and every band shifts.\r\n *\r\n * The displacement is a pure function of the band index and `seed`, so a frame\r\n * always re-renders identically. Animate `seed` (in whole steps) to make the\r\n * glitch jump between distinct states rather than sliding smoothly, which is\r\n * what makes it read as digital.\r\n */\r\nexport interface BlockDisplaceEffect extends ModedEffect {\r\n type: \"blockDisplace\";\r\n /** Maximum displacement in px. 0 = off. */\r\n amount: number;\r\n /** Band thickness in px. */\r\n size: number;\r\n /** 0–1 fraction of bands that move at all. */\r\n density: number;\r\n /** Random field offset — step it to jump between glitch states. */\r\n seed: number;\r\n /** Which way bands slide, and how they are cut: `'x'` = horizontal tears. */\r\n axis: EffectAxis;\r\n}\r\n\r\nexport const blockDisplaceEffect: EffectData<BlockDisplaceEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"blockDisplace\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n size: lerpNumber(from.size, to.size, t),\r\n density: lerpNumber(from.density, to.density, t),\r\n seed: lerpNumber(from.seed, to.seed, t),\r\n axis: t < 0.5 ? from.axis : to.axis,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.amount === b.amount &&\r\n a.size === b.size &&\r\n a.density === b.density &&\r\n a.seed === b.seed &&\r\n sameEffectAxis(a.axis, b.axis) &&\r\n a.mode === b.mode,\r\n // Resamples the source at a displaced position.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bloom.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bloom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC7H,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface BloomEffect extends ModedEffect {\n type: \"bloom\";\n /** 0–1: luminance cutoff — pixels below this threshold don't contribute to the bloom. */\n threshold: number;\n /** Blur spread radius in pixels. */\n radius: number;\n /** Additive multiplier for the bloom pass (default 1). */\n intensity: number;\n}\n\nexport const bloomEffect: EffectData<BloomEffect> = {\n lerp: (from, to, t) => ({\n type: \"bloom\",\n threshold: lerpNumber(from.threshold, to.threshold, t),\n radius: lerpNumber(from.radius, to.radius, t),\n intensity: lerpNumber(from.intensity, to.intensity, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.threshold === b.threshold && a.radius === b.radius && a.intensity === b.intensity && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"bloom.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bloom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC7H,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface BloomEffect extends ModedEffect {\r\n type: \"bloom\";\r\n /** 0–1: luminance cutoff — pixels below this threshold don't contribute to the bloom. */\r\n threshold: number;\r\n /** Blur spread radius in pixels. */\r\n radius: number;\r\n /** Additive multiplier for the bloom pass (default 1). */\r\n intensity: number;\r\n}\r\n\r\nexport const bloomEffect: EffectData<BloomEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"bloom\",\r\n threshold: lerpNumber(from.threshold, to.threshold, t),\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n intensity: lerpNumber(from.intensity, to.intensity, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.threshold === b.threshold && a.radius === b.radius && a.intensity === b.intensity && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAA2B;IAC9C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAC7H,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC/D,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface BlurEffect extends ModedEffect {\n type: \"blur\";\n /** Blur spread in pixels. */\n radius: number;\n}\n\nexport const blurEffect: EffectData<BlurEffect> = {\n lerp: (from, to, t) => ({ type: \"blur\", radius: lerpNumber(from.radius, to.radius, t), mode: t < 0.5 ? from.mode : to.mode }),\n equals: (a, b) => a.radius === b.radius && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAA2B;IAC9C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAC7H,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC/D,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface BlurEffect extends ModedEffect {\r\n type: \"blur\";\r\n /** Blur spread in pixels. */\r\n radius: number;\r\n}\r\n\r\nexport const blurEffect: EffectData<BlurEffect> = {\r\n lerp: (from, to, t) => ({ type: \"blur\", radius: lerpNumber(from.radius, to.radius, t), mode: t < 0.5 ? from.mode : to.mode }),\r\n equals: (a, b) => a.radius === b.radius && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulge.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bulge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4DAA4D;IAC5D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpVector2, Vector2 } from \"@/attributes/layout/vector2\";\nimport { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface BulgeEffect extends ModedEffect {\n type: \"bulge\";\n /**\n * Distortion amount: positive bulges the centre outward (barrel), negative\n * pinches it inward (pincushion). Edges stay pinned. Sensible range ≈ −1…1.\n */\n strength: number;\n /** Lens centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */\n center: Vector2;\n}\n\nexport const bulgeEffect: EffectData<BulgeEffect> = {\n lerp: (from, to, t) => ({\n type: \"bulge\",\n strength: lerpNumber(from.strength, to.strength, t),\n center: lerpVector2(from.center, to.center, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.strength === b.strength &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.mode === b.mode,\n // Warps its source: samples a displaced texel per fragment.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"bulge.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/bulge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4DAA4D;IAC5D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpVector2, Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface BulgeEffect extends ModedEffect {\r\n type: \"bulge\";\r\n /**\r\n * Distortion amount: positive bulges the centre outward (barrel), negative\r\n * pinches it inward (pincushion). Edges stay pinned. Sensible range ≈ −1…1.\r\n */\r\n strength: number;\r\n /** Lens centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */\r\n center: Vector2;\r\n}\r\n\r\nexport const bulgeEffect: EffectData<BulgeEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"bulge\",\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n center: lerpVector2(from.center, to.center, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.strength === b.strength &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.mode === b.mode,\r\n // Warps its source: samples a displaced texel per fragment.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,MAAM,CAAC,MAAM,yBAAyB,GAA0C;IAC5E,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface ChromaticAberrationEffect extends ModedEffect {\n type: \"chromaticAberration\";\n /** Pixel offset distance for the R/B channel fringe. */\n amount: number;\n /** Angle in degrees — 0 = horizontal split (R left, B right). */\n angle: number;\n}\n\nexport const chromaticAberrationEffect: EffectData<ChromaticAberrationEffect> = {\n lerp: (from, to, t) => ({\n type: \"chromaticAberration\",\n amount: lerpNumber(from.amount, to.amount, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.amount === b.amount && a.angle === b.angle && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,MAAM,CAAC,MAAM,yBAAyB,GAA0C;IAC5E,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface ChromaticAberrationEffect extends ModedEffect {\r\n type: \"chromaticAberration\";\r\n /** Pixel offset distance for the R/B channel fringe. */\r\n amount: number;\r\n /** Angle in degrees — 0 = horizontal split (R left, B right). */\r\n angle: number;\r\n}\r\n\r\nexport const chromaticAberrationEffect: EffectData<ChromaticAberrationEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"chromaticAberration\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.amount === b.amount && a.angle === b.angle && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
2
|
/**
|
|
3
|
-
* Photographic tonal and colour adjustments as a **
|
|
3
|
+
* Photographic tonal and colour adjustments as a **node effect** — the grading
|
|
4
4
|
* panel `Adjustments.colorAdjustment` gives an image fill, now available on any
|
|
5
5
|
* node. All fields are optional and default to neutral.
|
|
6
6
|
*
|
|
7
7
|
* Shares its type name and renderer handler with `ColorAdjustmentFilter` (the
|
|
8
8
|
* media-fill filter) with one deliberate difference: no `vignette` field. That
|
|
9
9
|
* knob was never implemented on the filter — a vignette needs each pixel's
|
|
10
|
-
* position, which a colour matrix does not have — so the
|
|
10
|
+
* position, which a colour matrix does not have — so the node effect leaves it
|
|
11
11
|
* out and `Effects.vignette()` provides the real thing.
|
|
12
12
|
*/
|
|
13
13
|
export interface ColorAdjustmentEffect extends ModedEffect {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-adjustment.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA2C1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,U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AAC,UAAU;QAC7B,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Photographic tonal and colour adjustments as a **
|
|
1
|
+
{"version":3,"file":"color-adjustment.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA2C1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9C,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,CAAC;QACtE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Photographic tonal and colour adjustments as a **node effect** — the grading\r\n * panel `Adjustments.colorAdjustment` gives an image fill, now available on any\r\n * node. All fields are optional and default to neutral.\r\n *\r\n * Shares its type name and renderer handler with `ColorAdjustmentFilter` (the\r\n * media-fill filter) with one deliberate difference: no `vignette` field. That\r\n * knob was never implemented on the filter — a vignette needs each pixel's\r\n * position, which a colour matrix does not have — so the node effect leaves it\r\n * out and `Effects.vignette()` provides the real thing.\r\n */\r\nexport interface ColorAdjustmentEffect extends ModedEffect {\r\n type: \"colorAdjustment\";\r\n /** −1…1 (0 = unchanged). Shifts overall lightness without clipping the way exposure does. */\r\n brightness?: number;\r\n /** 0…2 (1 = unchanged). Spreads highlights and shadows further apart. */\r\n contrast?: number;\r\n /** 0…3 (1 = unchanged). Scales colour saturation uniformly. */\r\n saturation?: number;\r\n /**\r\n * Hue rotation in **degrees** (0 = unchanged). Wraps, so a linear tween over\r\n * 360 cycles the whole wheel and lands back where it started.\r\n *\r\n * The luma-preserving rotation, so shifting hue does not also change how\r\n * light anything reads — unlike `invert({ channel: 'hue' })`, which is the\r\n * fixed 180° case of this and stays for symmetry with the other inversions.\r\n */\r\n hue?: number;\r\n /** −1…1 (0 = unchanged). Boosts muted colours more than already-vivid ones. */\r\n vibrance?: number;\r\n /** −1…1 (0 = unchanged). Lifts or crushes the shadow end. */\r\n shadows?: number;\r\n /** −1…1 (0 = unchanged). Brightens or rolls off the highlight end. */\r\n highlights?: number;\r\n /** −1…1 (0 = unchanged). Negative = cool/blue, positive = warm/orange. */\r\n temperature?: number;\r\n /** −1…1 (0 = unchanged). Negative = green, positive = magenta. */\r\n tint?: number;\r\n}\r\n\r\nexport const colorAdjustmentEffect: EffectData<ColorAdjustmentEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"colorAdjustment\",\r\n brightness: lerpNumber(from.brightness ?? 0, to.brightness ?? 0, t),\r\n contrast: lerpNumber(from.contrast ?? 1, to.contrast ?? 1, t),\r\n saturation: lerpNumber(from.saturation ?? 1, to.saturation ?? 1, t),\r\n hue: lerpNumber(from.hue ?? 0, to.hue ?? 0, t),\r\n vibrance: lerpNumber(from.vibrance ?? 0, to.vibrance ?? 0, t),\r\n shadows: lerpNumber(from.shadows ?? 0, to.shadows ?? 0, t),\r\n highlights: lerpNumber(from.highlights ?? 0, to.highlights ?? 0, t),\r\n temperature: lerpNumber(from.temperature ?? 0, to.temperature ?? 0, t),\r\n tint: lerpNumber(from.tint ?? 0, to.tint ?? 0, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.brightness === b.brightness &&\r\n a.contrast === b.contrast &&\r\n a.saturation === b.saturation &&\r\n a.hue === b.hue &&\r\n a.vibrance === b.vibrance &&\r\n a.shadows === b.shadows &&\r\n a.highlights === b.highlights &&\r\n a.temperature === b.temperature &&\r\n a.tint === b.tint &&\r\n a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
2
|
import type { CurvesChannel } from "../../filters/implementations/curves.js";
|
|
3
3
|
/**
|
|
4
|
-
* Tone curve as a **
|
|
4
|
+
* Tone curve as a **node effect** — the same adjustment `Adjustments.curves`
|
|
5
5
|
* applies to a photo, now available on any node, so a group of shapes or a text
|
|
6
6
|
* block can be graded the same way.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,2EAA2E;IAC3E,uDAAuD;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAqB,CAAC;QAC5E,CAAC,CAAC;QACF,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;QACnC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnF,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,uEAAuE;IACvE,0DAA0D;IAC1D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\nimport type { CurvesChannel } from \"../../filters/implementations/curves\";\n\n/**\n * Tone curve as a **
|
|
1
|
+
{"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,2EAA2E;IAC3E,uDAAuD;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAqB,CAAC;QAC5E,CAAC,CAAC;QACF,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;QACnC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnF,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,uEAAuE;IACvE,0DAA0D;IAC1D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport type { CurvesChannel } from \"../../filters/implementations/curves\";\r\n\r\n/**\r\n * Tone curve as a **node effect** — the same adjustment `Adjustments.curves`\r\n * applies to a photo, now available on any node, so a group of shapes or a text\r\n * block can be graded the same way.\r\n *\r\n * Shares its type name, fields and renderer handler with {@link CurvesFilter}\r\n * (the media-fill filter); the only difference is the `mode` flag every scene\r\n * effect carries. Keeping them one implementation is deliberate — a curve should\r\n * not mean two different things depending on what it is attached to.\r\n */\r\nexport interface CurvesEffect extends ModedEffect {\r\n type: \"curves\";\r\n /** Curve control points as `[input, output]` pairs in 0–1. */\r\n points: [number, number][];\r\n /** Channel(s) the curve applies to (default `'rgb'`). */\r\n channel?: CurvesChannel;\r\n}\r\n\r\nexport const curvesEffect: EffectData<CurvesEffect> = {\r\n // Mirrors `curvesFilter.lerp`: points move pairwise, the channel hard-cuts\r\n // because an intermediate channel name is meaningless.\r\n lerp: (from, to, t) => ({\r\n type: \"curves\",\r\n channel: t < 0.5 ? from.channel : to.channel,\r\n points: from.points.map(([x, y], i) => {\r\n const [tx, ty] = to.points[i] ?? [x, y];\r\n return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)] as [number, number];\r\n }),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.channel === b.channel &&\r\n a.mode === b.mode &&\r\n a.points.length === b.points.length &&\r\n a.points.every(([x, y], i) => x === b.points[i]?.[0] && y === b.points[i]?.[1]),\r\n // A curve is a *lookup*, and a colour matrix cannot express one: it is affine\r\n // by construction and a curve is authored for its bends. The renderer used to\r\n // fit one straight line through the points and apply that, which is a grade\r\n // with the only interesting part removed. Evaluating it per pixel needs the\r\n // source as a shader it can read — the same reason `lut` is a shader scope,\r\n // and the same trade: exact, at the cost of a pass. See the renderer's\r\n // `curvesEffectHandler` for what that means for ordering.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directional-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Motion-blur-style directional (linear) blur. Unlike {@link BlurEffect}, which\n * blurs uniformly in all directions, this smears the node's own content along a\n * single axis.\n */\nexport interface DirectionalBlurEffect extends ModedEffect {\n type: \"directionalBlur\";\n /** Smear length in pixels along `angle`. */\n radius: number;\n /** Angle in degrees of the smear axis — 0 = horizontal, 90 = vertical. */\n angle: number;\n}\n\nexport const directionalBlurEffect: EffectData<DirectionalBlurEffect> = {\n lerp: (from, to, t) => ({\n type: \"directionalBlur\",\n radius: lerpNumber(from.radius, to.radius, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.radius === b.radius && a.angle === b.angle && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"directional-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Motion-blur-style directional (linear) blur. Unlike {@link BlurEffect}, which\r\n * blurs uniformly in all directions, this smears the node's own content along a\r\n * single axis.\r\n */\r\nexport interface DirectionalBlurEffect extends ModedEffect {\r\n type: \"directionalBlur\";\r\n /** Smear length in pixels along `angle`. */\r\n radius: number;\r\n /** Angle in degrees of the smear axis — 0 = horizontal, 90 = vertical. */\r\n angle: number;\r\n}\r\n\r\nexport const directionalBlurEffect: EffectData<DirectionalBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"directionalBlur\",\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.radius === b.radius && a.angle === b.angle && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dither.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/dither.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiD1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM;QACzC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,UAAU,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU;QACrD,mEAAmE;QACnE,qDAAqD;QACrD,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gEAAgE;IAChE,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Size of the Bayer threshold matrix: 2×2, 4×4 or 8×8. Bigger matrices carry\n * more distinct threshold levels, so the pattern is finer and the apparent tonal\n * range wider — 2 is a blunt checkerboard, 8 the smooth classic ordered dither.\n */\nexport type DitherMatrix = 2 | 4 | 8;\n\n/**\n * Where a pixel's threshold comes from.\n *\n * - `'bayer'` — the recursive ordered matrix. Its lattice *is* the look: the\n * crosshatch is visible at every density, which is what reads as 8-bit and\n * what makes it beat against the pixel grid at some `scale`s.\n * - `'blue'` — a void-and-cluster blue-noise field. Every density stays\n * homogeneous, so the tone is reproduced with no lattice and no moiré. Pick\n * this when the dither should be texture rather than pattern.\n *\n * `matrix` only applies to `'bayer'`.\n */\nexport type DitherNoise = 'bayer' | 'blue';\n\n/**\n * Ordered dithering — quantize the image to `levels` tones per channel, but\n * offset each pixel's rounding by a threshold pattern first. The error is traded\n * for texture instead of banding, which is how 8-bit hardware faked gradients.\n *\n * `noise` picks which pattern: the classic Bayer matrix (visible crosshatch, the\n * retro look) or blue noise (no visible structure at any density).\n *\n * Contrast with `posterize`, which quantizes with no threshold pattern and so\n * produces flat bands.\n */\nexport interface DitherEffect extends ModedEffect {\n type: \"dither\";\n /** Output tones per channel (≥ 2). 2 is pure 1-bit-per-channel. */\n levels: number;\n /** Bayer matrix size. Ignored when `noise` is `'blue'`. */\n matrix: DitherMatrix;\n /** Pattern cell size in px — >1 gives chunky, low-res-looking dither. */\n scale: number;\n /** Dither luminance to black and white instead of per channel. */\n monochrome: boolean;\n /** Threshold source: ordered Bayer matrix, or blue noise. */\n noise: DitherNoise;\n}\n\nexport const ditherEffect: EffectData<DitherEffect> = {\n lerp: (from, to, t) => ({\n type: \"dither\",\n levels: lerpNumber(from.levels, to.levels, t),\n matrix: t < 0.5 ? from.matrix : to.matrix,\n scale: lerpNumber(from.scale, to.scale, t),\n monochrome: t < 0.5 ? from.monochrome : to.monochrome,\n // Two different threshold fields have no meaningful blend, so this\n // hard-cuts like every other discrete effect option.\n noise: t < 0.5 ? from.noise : to.noise,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.levels === b.levels &&\n a.matrix === b.matrix &&\n a.scale === b.scale &&\n a.monochrome === b.monochrome &&\n a.noise === b.noise &&\n a.mode === b.mode,\n // The threshold depends on the pixel's position in the pattern.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"dither.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/dither.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiD1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD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\r\n * Size of the Bayer threshold matrix: 2×2, 4×4 or 8×8. Bigger matrices carry\r\n * more distinct threshold levels, so the pattern is finer and the apparent tonal\r\n * range wider — 2 is a blunt checkerboard, 8 the smooth classic ordered dither.\r\n */\r\nexport type DitherMatrix = 2 | 4 | 8;\r\n\r\n/**\r\n * Where a pixel's threshold comes from.\r\n *\r\n * - `'bayer'` — the recursive ordered matrix. Its lattice *is* the look: the\r\n * crosshatch is visible at every density, which is what reads as 8-bit and\r\n * what makes it beat against the pixel grid at some `scale`s.\r\n * - `'blue'` — a void-and-cluster blue-noise field. Every density stays\r\n * homogeneous, so the tone is reproduced with no lattice and no moiré. Pick\r\n * this when the dither should be texture rather than pattern.\r\n *\r\n * `matrix` only applies to `'bayer'`.\r\n */\r\nexport type DitherNoise = 'bayer' | 'blue';\r\n\r\n/**\r\n * Ordered dithering — quantize the image to `levels` tones per channel, but\r\n * offset each pixel's rounding by a threshold pattern first. The error is traded\r\n * for texture instead of banding, which is how 8-bit hardware faked gradients.\r\n *\r\n * `noise` picks which pattern: the classic Bayer matrix (visible crosshatch, the\r\n * retro look) or blue noise (no visible structure at any density).\r\n *\r\n * Contrast with `posterize`, which quantizes with no threshold pattern and so\r\n * produces flat bands.\r\n */\r\nexport interface DitherEffect extends ModedEffect {\r\n type: \"dither\";\r\n /** Output tones per channel (≥ 2). 2 is pure 1-bit-per-channel. */\r\n levels: number;\r\n /** Bayer matrix size. Ignored when `noise` is `'blue'`. */\r\n matrix: DitherMatrix;\r\n /** Pattern cell size in px — >1 gives chunky, low-res-looking dither. */\r\n scale: number;\r\n /** Dither luminance to black and white instead of per channel. */\r\n monochrome: boolean;\r\n /** Threshold source: ordered Bayer matrix, or blue noise. */\r\n noise: DitherNoise;\r\n}\r\n\r\nexport const ditherEffect: EffectData<DitherEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"dither\",\r\n levels: lerpNumber(from.levels, to.levels, t),\r\n matrix: t < 0.5 ? from.matrix : to.matrix,\r\n scale: lerpNumber(from.scale, to.scale, t),\r\n monochrome: t < 0.5 ? from.monochrome : to.monochrome,\r\n // Two different threshold fields have no meaningful blend, so this\r\n // hard-cuts like every other discrete effect option.\r\n noise: t < 0.5 ? from.noise : to.noise,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.levels === b.levels &&\r\n a.matrix === b.matrix &&\r\n a.scale === b.scale &&\r\n a.monochrome === b.monochrome &&\r\n a.noise === b.noise &&\r\n a.mode === b.mode,\r\n // The threshold depends on the pixel's position in the pattern.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop-shadow.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/drop-shadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAuCrE,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjF,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB;;;;;;;;OAQG;IACH,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\n\n/**\n * A shadow cast from the node's **alpha silhouette** rather than from its\n * geometry — the drop shadow that a `shadow` prop can't give you when the shape\n * on screen isn't the shape of the path.\n *\n * `ShapeNode.shadow` fills the node's own outline with the shadow colour and\n * blurs it, which is exactly right for a rect, an ellipse or a star. It is\n * exactly wrong for anything whose visible form comes from *pixels*: a cut-out\n * PNG, a video with an alpha channel, a line of text, a whole subtree. All of\n * those cast a blurred **rectangle**, because the rectangle is what their path\n * is — and on a cut-out subject that reads as a bug rather than as a shadow.\n *\n * So this one is computed from what the node actually drew. Same relationship\n * to `shadow` that {@link OutlineEffect} has to `stroke`: the geometry version\n * is cheaper and sharper where the path *is* the picture, and this one is the\n * answer everywhere else.\n *\n * Offsets are in the scene's own axes — a positive `y` lifts the shadow upward,\n * matching `ShadowProp.offset` rather than the y-down device space the shader\n * runs in, so the two kinds of shadow move the same way under the same numbers.\n */\nexport interface DropShadowEffect extends ModedEffect {\n type: \"dropShadow\";\n /** How far the shadow is displaced, in px. */\n offsetX: number;\n offsetY: number;\n /** Softness in px, on the same scale a `blur` effect's radius uses. 0 = hard. */\n blur: number;\n /**\n * Grows (or, negative, shrinks) the silhouette before blurring, in px —\n * `box-shadow`'s third length and Figma's \"spread\".\n */\n spread: number;\n /** Shadow colour — any CSS colour, theme alias, or RGBA tuple. */\n color: Color;\n}\n\nexport const dropShadowEffect: EffectData<DropShadowEffect> = {\n lerp: (from, to, t) => ({\n type: \"dropShadow\",\n offsetX: lerpNumber(from.offsetX, to.offsetX, t),\n offsetY: lerpNumber(from.offsetY, to.offsetY, t),\n blur: lerpNumber(from.blur, to.blur, t),\n spread: lerpNumber(from.spread, to.spread, t),\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.offsetX === b.offsetX &&\n a.offsetY === b.offsetY &&\n a.blur === b.blur &&\n a.spread === b.spread &&\n sameEffectColor(a.color, b.color) &&\n a.mode === b.mode,\n /**\n * A shader rather than Skia's own `MakeDropShadow`, and the reason is the\n * same one {@link outlineEffect} gives for not using `MakeDilate`: the\n * ImageFilter path's layer is bounded to the node rect (see `transform()` in\n * the render context, which sets that bound deliberately so scaling filters\n * can't overrun the clip). A shadow's whole job is to fall *outside* the\n * node, so on that path an offset one would be sliced off at the edge of the\n * box. A shader scope has no such bound.\n */\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"drop-shadow.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/drop-shadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8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AQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\r\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\r\n\r\n/**\r\n * A shadow cast from the node's **alpha silhouette** rather than from its\r\n * geometry — the drop shadow that a `shadow` prop can't give you when the shape\r\n * on screen isn't the shape of the path.\r\n *\r\n * `ShapeNode.shadow` fills the node's own outline with the shadow colour and\r\n * blurs it, which is exactly right for a rect, an ellipse or a star. It is\r\n * exactly wrong for anything whose visible form comes from *pixels*: a cut-out\r\n * PNG, a video with an alpha channel, a line of text, a whole subtree. All of\r\n * those cast a blurred **rectangle**, because the rectangle is what their path\r\n * is — and on a cut-out subject that reads as a bug rather than as a shadow.\r\n *\r\n * So this one is computed from what the node actually drew. Same relationship\r\n * to `shadow` that {@link OutlineEffect} has to `stroke`: the geometry version\r\n * is cheaper and sharper where the path *is* the picture, and this one is the\r\n * answer everywhere else.\r\n *\r\n * Offsets are in the scene's own axes — a positive `y` lifts the shadow upward,\r\n * matching `ShadowProp.offset` rather than the y-down device space the shader\r\n * runs in, so the two kinds of shadow move the same way under the same numbers.\r\n */\r\nexport interface DropShadowEffect extends ModedEffect {\r\n type: \"dropShadow\";\r\n /** How far the shadow is displaced, in px. */\r\n offsetX: number;\r\n offsetY: number;\r\n /** Softness in px, on the same scale a `blur` effect's radius uses. 0 = hard. */\r\n blur: number;\r\n /**\r\n * Grows (or, negative, shrinks) the silhouette before blurring, in px —\r\n * `box-shadow`'s third length and Figma's \"spread\".\r\n */\r\n spread: number;\r\n /** Shadow colour — any CSS colour, theme alias, or RGBA tuple. */\r\n color: Color;\r\n}\r\n\r\nexport const dropShadowEffect: EffectData<DropShadowEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"dropShadow\",\r\n offsetX: lerpNumber(from.offsetX, to.offsetX, t),\r\n offsetY: lerpNumber(from.offsetY, to.offsetY, t),\r\n blur: lerpNumber(from.blur, to.blur, t),\r\n spread: lerpNumber(from.spread, to.spread, t),\r\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.offsetX === b.offsetX &&\r\n a.offsetY === b.offsetY &&\r\n a.blur === b.blur &&\r\n a.spread === b.spread &&\r\n sameEffectColor(a.color, b.color) &&\r\n a.mode === b.mode,\r\n /**\r\n * A shader rather than Skia's own `MakeDropShadow`, and the reason is the\r\n * same one {@link outlineEffect} gives for not using `MakeDilate`: the\r\n * ImageFilter path's layer is bounded to the node rect (see `transform()` in\r\n * the render context, which sets that bound deliberately so scaling filters\r\n * can't overrun the clip). A shadow's whole job is to fall *outside* the\r\n * node, so on that path an offset one would be sliced off at the edge of the\r\n * box. A shader scope has no such bound.\r\n */\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duotone.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/duotone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAoBrE,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,OAAO,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACvF,UAAU,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAChG,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,eAAe,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC;QACrC,eAAe,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;QAC3C,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4EAA4E;IAC5E,wEAAwE;CAC3E,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\n\n/**\n * Duotone / gradient map — remap the content's luminance onto a two-colour ramp,\n * so black becomes `shadows`, white becomes `highlights`, and everything between\n * interpolates. Chroma in the source is discarded; only its brightness survives.\n *\n * The editorial two-colour treatment (Spotify covers, risograph posters) and the\n * general \"tint a photo to brand colours\" tool, both from one pair of colours.\n */\nexport interface DuotoneEffect extends ModedEffect {\n type: \"duotone\";\n /** 0–1 blend from the original colours (0) to the full ramp (1). */\n amount: number;\n /** Colour the darkest tones map to. */\n shadows: Color;\n /** Colour the brightest tones map to. */\n highlights: Color;\n}\n\nexport const duotoneEffect: EffectData<DuotoneEffect> = {\n lerp: (from, to, t) => ({\n type: \"duotone\",\n amount: lerpNumber(from.amount, to.amount, t),\n shadows: lerpColor(resolveEffectColor(from.shadows), resolveEffectColor(to.shadows), t),\n highlights: lerpColor(resolveEffectColor(from.highlights), resolveEffectColor(to.highlights), t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.amount === b.amount &&\n sameEffectColor(a.shadows, b.shadows) &&\n sameEffectColor(a.highlights, b.highlights) &&\n a.mode === b.mode,\n // A luminance ramp is a plain affine colour transform, so it composes as an\n // ImageFilter (the default surface) rather than needing a shader scope.\n};\n"]}
|
|
1
|
+
{"version":3,"file":"duotone.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/duotone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAoBrE,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,OAAO,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACvF,UAAU,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAChG,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,eAAe,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC;QACrC,eAAe,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;QAC3C,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4EAA4E;IAC5E,wEAAwE;CAC3E,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\r\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectColor, sameEffectColor } from \"../effect-data\";\r\n\r\n/**\r\n * Duotone / gradient map — remap the content's luminance onto a two-colour ramp,\r\n * so black becomes `shadows`, white becomes `highlights`, and everything between\r\n * interpolates. Chroma in the source is discarded; only its brightness survives.\r\n *\r\n * The editorial two-colour treatment (Spotify covers, risograph posters) and the\r\n * general \"tint a photo to brand colours\" tool, both from one pair of colours.\r\n */\r\nexport interface DuotoneEffect extends ModedEffect {\r\n type: \"duotone\";\r\n /** 0–1 blend from the original colours (0) to the full ramp (1). */\r\n amount: number;\r\n /** Colour the darkest tones map to. */\r\n shadows: Color;\r\n /** Colour the brightest tones map to. */\r\n highlights: Color;\r\n}\r\n\r\nexport const duotoneEffect: EffectData<DuotoneEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"duotone\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n shadows: lerpColor(resolveEffectColor(from.shadows), resolveEffectColor(to.shadows), t),\r\n highlights: lerpColor(resolveEffectColor(from.highlights), resolveEffectColor(to.highlights), t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.amount === b.amount &&\r\n sameEffectColor(a.shadows, b.shadows) &&\r\n sameEffectColor(a.highlights, b.highlights) &&\r\n a.mode === b.mode,\r\n // A luminance ramp is a plain affine colour transform, so it composes as an\r\n // ImageFilter (the default surface) rather than needing a shader scope.\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edges.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM;QACzC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,iCAAiC;IACjC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Which convolution kernel detects the edges.\n *\n * - `\"sobel\"` — gradient magnitude with a centre-weighted 3×3 pair. The default:\n * thick, smooth, noise-tolerant edges.\n * - `\"prewitt\"` — the same gradient pair without the centre weighting. Slightly\n * thinner and more literal, noisier on gradients.\n * - `\"laplacian\"` — second derivative in one pass. Finest lines, picks up texture\n * the gradient operators smooth over.\n */\nexport type EdgeKernel = \"sobel\" | \"prewitt\" | \"laplacian\";\n\n/**\n * Edge detection — replaces the content with the magnitude of its own gradient,\n * so flat areas go black and boundaries light up.\n */\nexport interface EdgesEffect extends ModedEffect {\n type: \"edges\";\n /** Multiplier on the detected magnitude. 0 = off (black), 1 = as measured. */\n strength: number;\n /** Which operator measures the gradient. */\n kernel: EdgeKernel;\n /** Run the kernel per RGB channel (colour fringes) instead of on luminance. */\n colored: boolean;\n}\n\nexport const edgesEffect: EffectData<EdgesEffect> = {\n lerp: (from, to, t) => ({\n type: \"edges\",\n strength: lerpNumber(from.strength, to.strength, t),\n kernel: t < 0.5 ? from.kernel : to.kernel,\n colored: t < 0.5 ? from.colored : to.colored,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.strength === b.strength &&\n a.kernel === b.kernel &&\n a.colored === b.colored &&\n a.mode === b.mode,\n // Convolves a 3×3 neighbourhood.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"edges.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM;QACzC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,iCAAiC;IACjC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Which convolution kernel detects the edges.\r\n *\r\n * - `\"sobel\"` — gradient magnitude with a centre-weighted 3×3 pair. The default:\r\n * thick, smooth, noise-tolerant edges.\r\n * - `\"prewitt\"` — the same gradient pair without the centre weighting. Slightly\r\n * thinner and more literal, noisier on gradients.\r\n * - `\"laplacian\"` — second derivative in one pass. Finest lines, picks up texture\r\n * the gradient operators smooth over.\r\n */\r\nexport type EdgeKernel = \"sobel\" | \"prewitt\" | \"laplacian\";\r\n\r\n/**\r\n * Edge detection — replaces the content with the magnitude of its own gradient,\r\n * so flat areas go black and boundaries light up.\r\n */\r\nexport interface EdgesEffect extends ModedEffect {\r\n type: \"edges\";\r\n /** Multiplier on the detected magnitude. 0 = off (black), 1 = as measured. */\r\n strength: number;\r\n /** Which operator measures the gradient. */\r\n kernel: EdgeKernel;\r\n /** Run the kernel per RGB channel (colour fringes) instead of on luminance. */\r\n colored: boolean;\r\n}\r\n\r\nexport const edgesEffect: EffectData<EdgesEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"edges\",\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n kernel: t < 0.5 ? from.kernel : to.kernel,\r\n colored: t < 0.5 ? from.colored : to.colored,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.strength === b.strength &&\r\n a.kernel === b.kernel &&\r\n a.colored === b.colored &&\r\n a.mode === b.mode,\r\n // Convolves a 3×3 neighbourhood.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
2
2
|
/**
|
|
3
|
-
* Figma
|
|
3
|
+
* Figma's Glass: the backdrop seen through a slab of glass whose edge curves
|
|
4
|
+
* down to the node's outline — refracted, split into a spectrum at the curve,
|
|
5
|
+
* optionally frosted, with a rim of light.
|
|
4
6
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* makes the Figma defaults — everything at 100 — a sane starting point instead
|
|
9
|
-
* of an extreme one: a 100 that meant "100 px of bevel" would swallow a small
|
|
10
|
-
* node whole and be invisible on a large one, whereas a 100 that means "the full
|
|
11
|
-
* bevel this node's size affords" reads the same at any scale.
|
|
12
|
-
*
|
|
13
|
-
* The exception is {@link lightAngle}, which is degrees like every other angle
|
|
14
|
-
* in the effect vocabulary.
|
|
7
|
+
* The fields are Figma's own, in Figma's units, so values copied from a Figma
|
|
8
|
+
* file render the same: `depth` and `frost` are px, `lightAngle` is degrees
|
|
9
|
+
* clockwise from the top, and the rest are 0–100 amounts.
|
|
15
10
|
*
|
|
16
11
|
* Glass only has meaning on the **backdrop** — there is nothing to refract in a
|
|
17
12
|
* node's own paint — so `Effects.glass()` defaults `mode` to `'backdrop'` and the
|
|
@@ -20,26 +15,22 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
|
20
15
|
export interface GlassEffect extends ModedEffect {
|
|
21
16
|
type: "glass";
|
|
22
17
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
18
|
+
* Where the light comes from, in degrees clockwise from the top — Figma's
|
|
19
|
+
* convention rather than the right-hand zero the other effects use, so
|
|
20
|
+
* Figma's `-45°` (top left) means the same here.
|
|
26
21
|
*/
|
|
27
22
|
lightAngle: number;
|
|
28
|
-
/** 0–100 brightness of the
|
|
23
|
+
/** 0–100 brightness of the rim light and of the light projected through the bevel. */
|
|
29
24
|
lightIntensity: number;
|
|
30
|
-
/** 0–100
|
|
25
|
+
/** 0–100 how strongly the curved edge bends what is behind it. */
|
|
31
26
|
refraction: number;
|
|
32
|
-
/**
|
|
27
|
+
/** How far the curved edge reaches in from the outline, px; past half the node's short side it is a dome. 0 is no glass. */
|
|
33
28
|
depth: number;
|
|
34
|
-
/** 0–100
|
|
29
|
+
/** 0–100 how far the curved edge splits what it bends into a spectrum. */
|
|
35
30
|
dispersion: number;
|
|
36
|
-
/**
|
|
31
|
+
/** Blur of what is behind the glass, as a Figma blur radius in px (twice the Gaussian sigma). */
|
|
37
32
|
frost: number;
|
|
38
|
-
/**
|
|
39
|
-
* 0–100 spread of the specular highlight: 0 is a tight glint, 100 a broad
|
|
40
|
-
* rim wash. The inverse of shininess, which is what the renderer converts it
|
|
41
|
-
* to.
|
|
42
|
-
*/
|
|
33
|
+
/** 0–100 how far the light projected through the bevel spreads in from the rim. */
|
|
43
34
|
splay: number;
|
|
44
35
|
}
|
|
45
36
|
export declare const glassEffect: EffectData<GlassEffect>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glass.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glass.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,cAAc,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,4HAA4H;IAC5H,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,WAAW,CAuB/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glass.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"glass.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsC1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACzD,cAAc,EAAE,UAAU,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC;QACrE,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACzD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACzD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,cAAc,KAAK,CAAC,CAAC,cAAc;QACrC,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,oEAAoE;IACpE,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Figma's Glass: the backdrop seen through a slab of glass whose edge curves\r\n * down to the node's outline — refracted, split into a spectrum at the curve,\r\n * optionally frosted, with a rim of light.\r\n *\r\n * The fields are Figma's own, in Figma's units, so values copied from a Figma\r\n * file render the same: `depth` and `frost` are px, `lightAngle` is degrees\r\n * clockwise from the top, and the rest are 0–100 amounts.\r\n *\r\n * Glass only has meaning on the **backdrop** — there is nothing to refract in a\r\n * node's own paint — so `Effects.glass()` defaults `mode` to `'backdrop'` and the\r\n * renderer's handler serves that target only.\r\n */\r\nexport interface GlassEffect extends ModedEffect {\r\n type: \"glass\";\r\n /**\r\n * Where the light comes from, in degrees clockwise from the top — Figma's\r\n * convention rather than the right-hand zero the other effects use, so\r\n * Figma's `-45°` (top left) means the same here.\r\n */\r\n lightAngle: number;\r\n /** 0–100 brightness of the rim light and of the light projected through the bevel. */\r\n lightIntensity: number;\r\n /** 0–100 how strongly the curved edge bends what is behind it. */\r\n refraction: number;\r\n /** How far the curved edge reaches in from the outline, px; past half the node's short side it is a dome. 0 is no glass. */\r\n depth: number;\r\n /** 0–100 how far the curved edge splits what it bends into a spectrum. */\r\n dispersion: number;\r\n /** Blur of what is behind the glass, as a Figma blur radius in px (twice the Gaussian sigma). */\r\n frost: number;\r\n /** 0–100 how far the light projected through the bevel spreads in from the rim. */\r\n splay: number;\r\n}\r\n\r\nexport const glassEffect: EffectData<GlassEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"glass\",\r\n lightAngle: lerpNumber(from.lightAngle, to.lightAngle, t),\r\n lightIntensity: lerpNumber(from.lightIntensity, to.lightIntensity, t),\r\n refraction: lerpNumber(from.refraction, to.refraction, t),\r\n depth: lerpNumber(from.depth, to.depth, t),\r\n dispersion: lerpNumber(from.dispersion, to.dispersion, t),\r\n frost: lerpNumber(from.frost, to.frost, t),\r\n splay: lerpNumber(from.splay, to.splay, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.lightAngle === b.lightAngle &&\r\n a.lightIntensity === b.lightIntensity &&\r\n a.refraction === b.refraction &&\r\n a.depth === b.depth &&\r\n a.dispersion === b.dispersion &&\r\n a.frost === b.frost &&\r\n a.splay === b.splay &&\r\n a.mode === b.mode,\r\n // Resamples the backdrop through a bevel, three times per fragment.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glow.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA+FrF;;;;;;;;;;GAUG;AACH,SAAS,QAAQ,CACb,IAA0C,EAC1C,EAAwC,EACxC,CAAS;IAET,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,OAAO;QACH,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CACjC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAC5E;QACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;KAC/E,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,CAAuC,EAAE,CAAuC;IAC9F,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,KAA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K,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;QACd,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB;;;;;;;;;OASG;IACH,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport type { BlendMode } from \"@/attributes/shape/fill/blend\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { EffectAxis, ModedEffect, EffectData } from \"../effect-data\";\nimport { resolveEffectColor, sameEffectAxis, sameEffectColor } from \"../effect-data\";\n\n/**\n * What the glow reads to decide how much a pixel glows.\n *\n * `\"luminance\"` is the photographic reading — bright pixels bleed, dark ones\n * don't, and {@link GlowEffect.threshold} sets where the cut falls.\n * `\"alpha\"` ignores colour entirely and glows every opaque pixel equally, which\n * is what you want when the glow is a halo around a shape rather than light\n * escaping an image.\n */\nexport type GlowChannel = \"luminance\" | \"alpha\";\n\n/**\n * What the glow is coloured with.\n *\n * - `\"none\"` keeps the source's own colours, scaled by intensity.\n * - `\"solid\"` paints the whole glow one {@link GlowEffect.color}.\n * - `\"ramp\"` maps glow strength through {@link GlowEffect.colors} /\n * {@link GlowEffect.stops}, which is what makes a glow read as heat, neon or\n * an aurora rather than as a brighter copy of the layer.\n */\nexport type GlowTint = \"none\" | \"solid\" | \"ramp\";\n\n/**\n * How the ramp repeats once {@link GlowEffect.cycles} takes it past one pass.\n *\n * The two names are Skia's own tile modes, and mean here what they mean there:\n * `\"repeat\"` restarts at the first stop (a hard seam between last and first),\n * `\"mirror\"` walks back down through the stops (seamless, at the cost of\n * halving the apparent frequency).\n */\nexport type GlowLoopStyle = \"mirror\" | \"repeat\";\n\n/** Where the source layer sits relative to the glow it produced. */\nexport type GlowOriginal = \"behind\" | \"front\" | \"hidden\";\n\n/**\n * A glow: the bright (or opaque) parts of a layer, spread outward and composited\n * back — optionally recoloured through a ramp keyed on how strongly each pixel\n * glows.\n *\n * The difference from `bloom`, which is otherwise the same three numbers: bloom\n * is a `\"filter\"` effect and is therefore bounded by the node's own rect, and it\n * can only screen its bright-pass back. This spreads past the box, chooses its\n * compositing, and can be coloured. See {@link EffectData.surface} below.\n */\nexport interface GlowEffect extends ModedEffect {\n type: \"glow\";\n /** What decides a pixel's glow strength. */\n channel: GlowChannel;\n /**\n * Luminance below which a pixel does not glow, 0–1.\n *\n * Read only when {@link channel} is `\"luminance\"` — an alpha-driven glow has\n * no brightness to cut at.\n */\n threshold: number;\n /** How far the glow spreads, in px. 0 = off. */\n radius: number;\n /**\n * How far the source is dilated *before* blurring, in px.\n *\n * The same knob a drop shadow has, and it does the same job: `radius` alone\n * gives a glow that fades from the edge, while `spread` gives it a solid\n * core to fade from.\n */\n spread: number;\n /** Brightness of the glow. 1 is unscaled; 0 is off. */\n intensity: number;\n /** Which way the glow spreads. `\"x\"`/`\"y\"` give anamorphic streaks. */\n axis: EffectAxis;\n /** Where the source layer sits relative to the glow. */\n original: GlowOriginal;\n /** How the glow merges with the layer. */\n blend: BlendMode;\n /** What the glow is coloured with. */\n tint: GlowTint;\n /** The glow's colour when {@link tint} is `\"solid\"`. */\n color: Color;\n /**\n * The ramp's colours, when {@link tint} is `\"ramp\"` — parallel to\n * {@link stops}, and read only then.\n */\n colors: Color[];\n /** Each colour's position along the ramp, 0–1 ascending. */\n stops: number[];\n /** How the ramp repeats past one pass. */\n loopStyle: GlowLoopStyle;\n /** How many times the ramp is traversed across the glow's strength range. */\n cycles: number;\n /** Offset along the ramp, in degrees of one cycle. Animate this to move colour through the glow. */\n phase: number;\n}\n\n/**\n * Interpolate two ramps.\n *\n * Componentwise when the two have the same number of stops, which is the case\n * every tween authored by moving colours around produces. When the counts\n * differ there is no correspondence to interpolate *along* — stop 2 of 3 and\n * stop 2 of 5 are not the same place on the ramp — so this snaps at the midpoint\n * like an enum rather than resampling. Resampling would be defensible and is\n * deliberately not done: a ramp that silently gained stops mid-tween reads as a\n * renderer bug, and the honest snap is at least legible.\n */\nfunction lerpRamp(\n from: Pick<GlowEffect, \"colors\" | \"stops\">,\n to: Pick<GlowEffect, \"colors\" | \"stops\">,\n t: number,\n): Pick<GlowEffect, \"colors\" | \"stops\"> {\n if (from.colors.length !== to.colors.length) return t < 0.5 ? from : to;\n return {\n colors: from.colors.map((color, i) =>\n lerpColor(resolveEffectColor(color), resolveEffectColor(to.colors[i]), t),\n ),\n stops: from.stops.map((stop, i) => lerpNumber(stop, to.stops[i] ?? stop, t)),\n };\n}\n\nfunction sameRamp(a: Pick<GlowEffect, \"colors\" | \"stops\">, b: Pick<GlowEffect, \"colors\" | \"stops\">): boolean {\n if (a.colors.length !== b.colors.length || a.stops.length !== b.stops.length) return false;\n return (\n a.colors.every((color, i) => sameEffectColor(color, b.colors[i])) &&\n a.stops.every((stop, i) => stop === b.stops[i])\n );\n}\n\nexport const glowEffect: EffectData<GlowEffect> = {\n lerp: (from, to, t) => ({\n type: \"glow\",\n threshold: lerpNumber(from.threshold, to.threshold, t),\n radius: lerpNumber(from.radius, to.radius, t),\n spread: lerpNumber(from.spread, to.spread, t),\n intensity: lerpNumber(from.intensity, to.intensity, t),\n cycles: lerpNumber(from.cycles, to.cycles, t),\n phase: lerpNumber(from.phase, to.phase, t),\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\n ...lerpRamp(from, to, t),\n // Discrete — snapped at the midpoint like every other enum-valued field.\n channel: t < 0.5 ? from.channel : to.channel,\n axis: t < 0.5 ? from.axis : to.axis,\n original: t < 0.5 ? from.original : to.original,\n blend: t < 0.5 ? from.blend : to.blend,\n tint: t < 0.5 ? from.tint : to.tint,\n loopStyle: t < 0.5 ? from.loopStyle : to.loopStyle,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.channel === b.channel &&\n a.threshold === b.threshold &&\n a.radius === b.radius &&\n a.spread === b.spread &&\n a.intensity === b.intensity &&\n sameEffectAxis(a.axis, b.axis) &&\n a.original === b.original &&\n a.blend === b.blend &&\n a.tint === b.tint &&\n sameEffectColor(a.color, b.color) &&\n sameRamp(a, b) &&\n a.loopStyle === b.loopStyle &&\n a.cycles === b.cycles &&\n a.phase === b.phase &&\n a.mode === b.mode,\n /**\n * A shader, for the reason `dropShadow` gives: the ImageFilter path's layer\n * is bounded to the node's rect, and a glow's whole job is to fall *outside*\n * it, so on that path the spread would be sliced off at the edge of the box.\n *\n * The colouring needs it independently. A two-colour luminance ramp is\n * affine and would fit a colour matrix (that is exactly what `duotone` is),\n * but a ramp with {@link GlowEffect.cycles} and {@link GlowEffect.loopStyle}\n * over it is not, and there is no runtime-effect colour filter to reach for.\n */\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"glow.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/glow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA+FrF;;;;;;;;;;GAUG;AACH,SAAS,QAAQ,CACb,IAA0C,EAC1C,EAAwC,EACxC,CAAS;IAET,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC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CAAC,IAAI;QACnC,SAAS,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS;QAClD,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;QACd,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB;;;;;;;;;OASG;IACH,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\r\nimport type { BlendMode } from \"@/attributes/shape/fill/blend\";\r\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\r\nimport type { EffectAxis, ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectColor, sameEffectAxis, sameEffectColor } from \"../effect-data\";\r\n\r\n/**\r\n * What the glow reads to decide how much a pixel glows.\r\n *\r\n * `\"luminance\"` is the photographic reading — bright pixels bleed, dark ones\r\n * don't, and {@link GlowEffect.threshold} sets where the cut falls.\r\n * `\"alpha\"` ignores colour entirely and glows every opaque pixel equally, which\r\n * is what you want when the glow is a halo around a shape rather than light\r\n * escaping an image.\r\n */\r\nexport type GlowChannel = \"luminance\" | \"alpha\";\r\n\r\n/**\r\n * What the glow is coloured with.\r\n *\r\n * - `\"none\"` keeps the source's own colours, scaled by intensity.\r\n * - `\"solid\"` paints the whole glow one {@link GlowEffect.color}.\r\n * - `\"ramp\"` maps glow strength through {@link GlowEffect.colors} /\r\n * {@link GlowEffect.stops}, which is what makes a glow read as heat, neon or\r\n * an aurora rather than as a brighter copy of the layer.\r\n */\r\nexport type GlowTint = \"none\" | \"solid\" | \"ramp\";\r\n\r\n/**\r\n * How the ramp repeats once {@link GlowEffect.cycles} takes it past one pass.\r\n *\r\n * The two names are Skia's own tile modes, and mean here what they mean there:\r\n * `\"repeat\"` restarts at the first stop (a hard seam between last and first),\r\n * `\"mirror\"` walks back down through the stops (seamless, at the cost of\r\n * halving the apparent frequency).\r\n */\r\nexport type GlowLoopStyle = \"mirror\" | \"repeat\";\r\n\r\n/** Where the source layer sits relative to the glow it produced. */\r\nexport type GlowOriginal = \"behind\" | \"front\" | \"hidden\";\r\n\r\n/**\r\n * A glow: the bright (or opaque) parts of a layer, spread outward and composited\r\n * back — optionally recoloured through a ramp keyed on how strongly each pixel\r\n * glows.\r\n *\r\n * The difference from `bloom`, which is otherwise the same three numbers: bloom\r\n * is a `\"filter\"` effect and is therefore bounded by the node's own rect, and it\r\n * can only screen its bright-pass back. This spreads past the box, chooses its\r\n * compositing, and can be coloured. See {@link EffectData.surface} below.\r\n */\r\nexport interface GlowEffect extends ModedEffect {\r\n type: \"glow\";\r\n /** What decides a pixel's glow strength. */\r\n channel: GlowChannel;\r\n /**\r\n * Luminance below which a pixel does not glow, 0–1.\r\n *\r\n * Read only when {@link channel} is `\"luminance\"` — an alpha-driven glow has\r\n * no brightness to cut at.\r\n */\r\n threshold: number;\r\n /** How far the glow spreads, in px. 0 = off. */\r\n radius: number;\r\n /**\r\n * How far the source is dilated *before* blurring, in px.\r\n *\r\n * The same knob a drop shadow has, and it does the same job: `radius` alone\r\n * gives a glow that fades from the edge, while `spread` gives it a solid\r\n * core to fade from.\r\n */\r\n spread: number;\r\n /** Brightness of the glow. 1 is unscaled; 0 is off. */\r\n intensity: number;\r\n /** Which way the glow spreads. `\"x\"`/`\"y\"` give anamorphic streaks. */\r\n axis: EffectAxis;\r\n /** Where the source layer sits relative to the glow. */\r\n original: GlowOriginal;\r\n /** How the glow merges with the layer. */\r\n blend: BlendMode;\r\n /** What the glow is coloured with. */\r\n tint: GlowTint;\r\n /** The glow's colour when {@link tint} is `\"solid\"`. */\r\n color: Color;\r\n /**\r\n * The ramp's colours, when {@link tint} is `\"ramp\"` — parallel to\r\n * {@link stops}, and read only then.\r\n */\r\n colors: Color[];\r\n /** Each colour's position along the ramp, 0–1 ascending. */\r\n stops: number[];\r\n /** How the ramp repeats past one pass. */\r\n loopStyle: GlowLoopStyle;\r\n /** How many times the ramp is traversed across the glow's strength range. */\r\n cycles: number;\r\n /** Offset along the ramp, in degrees of one cycle. Animate this to move colour through the glow. */\r\n phase: number;\r\n}\r\n\r\n/**\r\n * Interpolate two ramps.\r\n *\r\n * Componentwise when the two have the same number of stops, which is the case\r\n * every tween authored by moving colours around produces. When the counts\r\n * differ there is no correspondence to interpolate *along* — stop 2 of 3 and\r\n * stop 2 of 5 are not the same place on the ramp — so this snaps at the midpoint\r\n * like an enum rather than resampling. Resampling would be defensible and is\r\n * deliberately not done: a ramp that silently gained stops mid-tween reads as a\r\n * renderer bug, and the honest snap is at least legible.\r\n */\r\nfunction lerpRamp(\r\n from: Pick<GlowEffect, \"colors\" | \"stops\">,\r\n to: Pick<GlowEffect, \"colors\" | \"stops\">,\r\n t: number,\r\n): Pick<GlowEffect, \"colors\" | \"stops\"> {\r\n if (from.colors.length !== to.colors.length) return t < 0.5 ? from : to;\r\n return {\r\n colors: from.colors.map((color, i) =>\r\n lerpColor(resolveEffectColor(color), resolveEffectColor(to.colors[i]), t),\r\n ),\r\n stops: from.stops.map((stop, i) => lerpNumber(stop, to.stops[i] ?? stop, t)),\r\n };\r\n}\r\n\r\nfunction sameRamp(a: Pick<GlowEffect, \"colors\" | \"stops\">, b: Pick<GlowEffect, \"colors\" | \"stops\">): boolean {\r\n if (a.colors.length !== b.colors.length || a.stops.length !== b.stops.length) return false;\r\n return (\r\n a.colors.every((color, i) => sameEffectColor(color, b.colors[i])) &&\r\n a.stops.every((stop, i) => stop === b.stops[i])\r\n );\r\n}\r\n\r\nexport const glowEffect: EffectData<GlowEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"glow\",\r\n threshold: lerpNumber(from.threshold, to.threshold, t),\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n spread: lerpNumber(from.spread, to.spread, t),\r\n intensity: lerpNumber(from.intensity, to.intensity, t),\r\n cycles: lerpNumber(from.cycles, to.cycles, t),\r\n phase: lerpNumber(from.phase, to.phase, t),\r\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\r\n ...lerpRamp(from, to, t),\r\n // Discrete — snapped at the midpoint like every other enum-valued field.\r\n channel: t < 0.5 ? from.channel : to.channel,\r\n axis: t < 0.5 ? from.axis : to.axis,\r\n original: t < 0.5 ? from.original : to.original,\r\n blend: t < 0.5 ? from.blend : to.blend,\r\n tint: t < 0.5 ? from.tint : to.tint,\r\n loopStyle: t < 0.5 ? from.loopStyle : to.loopStyle,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.channel === b.channel &&\r\n a.threshold === b.threshold &&\r\n a.radius === b.radius &&\r\n a.spread === b.spread &&\r\n a.intensity === b.intensity &&\r\n sameEffectAxis(a.axis, b.axis) &&\r\n a.original === b.original &&\r\n a.blend === b.blend &&\r\n a.tint === b.tint &&\r\n sameEffectColor(a.color, b.color) &&\r\n sameRamp(a, b) &&\r\n a.loopStyle === b.loopStyle &&\r\n a.cycles === b.cycles &&\r\n a.phase === b.phase &&\r\n a.mode === b.mode,\r\n /**\r\n * A shader, for the reason `dropShadow` gives: the ImageFilter path's layer\r\n * is bounded to the node's rect, and a glow's whole job is to fall *outside*\r\n * it, so on that path the spread would be sliced off at the edge of the box.\r\n *\r\n * The colouring needs it independently. A two-colour luminance ramp is\r\n * affine and would fit a colour matrix (that is exactly what `duotone` is),\r\n * but a ramp with {@link GlowEffect.cycles} and {@link GlowEffect.loopStyle}\r\n * over it is not, and there is no runtime-effect colour filter to reach for.\r\n */\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grain.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/grain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA8B1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,mDAAmD;IACnD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Film grain — per-pixel noise blended into the node's own content.\n *\n * The noise is *signed* (it lightens and darkens around the source value) and\n * scaled by the local alpha, so it never bleeds past the silhouette and never\n * shifts the average exposure.\n *\n * Grain that doesn't move reads as a texture rather than as film, so\n * {@link animated} re-seeds the field every frame from the node's elapsed time.\n * For a deterministic render (e.g. a pixel-diff test) leave it off and animate\n * {@link seed} instead — a tween over `seed` gives the same shimmer frame-locked\n * to the timeline.\n */\nexport interface GrainEffect extends ModedEffect {\n type: \"grain\";\n /** 0–1 noise amplitude. 0 = off. */\n amount: number;\n /** Grain cell size in px — 1 is per-pixel, higher is chunkier. */\n size: number;\n /** Random field offset. Animate it (or set `animated`) to make the grain crawl. */\n seed: number;\n /** Re-seed every frame from the node's elapsed time. */\n animated: boolean;\n /** Per-channel noise (colour speckle) instead of one luminance value. */\n colored: boolean;\n}\n\nexport const grainEffect: EffectData<GrainEffect> = {\n lerp: (from, to, t) => ({\n type: \"grain\",\n amount: lerpNumber(from.amount, to.amount, t),\n size: lerpNumber(from.size, to.size, t),\n seed: lerpNumber(from.seed, to.seed, t),\n animated: t < 0.5 ? from.animated : to.animated,\n colored: t < 0.5 ? from.colored : to.colored,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.amount === b.amount &&\n a.size === b.size &&\n a.seed === b.seed &&\n a.animated === b.animated &&\n a.colored === b.colored &&\n a.mode === b.mode,\n // Hashes each pixel's position into a noise value.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"grain.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/grain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA8B1C,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,mDAAmD;IACnD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Film grain — per-pixel noise blended into the node's own content.\r\n *\r\n * The noise is *signed* (it lightens and darkens around the source value) and\r\n * scaled by the local alpha, so it never bleeds past the silhouette and never\r\n * shifts the average exposure.\r\n *\r\n * Grain that doesn't move reads as a texture rather than as film, so\r\n * {@link animated} re-seeds the field every frame from the node's elapsed time.\r\n * For a deterministic render (e.g. a pixel-diff test) leave it off and animate\r\n * {@link seed} instead — a tween over `seed` gives the same shimmer frame-locked\r\n * to the timeline.\r\n */\r\nexport interface GrainEffect extends ModedEffect {\r\n type: \"grain\";\r\n /** 0–1 noise amplitude. 0 = off. */\r\n amount: number;\r\n /** Grain cell size in px — 1 is per-pixel, higher is chunkier. */\r\n size: number;\r\n /** Random field offset. Animate it (or set `animated`) to make the grain crawl. */\r\n seed: number;\r\n /** Re-seed every frame from the node's elapsed time. */\r\n animated: boolean;\r\n /** Per-channel noise (colour speckle) instead of one luminance value. */\r\n colored: boolean;\r\n}\r\n\r\nexport const grainEffect: EffectData<GrainEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"grain\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n size: lerpNumber(from.size, to.size, t),\r\n seed: lerpNumber(from.seed, to.seed, t),\r\n animated: t < 0.5 ? from.animated : to.animated,\r\n colored: t < 0.5 ? from.colored : to.colored,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.amount === b.amount &&\r\n a.size === b.size &&\r\n a.seed === b.seed &&\r\n a.animated === b.animated &&\r\n a.colored === b.colored &&\r\n a.mode === b.mode,\r\n // Hashes each pixel's position into a noise value.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grayscale.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/grayscale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAClI,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC/D,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface GrayscaleEffect extends ModedEffect {\n type: \"grayscale\";\n /** 0–1: blend from original (0) to fully desaturated (1). */\n amount: number;\n}\n\nexport const grayscaleEffect: EffectData<GrayscaleEffect> = {\n lerp: (from, to, t) => ({ type: \"grayscale\", amount: lerpNumber(from.amount, to.amount, t), mode: t < 0.5 ? from.mode : to.mode }),\n equals: (a, b) => a.amount === b.amount && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"grayscale.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/grayscale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAClI,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC/D,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface GrayscaleEffect extends ModedEffect {\r\n type: \"grayscale\";\r\n /** 0–1: blend from original (0) to fully desaturated (1). */\r\n amount: number;\r\n}\r\n\r\nexport const grayscaleEffect: EffectData<GrayscaleEffect> = {\r\n lerp: (from, to, t) => ({ type: \"grayscale\", amount: lerpNumber(from.amount, to.amount, t), mode: t < 0.5 ? from.mode : to.mode }),\r\n equals: (a, b) => a.amount === b.amount && a.mode === b.mode,\r\n};\r\n"]}
|