@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":"halftone.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/halftone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6C1C,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,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,UAAU,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU;QACrD,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,uEAAuE;IACvE,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * The screen pattern each halftone cell is drawn with.\n *\n * - `\"dot\"` — the classic circular dot that grows with tone.\n * - `\"line\"` — a line screen: parallel rules that thicken with tone.\n * - `\"cross\"` — crossed rules, a coarse engraving / crosshatch.\n */\nexport type HalftoneShape = \"dot\" | \"line\" | \"cross\";\n\n/**\n * How many plates the screen is separated into.\n *\n * - `\"mono\"` — one black screen over luminance. The newsprint look.\n * - `\"cmyk\"` — four plates at the classic process angles (C 15°, M 75°, Y 0°,\n * K 45°). Pulling the shared darkness onto a K plate is what keeps neutrals\n * neutral, so this is the one that reads as *printed*.\n * - `\"rgb\"` — one screen per RGB channel. Cheaper and occasionally the look you\n * want, but with no K plate every grey prints three overlapping mid-dots, so\n * anything neutral turns to colour noise. Prefer `\"cmyk\"` for print looks.\n */\nexport type HalftoneSeparation = \"mono\" | \"rgb\" | \"cmyk\";\n\n/**\n * Halftone screen — the newsprint / comic-book look. The image is divided into a\n * rotated grid of cells and each cell's tone becomes the size of a mark, so\n * continuous shading is reproduced by varying dot area rather than intensity.\n *\n * `separation` picks how many plates the image is split across — see\n * {@link HalftoneSeparation}.\n */\nexport interface HalftoneEffect extends ModedEffect {\n type: \"halftone\";\n /** Cell pitch in px — the distance between dot centres. */\n size: number;\n /** Screen rotation in degrees; 45° is the traditional dot angle. */\n angle: number;\n /** Mark drawn in each cell. */\n shape: HalftoneShape;\n /** How many plates to screen into. */\n separation: HalftoneSeparation;\n}\n\nexport const halftoneEffect: EffectData<HalftoneEffect> = {\n lerp: (from, to, t) => ({\n type: \"halftone\",\n size: lerpNumber(from.size, to.size, t),\n angle: lerpNumber(from.angle, to.angle, t),\n shape: t < 0.5 ? from.shape : to.shape,\n separation: t < 0.5 ? from.separation : to.separation,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.size === b.size &&\n a.angle === b.angle &&\n a.shape === b.shape &&\n a.separation === b.separation &&\n a.mode === b.mode,\n // Cell position drives the mark, so it needs each pixel's coordinates.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"halftone.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/halftone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6C1C,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,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,UAAU,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU;QACrD,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,uEAAuE;IACvE,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 * The screen pattern each halftone cell is drawn with.\r\n *\r\n * - `\"dot\"` — the classic circular dot that grows with tone.\r\n * - `\"line\"` — a line screen: parallel rules that thicken with tone.\r\n * - `\"cross\"` — crossed rules, a coarse engraving / crosshatch.\r\n */\r\nexport type HalftoneShape = \"dot\" | \"line\" | \"cross\";\r\n\r\n/**\r\n * How many plates the screen is separated into.\r\n *\r\n * - `\"mono\"` — one black screen over luminance. The newsprint look.\r\n * - `\"cmyk\"` — four plates at the classic process angles (C 15°, M 75°, Y 0°,\r\n * K 45°). Pulling the shared darkness onto a K plate is what keeps neutrals\r\n * neutral, so this is the one that reads as *printed*.\r\n * - `\"rgb\"` — one screen per RGB channel. Cheaper and occasionally the look you\r\n * want, but with no K plate every grey prints three overlapping mid-dots, so\r\n * anything neutral turns to colour noise. Prefer `\"cmyk\"` for print looks.\r\n */\r\nexport type HalftoneSeparation = \"mono\" | \"rgb\" | \"cmyk\";\r\n\r\n/**\r\n * Halftone screen — the newsprint / comic-book look. The image is divided into a\r\n * rotated grid of cells and each cell's tone becomes the size of a mark, so\r\n * continuous shading is reproduced by varying dot area rather than intensity.\r\n *\r\n * `separation` picks how many plates the image is split across — see\r\n * {@link HalftoneSeparation}.\r\n */\r\nexport interface HalftoneEffect extends ModedEffect {\r\n type: \"halftone\";\r\n /** Cell pitch in px — the distance between dot centres. */\r\n size: number;\r\n /** Screen rotation in degrees; 45° is the traditional dot angle. */\r\n angle: number;\r\n /** Mark drawn in each cell. */\r\n shape: HalftoneShape;\r\n /** How many plates to screen into. */\r\n separation: HalftoneSeparation;\r\n}\r\n\r\nexport const halftoneEffect: EffectData<HalftoneEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"halftone\",\r\n size: lerpNumber(from.size, to.size, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n shape: t < 0.5 ? from.shape : to.shape,\r\n separation: t < 0.5 ? from.separation : to.separation,\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.angle === b.angle &&\r\n a.shape === b.shape &&\r\n a.separation === b.separation &&\r\n a.mode === b.mode,\r\n // Cell position drives the mark, so it needs each pixel's coordinates.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/invert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,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,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC9F,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Which channel(s) / colour space component the invert is applied to.\n *\n * - `'red' | 'green' | 'blue'` — invert a single RGB channel.\n * - `'rgba'` — invert red, green and blue (alpha untouched).\n * - `'alpha'` — invert the alpha channel.\n * - `'hue'` — rotate hue by 180°.\n * - `'luminance'` — invert perceptual luminance (BT.709) while preserving chroma.\n */\nexport type InvertChannel =\n | \"red\"\n | \"green\"\n | \"blue\"\n | \"rgba\"\n | \"alpha\"\n | \"hue\"\n | \"luminance\";\n\nexport interface InvertEffect extends ModedEffect {\n type: \"invert\";\n /** Which channel(s) / colour component to invert. */\n channel: InvertChannel;\n /** 0–1: blend from original (0) to fully inverted on `channel` (1). */\n strength: number;\n}\n\nexport const invertEffect: EffectData<InvertEffect> = {\n lerp: (from, to, t) => ({\n type: \"invert\",\n channel: t < 0.5 ? from.channel : to.channel,\n strength: lerpNumber(from.strength, to.strength, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.channel === b.channel && a.strength === b.strength && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/invert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,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,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CAC9F,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Which channel(s) / colour space component the invert is applied to.\r\n *\r\n * - `'red' | 'green' | 'blue'` — invert a single RGB channel.\r\n * - `'rgba'` — invert red, green and blue (alpha untouched).\r\n * - `'alpha'` — invert the alpha channel.\r\n * - `'hue'` — rotate hue by 180°.\r\n * - `'luminance'` — invert perceptual luminance (BT.709) while preserving chroma.\r\n */\r\nexport type InvertChannel =\r\n | \"red\"\r\n | \"green\"\r\n | \"blue\"\r\n | \"rgba\"\r\n | \"alpha\"\r\n | \"hue\"\r\n | \"luminance\";\r\n\r\nexport interface InvertEffect extends ModedEffect {\r\n type: \"invert\";\r\n /** Which channel(s) / colour component to invert. */\r\n channel: InvertChannel;\r\n /** 0–1: blend from original (0) to fully inverted on `channel` (1). */\r\n strength: number;\r\n}\r\n\r\nexport const invertEffect: EffectData<InvertEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"invert\",\r\n channel: t < 0.5 ? from.channel : to.channel,\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.channel === b.channel && a.strength === b.strength && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kaleidoscope.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/kaleidoscope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAsCxE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,cAAc;QACpB,yEAAyE;QACzE,sEAAsE;QACtE,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Kaleidoscope — the content is folded into `segments` mirrored wedges around\n * `center`, so one slice of the source is repeated around a circle.\n *\n * Only the wedge starting at `angle` is ever read; every other segment is that\n * same wedge reflected or rotated into place. That is why rotating `angle`\n * animates so well — the pattern stays locked while *different source material*\n * sweeps through the wedge, which is the effect people actually want and is not\n * the same as rotating the node.\n *\n * `segments` counts the mirrored pairs, so 6 gives the familiar snowflake. It is\n * discrete: a tween snaps rather than passing through a fractional fold, which\n * would tear.\n */\nexport interface KaleidoscopeEffect extends ModedEffect {\n type: \"kaleidoscope\";\n /** Number of mirrored wedges around the circle. Below 2 the effect is a no-op. */\n segments: number;\n /** Rotation of the wedge pattern in degrees — animate it to sweep the source. */\n angle: number;\n /** Fold origin in 0–1 layer coords. */\n center: Vector2;\n /** Radial offset of the sampled wedge, as a fraction of the half-extent. */\n offset: number;\n /**\n * 0–1 blend from the original content to the fully folded pattern.\n *\n * `segments` is discrete, so it cannot be tweened up from 1 to ramp the\n * effect on — it would snap. This is the continuous handle that lets a\n * kaleidoscope be animated in, the same way `duotone` and `bitCrush` blend\n * back toward their source.\n */\n amount: number;\n}\n\nexport const kaleidoscopeEffect: EffectData<KaleidoscopeEffect> = {\n lerp: (from, to, t) => ({\n type: \"kaleidoscope\",\n // Fold count is discrete — a fractional wedge cannot tile the circle, so\n // it would tear at the seam. Snap like every other enum-valued field.\n segments: t < 0.5 ? from.segments : to.segments,\n angle: lerpNumber(from.angle, to.angle, t),\n center: lerpVector2(from.center, to.center, t),\n offset: lerpNumber(from.offset, to.offset, t),\n amount: lerpNumber(from.amount, to.amount, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.segments === b.segments &&\n a.angle === b.angle &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.offset === b.offset &&\n a.amount === b.amount &&\n a.mode === b.mode,\n // Resamples the source at a reflected position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"kaleidoscope.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/kaleidoscope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAsCxE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,cAAc;QACpB,yEAAyE;QACzE,sEAAsE;QACtE,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Kaleidoscope — the content is folded into `segments` mirrored wedges around\r\n * `center`, so one slice of the source is repeated around a circle.\r\n *\r\n * Only the wedge starting at `angle` is ever read; every other segment is that\r\n * same wedge reflected or rotated into place. That is why rotating `angle`\r\n * animates so well — the pattern stays locked while *different source material*\r\n * sweeps through the wedge, which is the effect people actually want and is not\r\n * the same as rotating the node.\r\n *\r\n * `segments` counts the mirrored pairs, so 6 gives the familiar snowflake. It is\r\n * discrete: a tween snaps rather than passing through a fractional fold, which\r\n * would tear.\r\n */\r\nexport interface KaleidoscopeEffect extends ModedEffect {\r\n type: \"kaleidoscope\";\r\n /** Number of mirrored wedges around the circle. Below 2 the effect is a no-op. */\r\n segments: number;\r\n /** Rotation of the wedge pattern in degrees — animate it to sweep the source. */\r\n angle: number;\r\n /** Fold origin in 0–1 layer coords. */\r\n center: Vector2;\r\n /** Radial offset of the sampled wedge, as a fraction of the half-extent. */\r\n offset: number;\r\n /**\r\n * 0–1 blend from the original content to the fully folded pattern.\r\n *\r\n * `segments` is discrete, so it cannot be tweened up from 1 to ramp the\r\n * effect on — it would snap. This is the continuous handle that lets a\r\n * kaleidoscope be animated in, the same way `duotone` and `bitCrush` blend\r\n * back toward their source.\r\n */\r\n amount: number;\r\n}\r\n\r\nexport const kaleidoscopeEffect: EffectData<KaleidoscopeEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"kaleidoscope\",\r\n // Fold count is discrete — a fractional wedge cannot tile the circle, so\r\n // it would tear at the seam. Snap like every other enum-valued field.\r\n segments: t < 0.5 ? from.segments : to.segments,\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n center: lerpVector2(from.center, to.center, t),\r\n offset: lerpNumber(from.offset, to.offset, t),\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.segments === b.segments &&\r\n a.angle === b.angle &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.offset === b.offset &&\r\n a.amount === b.amount &&\r\n a.mode === b.mode,\r\n // Resamples the source at a reflected position.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -8,7 +8,7 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
|
|
|
8
8
|
* why no combination of curves and matrices substitutes for one. Applying it is
|
|
9
9
|
* a trilinear lookup per pixel.
|
|
10
10
|
*
|
|
11
|
-
* A
|
|
11
|
+
* A node effect rather than a media-only adjustment, deliberately: everything
|
|
12
12
|
* outside {@link NonFilterEffect} is automatically an `EffectAdjustment` too, so
|
|
13
13
|
* one implementation grades an image fill's own pixels *and* a whole node —
|
|
14
14
|
* which is what lets a graded photo and the graded titles over it be the same
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+C1C,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,KAAK;QACX,oEAAoE;QACpE,sEAAsE;QACtE,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;QACnC,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4EAA4E;IAC5E,wEAAwE;IACxE,yBAAyB;IACzB,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * A 3D colour lookup table — the `.cube` a colourist hands you.\n *\n * The one adjustment in the roster that is not a formula. Everything else here\n * says what to *do* to a colour; a LUT is a measured cube of what each colour\n * should *become*, which is how film-stock and print emulations are shipped and\n * why no combination of curves and matrices substitutes for one. Applying it is\n * a trilinear lookup per pixel.\n *\n * A
|
|
1
|
+
{"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+C1C,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,KAAK;QACX,oEAAoE;QACpE,sEAAsE;QACtE,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;QACnC,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4EAA4E;IAC5E,wEAAwE;IACxE,yBAAyB;IACzB,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 3D colour lookup table — the `.cube` a colourist hands you.\r\n *\r\n * The one adjustment in the roster that is not a formula. Everything else here\r\n * says what to *do* to a colour; a LUT is a measured cube of what each colour\r\n * should *become*, which is how film-stock and print emulations are shipped and\r\n * why no combination of curves and matrices substitutes for one. Applying it is\r\n * a trilinear lookup per pixel.\r\n *\r\n * A node effect rather than a media-only adjustment, deliberately: everything\r\n * outside {@link NonFilterEffect} is automatically an `EffectAdjustment` too, so\r\n * one implementation grades an image fill's own pixels *and* a whole node —\r\n * which is what lets a graded photo and the graded titles over it be the same\r\n * look rather than two things kept in step by hand.\r\n *\r\n * ## The table\r\n *\r\n * Flat RGB triples, **red-fastest** — index `((b · size) + g) · size + r`, times\r\n * three — which is the order a `.cube` file writes its lines in, so a parser\r\n * fills this with no transposition to get wrong.\r\n *\r\n * It is a `Float32Array` and it is treated as **immutable and shared**: `equals`\r\n * compares it by reference and `lerp` hard-cuts it, exactly as `texture` does\r\n * with its `src`. That is not laziness. A 33³ cube is 107,811 floats; comparing\r\n * it per frame would cost more than the draw, interpolating it would allocate a\r\n * second cube per frame, and the renderer's GPU upload is cached against this\r\n * very identity. Hand the same array back each frame and a LUT costs one texture\r\n * upload for the life of the scene; build a fresh one per frame and it costs one\r\n * per frame.\r\n *\r\n * Cross-fading two *different* LUTs is therefore a cut, not a blend. That is the\r\n * honest answer — there is no meaningful midpoint between two measured cubes —\r\n * and the way to dissolve between looks is two fills, or {@link amount}.\r\n */\r\nexport interface LutEffect extends ModedEffect {\r\n type: \"lut\";\r\n /** The cube, flat RGB triples, red-fastest. Immutable and shared; see above. */\r\n table: Float32Array;\r\n /** Entries per axis. `table.length` must be `size³ × 3`. */\r\n size: number;\r\n /** 0–1 mix against the ungraded colour. 0 is a no-op, 1 is the full look. */\r\n amount: number;\r\n}\r\n\r\nexport const lutEffect: EffectData<LutEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"lut\",\r\n // The cube and its size travel together — a table read at the wrong\r\n // stride is not a wrong colour, it is garbage — so they cut together.\r\n table: t < 0.5 ? from.table : to.table,\r\n size: t < 0.5 ? from.size : to.size,\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.table === b.table &&\r\n a.size === b.size &&\r\n a.amount === b.amount &&\r\n a.mode === b.mode,\r\n // It samples a second texture at a coordinate derived from the source's own\r\n // colour, so it needs the source as a shader it can read — not a colour\r\n // matrix it can compose.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,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,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,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,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,yCAAyC;IACzC,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 MagnifyEffect extends ModedEffect {\n type: \"magnify\";\n /** Magnify centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */\n center: Vector2;\n /**\n * Magnification factor for the backdrop beneath the node.\n * 1 = no magnification, 2 = 2× magnified, 0.5 = zoomed out to half size.\n */\n scale: number;\n}\n\nexport const magnifyEffect: EffectData<MagnifyEffect> = {\n lerp: (from, to, t) => ({\n type: \"magnify\",\n center: lerpVector2(from.center, to.center, t),\n scale: lerpNumber(from.scale, to.scale, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.scale === b.scale &&\n a.mode === b.mode,\n // Resamples the backdrop about `center`.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,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,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,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,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,yCAAyC;IACzC,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 MagnifyEffect extends ModedEffect {\r\n type: \"magnify\";\r\n /** Magnify centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */\r\n center: Vector2;\r\n /**\r\n * Magnification factor for the backdrop beneath the node.\r\n * 1 = no magnification, 2 = 2× magnified, 0.5 = zoomed out to half size.\r\n */\r\n scale: number;\r\n}\r\n\r\nexport const magnifyEffect: EffectData<MagnifyEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"magnify\",\r\n center: lerpVector2(from.center, to.center, t),\r\n scale: lerpNumber(from.scale, to.scale, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.scale === b.scale &&\r\n a.mode === b.mode,\r\n // Resamples the backdrop about `center`.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAqCnE,oFAAoF;AACpF,MAAM,UAAU,0BAA0B,CAAC,SAA8B;IACrE,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,uEAAuE;QACvE,oEAAoE;QACpE,SAAS,EAAE,UAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC9G,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,IAAI,EAAE,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9E,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,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;QACnF,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData, EffectAxis } from \"../effect-data\";\nimport { resolveEffectAxis, sameEffectAxis } from \"../effect-data\";\n\n/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */\nexport type MotionBlurAlignment = \"behind\" | \"centered\" | \"ahead\" | number;\n\n/**\n * Velocity-driven motion blur. Unlike {@link DirectionalBlurEffect}, whose smear\n * is authored, this derives its direction and length from the node's actual\n * per-frame motion (sampled by the renderer), modelled on After Effects' shutter\n * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.\n */\nexport interface MotionBlurEffect extends ModedEffect {\n type: \"motionBlur\";\n /**\n * Shutter \"openness\" as a percentage, the user-friendly form of a shutter\n * angle. `100` ≈ 360° = a smear spanning the node's full per-frame\n * displacement; `0` = no blur.\n */\n length: number;\n /**\n * Shutter phase — where the smear sits relative to the node's current\n * position along its motion. `'behind'` (−1) trails the motion, `'centered'`\n * (0) straddles it, `'ahead'` (1) leads it; a number is clamped to −1…1.\n */\n alignment: MotionBlurAlignment;\n /**\n * Quality hint for the renderer. Low values use a cheap continuous smear;\n * above the renderer's threshold it switches to discrete multi-tap\n * accumulation (After Effects' \"Samples Per Frame\" look).\n */\n samples: number;\n /** Multiplier on the blur length. `1` = nominal, `0` = off. */\n strength: number;\n /** Per-axis velocity scale — see {@link EffectAxis}. */\n axis: EffectAxis;\n}\n\n/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */\nexport function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number {\n switch (alignment) {\n case \"behind\": return -1;\n case \"centered\": return 0;\n case \"ahead\": return 1;\n default: return Math.max(-1, Math.min(1, alignment));\n }\n}\n\nexport const motionBlurEffect: EffectData<MotionBlurEffect> = {\n lerp: (from, to, t) => ({\n type: \"motionBlur\",\n length: lerpNumber(from.length, to.length, t),\n // alignment lerps numerically once resolved to a phase; string presets\n // resolve to their numeric phase so e.g. 'behind' → 'ahead' sweeps.\n alignment: lerpNumber(resolveMotionBlurAlignment(from.alignment), resolveMotionBlurAlignment(to.alignment), t),\n samples: lerpNumber(from.samples, to.samples, t),\n strength: lerpNumber(from.strength, to.strength, t),\n axis: lerpVector2(resolveEffectAxis(from.axis), resolveEffectAxis(to.axis), t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.length === b.length &&\n resolveMotionBlurAlignment(a.alignment) === resolveMotionBlurAlignment(b.alignment) &&\n a.samples === b.samples &&\n a.strength === b.strength &&\n sameEffectAxis(a.axis, b.axis) &&\n a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAqCnE,oFAAoF;AACpF,MAAM,UAAU,0BAA0B,CAAC,SAA8B;IACrE,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,uEAAuE;QACvE,oEAAoE;QACpE,SAAS,EAAE,UAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC9G,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,IAAI,EAAE,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9E,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,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;QACnF,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData, EffectAxis } from \"../effect-data\";\r\nimport { resolveEffectAxis, sameEffectAxis } from \"../effect-data\";\r\n\r\n/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */\r\nexport type MotionBlurAlignment = \"behind\" | \"centered\" | \"ahead\" | number;\r\n\r\n/**\r\n * Velocity-driven motion blur. Unlike {@link DirectionalBlurEffect}, whose smear\r\n * is authored, this derives its direction and length from the node's actual\r\n * per-frame motion (sampled by the renderer), modelled on After Effects' shutter\r\n * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.\r\n */\r\nexport interface MotionBlurEffect extends ModedEffect {\r\n type: \"motionBlur\";\r\n /**\r\n * Shutter \"openness\" as a percentage, the user-friendly form of a shutter\r\n * angle. `100` ≈ 360° = a smear spanning the node's full per-frame\r\n * displacement; `0` = no blur.\r\n */\r\n length: number;\r\n /**\r\n * Shutter phase — where the smear sits relative to the node's current\r\n * position along its motion. `'behind'` (−1) trails the motion, `'centered'`\r\n * (0) straddles it, `'ahead'` (1) leads it; a number is clamped to −1…1.\r\n */\r\n alignment: MotionBlurAlignment;\r\n /**\r\n * Quality hint for the renderer. Low values use a cheap continuous smear;\r\n * above the renderer's threshold it switches to discrete multi-tap\r\n * accumulation (After Effects' \"Samples Per Frame\" look).\r\n */\r\n samples: number;\r\n /** Multiplier on the blur length. `1` = nominal, `0` = off. */\r\n strength: number;\r\n /** Per-axis velocity scale — see {@link EffectAxis}. */\r\n axis: EffectAxis;\r\n}\r\n\r\n/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */\r\nexport function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number {\r\n switch (alignment) {\r\n case \"behind\": return -1;\r\n case \"centered\": return 0;\r\n case \"ahead\": return 1;\r\n default: return Math.max(-1, Math.min(1, alignment));\r\n }\r\n}\r\n\r\nexport const motionBlurEffect: EffectData<MotionBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"motionBlur\",\r\n length: lerpNumber(from.length, to.length, t),\r\n // alignment lerps numerically once resolved to a phase; string presets\r\n // resolve to their numeric phase so e.g. 'behind' → 'ahead' sweeps.\r\n alignment: lerpNumber(resolveMotionBlurAlignment(from.alignment), resolveMotionBlurAlignment(to.alignment), t),\r\n samples: lerpNumber(from.samples, to.samples, t),\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n axis: lerpVector2(resolveEffectAxis(from.axis), resolveEffectAxis(to.axis), t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.length === b.length &&\r\n resolveMotionBlurAlignment(a.alignment) === resolveMotionBlurAlignment(b.alignment) &&\r\n a.samples === b.samples &&\r\n a.strength === b.strength &&\r\n sameEffectAxis(a.axis, b.axis) &&\r\n a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC5D,yCAAyC;IACzC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Kuwahara filter — the painterly one.\n *\n * Each pixel looks at four overlapping quadrant windows and takes the mean of\n * whichever is *flattest*. Averaging within a region but never across a boundary\n * is what makes it read as brushwork: flat areas smooth into strokes while edges\n * stay crisp, where a plain blur would soften both.\n *\n * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples\n * each — so this is the most expensive effect in the set by a wide margin.\n */\nexport interface OilPaintEffect extends ModedEffect {\n type: \"oilPaint\";\n /** Window radius in px. Brush size, and the dominant cost. 0 = off. */\n radius: number;\n}\n\nexport const oilPaintEffect: EffectData<OilPaintEffect> = {\n lerp: (from, to, t) => ({\n type: \"oilPaint\",\n radius: lerpNumber(from.radius, to.radius, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.radius === b.radius && a.mode === b.mode,\n // Reads a large neighbourhood per pixel.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC5D,yCAAyC;IACzC,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 * Kuwahara filter — the painterly one.\r\n *\r\n * Each pixel looks at four overlapping quadrant windows and takes the mean of\r\n * whichever is *flattest*. Averaging within a region but never across a boundary\r\n * is what makes it read as brushwork: flat areas smooth into strokes while edges\r\n * stay crisp, where a plain blur would soften both.\r\n *\r\n * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples\r\n * each — so this is the most expensive effect in the set by a wide margin.\r\n */\r\nexport interface OilPaintEffect extends ModedEffect {\r\n type: \"oilPaint\";\r\n /** Window radius in px. Brush size, and the dominant cost. 0 = off. */\r\n radius: number;\r\n}\r\n\r\nexport const oilPaintEffect: EffectData<OilPaintEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"oilPaint\",\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.radius === b.radius && a.mode === b.mode,\r\n // Reads a large neighbourhood per pixel.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.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;AA2BrE,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjF,6EAA6E;QAC7E,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0EAA0E;IAC1E,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 * Where the outline sits relative to the node's silhouette — the same three\n * choices Figma and Illustrator offer for a stroke:\n *\n * - `\"outside\"` grows outward from the edge, leaving the content untouched.\n * - `\"inside\"` eats inward, so the node's footprint never changes.\n * - `\"center\"` straddles the edge, half of `width` on each side.\n */\nexport type OutlinePosition = \"outside\" | \"center\" | \"inside\";\n\n/**\n * A coloured band traced around the node's silhouette — the alpha outline\n * (a.k.a. \"stroke\" in Figma) that geometry strokes can't give you when the\n * silhouette comes from text, an image's alpha, or a whole subtree.\n */\nexport interface OutlineEffect extends ModedEffect {\n type: \"outline\";\n /** Band thickness in px. 0 = off. */\n width: number;\n /** Band colour — any CSS colour, theme alias, or RGBA tuple. */\n color: Color;\n /** Which side of the silhouette edge the band grows from. */\n position: OutlinePosition;\n}\n\nexport const outlineEffect: EffectData<OutlineEffect> = {\n lerp: (from, to, t) => ({\n type: \"outline\",\n width: lerpNumber(from.width, to.width, t),\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\n // position is discrete — snap at the midpoint like other enum-valued fields.\n position: t < 0.5 ? from.position : to.position,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.width === b.width &&\n sameEffectColor(a.color, b.color) &&\n a.position === b.position &&\n a.mode === b.mode,\n // Reads a ring of neighbouring texels to dilate/erode the source's alpha.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"outline.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.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;AA2BrE,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjF,6EAA6E;QAC7E,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QAC/C,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0EAA0E;IAC1E,OAAO,EAAE,QAAQ;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 * Where the outline sits relative to the node's silhouette — the same three\r\n * choices Figma and Illustrator offer for a stroke:\r\n *\r\n * - `\"outside\"` grows outward from the edge, leaving the content untouched.\r\n * - `\"inside\"` eats inward, so the node's footprint never changes.\r\n * - `\"center\"` straddles the edge, half of `width` on each side.\r\n */\r\nexport type OutlinePosition = \"outside\" | \"center\" | \"inside\";\r\n\r\n/**\r\n * A coloured band traced around the node's silhouette — the alpha outline\r\n * (a.k.a. \"stroke\" in Figma) that geometry strokes can't give you when the\r\n * silhouette comes from text, an image's alpha, or a whole subtree.\r\n */\r\nexport interface OutlineEffect extends ModedEffect {\r\n type: \"outline\";\r\n /** Band thickness in px. 0 = off. */\r\n width: number;\r\n /** Band colour — any CSS colour, theme alias, or RGBA tuple. */\r\n color: Color;\r\n /** Which side of the silhouette edge the band grows from. */\r\n position: OutlinePosition;\r\n}\r\n\r\nexport const outlineEffect: EffectData<OutlineEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"outline\",\r\n width: lerpNumber(from.width, to.width, t),\r\n color: lerpColor(resolveEffectColor(from.color), resolveEffectColor(to.color), t),\r\n // position is discrete — snap at the midpoint like other enum-valued fields.\r\n position: t < 0.5 ? from.position : to.position,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.width === b.width &&\r\n sameEffectColor(a.color, b.color) &&\r\n a.position === b.position &&\r\n a.mode === b.mode,\r\n // Reads a ring of neighbouring texels to dilate/erode the source's alpha.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixelate.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/pixelate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AAyBnE,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,oDAAoD;QACpD,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW;QACxD,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,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpVector2, Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * After Effects-style Mosaic / pixelate.\n *\n * `blocks` is the *number of blocks* across the node on each axis, exactly like\n * AE's Mosaic \"Horizontal Blocks\" / \"Vertical Blocks\". A count equal to the\n * node's pixel dimension on that axis leaves the image untouched (one block per\n * pixel); lower counts give larger, coarser blocks. For a 1920×1080 image,\n * `{ x: 1920, y: 1080 }` is pristine and `{ x: 200, y: 180 }` is heavily\n * pixelated.\n *\n * `sharpColors` mirrors AE's \"Sharp Colors\" checkbox: when `true` each block is\n * a single solid colour with hard edges (nearest-neighbour); when `false` the\n * block colours are smoothly interpolated between centres (linear).\n */\nexport interface PixelateEffect extends ModedEffect {\n type: \"pixelate\";\n /** Block count per axis — `x` horizontal, `y` vertical. */\n blocks: Vector2;\n /** AE \"Sharp Colors\": solid blocks (true) vs. smoothly blended (false). */\n sharpColors: boolean;\n}\n\nexport const pixelateEffect: EffectData<PixelateEffect> = {\n lerp: (from, to, t) => ({\n type: \"pixelate\",\n blocks: lerpVector2(from.blocks, to.blocks, t),\n // Boolean has no in-between — snap at the midpoint.\n sharpColors: t < 0.5 ? from.sharpColors : to.sharpColors,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.blocks.x === b.blocks.x &&\n a.blocks.y === b.blocks.y &&\n a.sharpColors === b.sharpColors &&\n a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"pixelate.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/pixelate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AAyBnE,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,oDAAoD;QACpD,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW;QACxD,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,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpVector2, Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * After Effects-style Mosaic / pixelate.\r\n *\r\n * `blocks` is the *number of blocks* across the node on each axis, exactly like\r\n * AE's Mosaic \"Horizontal Blocks\" / \"Vertical Blocks\". A count equal to the\r\n * node's pixel dimension on that axis leaves the image untouched (one block per\r\n * pixel); lower counts give larger, coarser blocks. For a 1920×1080 image,\r\n * `{ x: 1920, y: 1080 }` is pristine and `{ x: 200, y: 180 }` is heavily\r\n * pixelated.\r\n *\r\n * `sharpColors` mirrors AE's \"Sharp Colors\" checkbox: when `true` each block is\r\n * a single solid colour with hard edges (nearest-neighbour); when `false` the\r\n * block colours are smoothly interpolated between centres (linear).\r\n */\r\nexport interface PixelateEffect extends ModedEffect {\r\n type: \"pixelate\";\r\n /** Block count per axis — `x` horizontal, `y` vertical. */\r\n blocks: Vector2;\r\n /** AE \"Sharp Colors\": solid blocks (true) vs. smoothly blended (false). */\r\n sharpColors: boolean;\r\n}\r\n\r\nexport const pixelateEffect: EffectData<PixelateEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"pixelate\",\r\n blocks: lerpVector2(from.blocks, to.blocks, t),\r\n // Boolean has no in-between — snap at the midpoint.\r\n sharpColors: t < 0.5 ? from.sharpColors : to.sharpColors,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.blocks.x === b.blocks.x &&\r\n a.blocks.y === b.blocks.y &&\r\n a.sharpColors === b.sharpColors &&\r\n a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posterize.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/posterize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC5D,4DAA4D;IAC5D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * After Effects-style Posterize.\n *\n * Quantizes each colour channel into `levels` evenly-spaced brightness steps, so\n * smooth gradients collapse into flat bands. `levels` is the number of tones per\n * channel (matching AE's single \"Level\" parameter): 2 → pure two-tone per\n * channel, higher values keep more detail. Below 2 there is nothing to band, so\n * the effect is a no-op.\n */\nexport interface PosterizeEffect extends ModedEffect {\n type: \"posterize\";\n /** Number of brightness levels per channel (AE \"Level\", ≥ 2). */\n levels: number;\n}\n\nexport const posterizeEffect: EffectData<PosterizeEffect> = {\n lerp: (from, to, t) => ({\n type: \"posterize\",\n levels: lerpNumber(from.levels, to.levels, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.levels === b.levels && a.mode === b.mode,\n // Reads its source texel-by-texel through a banding shader.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"posterize.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/posterize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC5D,4DAA4D;IAC5D,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 * After Effects-style Posterize.\r\n *\r\n * Quantizes each colour channel into `levels` evenly-spaced brightness steps, so\r\n * smooth gradients collapse into flat bands. `levels` is the number of tones per\r\n * channel (matching AE's single \"Level\" parameter): 2 → pure two-tone per\r\n * channel, higher values keep more detail. Below 2 there is nothing to band, so\r\n * the effect is a no-op.\r\n */\r\nexport interface PosterizeEffect extends ModedEffect {\r\n type: \"posterize\";\r\n /** Number of brightness levels per channel (AE \"Level\", ≥ 2). */\r\n levels: number;\r\n}\r\n\r\nexport const posterizeEffect: EffectData<PosterizeEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"posterize\",\r\n levels: lerpNumber(from.levels, to.levels, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.levels === b.levels && a.mode === b.mode,\r\n // Reads its source texel-by-texel through a banding shader.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/progressive-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAyDxE,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,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACpC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,uEAAuE;QACvE,qEAAqE;QACrE,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,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0DAA0D;IAC1D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * How the blur ramp is laid out across the node.\n *\n * - `\"linear\"` — the ramp runs along `angle`, so the blur builds from one edge\n * toward the other. The gradient/fade-to-blur strip under a toolbar or over\n * the bottom of a hero image.\n * - `\"radial\"` — the ramp runs outward from `center`, so the middle stays sharp\n * and the surround softens. A cheap depth-of-field / tilt-shift.\n */\nexport type ProgressiveBlurShape = \"linear\" | \"radial\";\n\n/**\n * Blur whose radius *ramps* across the node instead of being uniform.\n *\n * A plain blur is a constant; this interpolates from `startRadius` to `radius`\n * between `start` and `end` along the ramp, which is what makes content appear\n * to dissolve into softness rather than simply being out of focus.\n *\n * **In `mode: 'backdrop'` this is the frosted panel with a falloff** — the\n * translucent bar whose blur fades out at its edge instead of stopping at a hard\n * line. That is the case a plain backdrop blur cannot express, and the reason\n * this effect exists.\n *\n * Cost scales with `samples`, which are spent on the *widest* part of the ramp;\n * pixels below `start` return the source untouched without sampling at all.\n */\nexport interface ProgressiveBlurEffect extends ModedEffect {\n type: \"progressiveBlur\";\n /** Blur spread in px at the far end of the ramp. 0 = off. */\n radius: number;\n /**\n * Blur spread in px at the *near* end of the ramp — where the ramp begins,\n * rather than where it arrives.\n *\n * `0` (the default, and what this effect did before the field existed) means\n * the ramp starts from sharp. A non-zero value ramps between two softnesses\n * instead of out of one, which is what a depth-of-field falloff actually\n * looks like: the near field is rarely perfectly sharp either.\n */\n startRadius: number;\n /** How the ramp is laid out. */\n shape: ProgressiveBlurShape;\n /** 0–1 position along the ramp where the blur starts building. */\n start: number;\n /** 0–1 position where the blur reaches `radius`. */\n end: number;\n /** Ramp direction in degrees; 0 = left-to-right. `\"linear\"` only. */\n angle: number;\n /** Ramp origin in 0–1 layer coords. `\"radial\"` only. */\n center: Vector2;\n /** Taps averaged at full radius; higher is smoother and slower. */\n samples: number;\n}\n\nexport const progressiveBlurEffect: EffectData<ProgressiveBlurEffect> = {\n lerp: (from, to, t) => ({\n type: \"progressiveBlur\",\n radius: lerpNumber(from.radius, to.radius, t),\n startRadius: lerpNumber(from.startRadius, to.startRadius, t),\n shape: t < 0.5 ? from.shape : to.shape,\n start: lerpNumber(from.start, to.start, t),\n end: lerpNumber(from.end, to.end, t),\n angle: lerpNumber(from.angle, to.angle, t),\n center: lerpVector2(from.center, to.center, t),\n // A tap count has no meaningful in-between — a fractional sample count\n // would just round, so snap and keep the shader's loop bound stable.\n samples: t < 0.5 ? from.samples : to.samples,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.radius === b.radius &&\n a.startRadius === b.startRadius &&\n a.shape === b.shape &&\n a.start === b.start &&\n a.end === b.end &&\n a.angle === b.angle &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.samples === b.samples &&\n a.mode === b.mode,\n // Averages a neighbourhood whose extent varies per pixel.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"progressive-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/progressive-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAyDxE,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,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACpC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,uEAAuE;QACvE,qEAAqE;QACrE,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,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0DAA0D;IAC1D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * How the blur ramp is laid out across the node.\r\n *\r\n * - `\"linear\"` — the ramp runs along `angle`, so the blur builds from one edge\r\n * toward the other. The gradient/fade-to-blur strip under a toolbar or over\r\n * the bottom of a hero image.\r\n * - `\"radial\"` — the ramp runs outward from `center`, so the middle stays sharp\r\n * and the surround softens. A cheap depth-of-field / tilt-shift.\r\n */\r\nexport type ProgressiveBlurShape = \"linear\" | \"radial\";\r\n\r\n/**\r\n * Blur whose radius *ramps* across the node instead of being uniform.\r\n *\r\n * A plain blur is a constant; this interpolates from `startRadius` to `radius`\r\n * between `start` and `end` along the ramp, which is what makes content appear\r\n * to dissolve into softness rather than simply being out of focus.\r\n *\r\n * **In `mode: 'backdrop'` this is the frosted panel with a falloff** — the\r\n * translucent bar whose blur fades out at its edge instead of stopping at a hard\r\n * line. That is the case a plain backdrop blur cannot express, and the reason\r\n * this effect exists.\r\n *\r\n * Cost scales with `samples`, which are spent on the *widest* part of the ramp;\r\n * pixels below `start` return the source untouched without sampling at all.\r\n */\r\nexport interface ProgressiveBlurEffect extends ModedEffect {\r\n type: \"progressiveBlur\";\r\n /** Blur spread in px at the far end of the ramp. 0 = off. */\r\n radius: number;\r\n /**\r\n * Blur spread in px at the *near* end of the ramp — where the ramp begins,\r\n * rather than where it arrives.\r\n *\r\n * `0` (the default, and what this effect did before the field existed) means\r\n * the ramp starts from sharp. A non-zero value ramps between two softnesses\r\n * instead of out of one, which is what a depth-of-field falloff actually\r\n * looks like: the near field is rarely perfectly sharp either.\r\n */\r\n startRadius: number;\r\n /** How the ramp is laid out. */\r\n shape: ProgressiveBlurShape;\r\n /** 0–1 position along the ramp where the blur starts building. */\r\n start: number;\r\n /** 0–1 position where the blur reaches `radius`. */\r\n end: number;\r\n /** Ramp direction in degrees; 0 = left-to-right. `\"linear\"` only. */\r\n angle: number;\r\n /** Ramp origin in 0–1 layer coords. `\"radial\"` only. */\r\n center: Vector2;\r\n /** Taps averaged at full radius; higher is smoother and slower. */\r\n samples: number;\r\n}\r\n\r\nexport const progressiveBlurEffect: EffectData<ProgressiveBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"progressiveBlur\",\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n startRadius: lerpNumber(from.startRadius, to.startRadius, t),\r\n shape: t < 0.5 ? from.shape : to.shape,\r\n start: lerpNumber(from.start, to.start, t),\r\n end: lerpNumber(from.end, to.end, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n center: lerpVector2(from.center, to.center, t),\r\n // A tap count has no meaningful in-between — a fractional sample count\r\n // would just round, so snap and keep the shader's loop bound stable.\r\n samples: t < 0.5 ? from.samples : to.samples,\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.radius === b.radius &&\r\n a.startRadius === b.startRadius &&\r\n a.shape === b.shape &&\r\n a.start === b.start &&\r\n a.end === b.end &&\r\n a.angle === b.angle &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.samples === b.samples &&\r\n a.mode === b.mode,\r\n // Averages a neighbourhood whose extent varies per pixel.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radial-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/radial-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAgC1D,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,yEAAyE;QACzE,iDAAiD;QACjD,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,oCAAoC;IACpC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Which way the samples are smeared around {@link RadialBlurEffect.center}.\n *\n * - `\"zoom\"` — along the radius: a rush toward or away from the centre.\n * - `\"spin\"` — along the tangent: rotational motion about the centre.\n *\n * (After Effects calls this the effect's \"Type\"; here that name belongs to the\n * effect discriminator, so the field is `style`.)\n */\nexport type RadialBlurStyle = \"zoom\" | \"spin\";\n\n/**\n * After Effects' Radial Blur — the source is sampled repeatedly along a path\n * that radiates from (`zoom`) or circles (`spin`) a centre point, and the taps\n * are averaged. The centre stays sharp and the smear grows with distance, which\n * is what makes it read as speed rather than as softness.\n */\nexport interface RadialBlurEffect extends ModedEffect {\n type: \"radialBlur\";\n /** Smear length as a fraction of the node's half-extent (zoom) or of a turn (spin). 0 = off. */\n amount: number;\n /** Radial rush or rotational streak. */\n style: RadialBlurStyle;\n /** Centre of the blur in 0–1 layer coords (default middle). */\n center: Vector2;\n /** Taps averaged per pixel; higher is smoother and slower. */\n samples: number;\n}\n\nexport const radialBlurEffect: EffectData<RadialBlurEffect> = {\n lerp: (from, to, t) => ({\n type: \"radialBlur\",\n amount: lerpNumber(from.amount, to.amount, t),\n style: t < 0.5 ? from.style : to.style,\n center: lerpVector2(from.center, to.center, t),\n // Sample count is a quality knob, not a look — snap rather than blend to\n // fractional taps the shader would round anyway.\n samples: t < 0.5 ? from.samples : to.samples,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.amount === b.amount &&\n a.style === b.style &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.samples === b.samples &&\n a.mode === b.mode,\n // Resamples along a path per pixel.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"radial-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/radial-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAgC1D,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,yEAAyE;QACzE,iDAAiD;QACjD,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,oCAAoC;IACpC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Which way the samples are smeared around {@link RadialBlurEffect.center}.\r\n *\r\n * - `\"zoom\"` — along the radius: a rush toward or away from the centre.\r\n * - `\"spin\"` — along the tangent: rotational motion about the centre.\r\n *\r\n * (After Effects calls this the effect's \"Type\"; here that name belongs to the\r\n * effect discriminator, so the field is `style`.)\r\n */\r\nexport type RadialBlurStyle = \"zoom\" | \"spin\";\r\n\r\n/**\r\n * After Effects' Radial Blur — the source is sampled repeatedly along a path\r\n * that radiates from (`zoom`) or circles (`spin`) a centre point, and the taps\r\n * are averaged. The centre stays sharp and the smear grows with distance, which\r\n * is what makes it read as speed rather than as softness.\r\n */\r\nexport interface RadialBlurEffect extends ModedEffect {\r\n type: \"radialBlur\";\r\n /** Smear length as a fraction of the node's half-extent (zoom) or of a turn (spin). 0 = off. */\r\n amount: number;\r\n /** Radial rush or rotational streak. */\r\n style: RadialBlurStyle;\r\n /** Centre of the blur in 0–1 layer coords (default middle). */\r\n center: Vector2;\r\n /** Taps averaged per pixel; higher is smoother and slower. */\r\n samples: number;\r\n}\r\n\r\nexport const radialBlurEffect: EffectData<RadialBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"radialBlur\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n style: t < 0.5 ? from.style : to.style,\r\n center: lerpVector2(from.center, to.center, t),\r\n // Sample count is a quality knob, not a look — snap rather than blend to\r\n // fractional taps the shader would round anyway.\r\n samples: t < 0.5 ? from.samples : to.samples,\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.style === b.style &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.samples === b.samples &&\r\n a.mode === b.mode,\r\n // Resamples along a path per pixel.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rgb-shift.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/rgb-shift.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAyB1D,MAAM,UAAU,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACrC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,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,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;QACxB,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QAC5B,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC1B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Per-channel spatial offset — the red/green/blue planes pulled apart along\n * independent vectors.\n *\n * Where `chromaticAberration` models a *lens*, so its fringing is symmetric and\n * driven by one distance and angle, this is the digital-artefact version: each\n * channel is displaced wherever you point it, including all three differently.\n * That freedom is what makes it the RGB-tear component of a glitch, and it is\n * why the two effects coexist rather than one subsuming the other.\n *\n * Offsets are in px and scale with the node, like every other px option.\n */\nexport interface RgbShiftEffect extends ModedEffect {\n type: \"rgbShift\";\n /** Red plane offset in px. */\n red: Vector2;\n /** Green plane offset in px. */\n green: Vector2;\n /** Blue plane offset in px. */\n blue: Vector2;\n}\n\nconst sameVector = (a: Vector2, b: Vector2) => a.x === b.x && a.y === b.y;\n\nexport const rgbShiftEffect: EffectData<RgbShiftEffect> = {\n lerp: (from, to, t) => ({\n type: \"rgbShift\",\n red: lerpVector2(from.red, to.red, t),\n green: lerpVector2(from.green, to.green, t),\n blue: lerpVector2(from.blue, to.blue, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n sameVector(a.red, b.red) &&\n sameVector(a.green, b.green) &&\n sameVector(a.blue, b.blue) &&\n a.mode === b.mode,\n // Samples each channel at a different position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"rgb-shift.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/rgb-shift.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAyB1D,MAAM,UAAU,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACrC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,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,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;QACxB,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QAC5B,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC1B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Per-channel spatial offset — the red/green/blue planes pulled apart along\r\n * independent vectors.\r\n *\r\n * Where `chromaticAberration` models a *lens*, so its fringing is symmetric and\r\n * driven by one distance and angle, this is the digital-artefact version: each\r\n * channel is displaced wherever you point it, including all three differently.\r\n * That freedom is what makes it the RGB-tear component of a glitch, and it is\r\n * why the two effects coexist rather than one subsuming the other.\r\n *\r\n * Offsets are in px and scale with the node, like every other px option.\r\n */\r\nexport interface RgbShiftEffect extends ModedEffect {\r\n type: \"rgbShift\";\r\n /** Red plane offset in px. */\r\n red: Vector2;\r\n /** Green plane offset in px. */\r\n green: Vector2;\r\n /** Blue plane offset in px. */\r\n blue: Vector2;\r\n}\r\n\r\nconst sameVector = (a: Vector2, b: Vector2) => a.x === b.x && a.y === b.y;\r\n\r\nexport const rgbShiftEffect: EffectData<RgbShiftEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"rgbShift\",\r\n red: lerpVector2(from.red, to.red, t),\r\n green: lerpVector2(from.green, to.green, t),\r\n blue: lerpVector2(from.blue, to.blue, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n sameVector(a.red, b.red) &&\r\n sameVector(a.green, b.green) &&\r\n sameVector(a.blue, b.blue) &&\r\n a.mode === b.mode,\r\n // Samples each channel at a different position.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanlines.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/scanlines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAwB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,qDAAqD;IACrD,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * CRT scanlines — periodic dark bands across the content.\n *\n * `offset` scrolls the band pattern; animating it past `spacing` produces the\n * slow vertical roll of a mistuned display, and it wraps, so a linear tween of\n * `offset` loops seamlessly.\n */\nexport interface ScanlinesEffect extends ModedEffect {\n type: \"scanlines\";\n /** Distance between band centres, in px. */\n spacing: number;\n /** 0–1 share of each period the dark band covers. */\n thickness: number;\n /** 0–1 how far the bands darken. 0 = off. */\n darkness: number;\n /** Band offset in px — animate it to roll the pattern. */\n offset: number;\n /** Band angle in degrees. 0 = horizontal bands. */\n angle: number;\n}\n\nexport const scanlinesEffect: EffectData<ScanlinesEffect> = {\n lerp: (from, to, t) => ({\n type: \"scanlines\",\n spacing: lerpNumber(from.spacing, to.spacing, t),\n thickness: lerpNumber(from.thickness, to.thickness, t),\n darkness: lerpNumber(from.darkness, to.darkness, t),\n offset: lerpNumber(from.offset, to.offset, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.spacing === b.spacing &&\n a.thickness === b.thickness &&\n a.darkness === b.darkness &&\n a.offset === b.offset &&\n a.angle === b.angle &&\n a.mode === b.mode,\n // The band a pixel falls in depends on its position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"scanlines.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/scanlines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAwB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,qDAAqD;IACrD,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 * CRT scanlines — periodic dark bands across the content.\r\n *\r\n * `offset` scrolls the band pattern; animating it past `spacing` produces the\r\n * slow vertical roll of a mistuned display, and it wraps, so a linear tween of\r\n * `offset` loops seamlessly.\r\n */\r\nexport interface ScanlinesEffect extends ModedEffect {\r\n type: \"scanlines\";\r\n /** Distance between band centres, in px. */\r\n spacing: number;\r\n /** 0–1 share of each period the dark band covers. */\r\n thickness: number;\r\n /** 0–1 how far the bands darken. 0 = off. */\r\n darkness: number;\r\n /** Band offset in px — animate it to roll the pattern. */\r\n offset: number;\r\n /** Band angle in degrees. 0 = horizontal bands. */\r\n angle: number;\r\n}\r\n\r\nexport const scanlinesEffect: EffectData<ScanlinesEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"scanlines\",\r\n spacing: lerpNumber(from.spacing, to.spacing, t),\r\n thickness: lerpNumber(from.thickness, to.thickness, t),\r\n darkness: lerpNumber(from.darkness, to.darkness, t),\r\n offset: lerpNumber(from.offset, to.offset, 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) =>\r\n a.spacing === b.spacing &&\r\n a.thickness === b.thickness &&\r\n a.darkness === b.darkness &&\r\n a.offset === b.offset &&\r\n a.angle === b.angle &&\r\n a.mode === b.mode,\r\n // The band a pixel falls in depends on its position.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatter.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/scatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAahD,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,0EAA0E;QAC1E,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,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAClG,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,kCAAkC;IAClC,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\nexport interface ScatterEffect extends ModedEffect {\n type: \"scatter\";\n /**\n * Maximum random pixel displacement applied per-pixel. Larger values smear\n * the node's own content further (After Effects' \"Scatter Amount\"). 0 = off.\n */\n strength: number;\n /** Which axis (or axes) pixels are displaced along. */\n axis: EffectAxis;\n}\n\nexport const scatterEffect: EffectData<ScatterEffect> = {\n lerp: (from, to, t) => ({\n type: \"scatter\",\n strength: lerpNumber(from.strength, to.strength, t),\n // axis is discrete — snap at the midpoint like other enum-valued effects.\n axis: t < 0.5 ? from.axis : to.axis,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.strength === b.strength && sameEffectAxis(a.axis, b.axis) && a.mode === b.mode,\n // Displaces each pixel by a hash of its position, so it needs random access\n // to its source. It was realised as a displacement-map ImageFilter until the\n // filter path's layer snapping was found to re-roll the field whenever the\n // node stood on a fractional pixel — see the renderer's `scatter` handler,\n // which carries the full account.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"scatter.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/scatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAahD,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,0EAA0E;QAC1E,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,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAClG,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,kCAAkC;IAClC,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\nexport interface ScatterEffect extends ModedEffect {\r\n type: \"scatter\";\r\n /**\r\n * Maximum random pixel displacement applied per-pixel. Larger values smear\r\n * the node's own content further (After Effects' \"Scatter Amount\"). 0 = off.\r\n */\r\n strength: number;\r\n /** Which axis (or axes) pixels are displaced along. */\r\n axis: EffectAxis;\r\n}\r\n\r\nexport const scatterEffect: EffectData<ScatterEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"scatter\",\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n // axis is discrete — snap at the midpoint like other enum-valued effects.\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) => a.strength === b.strength && sameEffectAxis(a.axis, b.axis) && a.mode === b.mode,\r\n // Displaces each pixel by a hash of its position, so it needs random access\r\n // to its source. It was realised as a displacement-map ImageFilter until the\r\n // filter path's layer snapping was found to re-roll the field whenever the\r\n // node stood on a fractional pixel — see the renderer's `scatter` handler,\r\n // which carries the full account.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/shader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAIH,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAK7B,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,QAAQ,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAAC;IAC5C;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"shader.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/shader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAIH,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAK7B,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,QAAQ,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAAC;IAC5C;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAgDjD,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,UAAU,0BAAe,CAAC"}
|
|
@@ -18,14 +18,21 @@ export const shaderEffect = {
|
|
|
18
18
|
const { shader, ...rest } = legacy;
|
|
19
19
|
return { ...rest, type: "shader", source: effect.source ?? shader ?? "" };
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
// The program and what it is blended with snap at the midpoint, as the
|
|
22
|
+
// `shader` fill's source does: the source is the compile-cache key, so there
|
|
23
|
+
// is no program halfway between two. Only the uniform values interpolate
|
|
24
|
+
// (over the union of names), which keeps a same-program tween smooth.
|
|
25
|
+
lerp: (from, to, t) => {
|
|
26
|
+
const near = t < 0.5 ? from : to;
|
|
27
|
+
return {
|
|
28
|
+
type: "shader",
|
|
29
|
+
source: near.source,
|
|
30
|
+
...(near.shaderId !== undefined ? { shaderId: near.shaderId } : {}),
|
|
31
|
+
mode: near.mode,
|
|
32
|
+
blendMode: near.blendMode,
|
|
33
|
+
uniforms: lerpUniformRecord(normalizeUniforms(from.uniforms), normalizeUniforms(to.uniforms), t),
|
|
34
|
+
};
|
|
35
|
+
},
|
|
29
36
|
// By name, matching how the values are bound. Two sets agreeing on every
|
|
30
37
|
// name and value are the same binding — which they were not while the float
|
|
31
38
|
// buffer was filled in array order.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/shader.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GAItB,MAAM,qBAAqB,CAAC;AA8E7B,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD;;;;;;;;;OASG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,MAAM,GAAG,MAA4B,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC;QACtE,IAAI,CAAC,KAAK;YAAE,OAAO,MAAM,CAAC;QAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;IAC9E,CAAC;IACD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"shader.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/shader.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GAItB,MAAM,qBAAqB,CAAC;AA8E7B,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD;;;;;;;;;OASG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,MAAM,GAAG,MAA4B,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC;QACtE,IAAI,CAAC,KAAK;YAAE,OAAO,MAAM,CAAC;QAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;IAC9E,CAAC;IACD,uEAAuE;IACvE,6EAA6E;IAC7E,yEAAyE;IACzE,sEAAsE;IACtE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,iBAAiB,CACvB,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAChC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,CAAC,EAC9B,CAAC,CACJ;SACJ,CAAC;IACN,CAAC;IACD,yEAAyE;IACzE,4EAA4E;IAC5E,oCAAoC;IACpC,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,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACrF,4EAA4E;IAC5E,wEAAwE;IACxE,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;CAC1E,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC","sourcesContent":["import type { BlendMode } from \"../../fill/blend\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport {\r\n lerpUniformRecord,\r\n normalizeUniforms,\r\n uniformRecordsEqual,\r\n type SkSLUniform,\r\n type SkSLUniformRecord,\r\n type SkSLUniformValue,\r\n} from \"../../sksl-uniforms\";\r\n\r\n// The uniform vocabulary is shared with the `shader` fill — the same values,\r\n// marshalled by name in both places. Re-exported here so the specifier\r\n// consumers already use keeps resolving.\r\nexport type { SkSLUniform, SkSLUniformRecord, SkSLUniformValue };\r\n\r\n/**\r\n * A custom shader, classified by the shared {@link EffectMode}:\r\n *\r\n * - `'backdrop'`: the shader receives `uniform shader u_backdrop` — a snapshot of\r\n * the canvas content beneath the node. For magnification, distortion, ripple.\r\n * The result replaces the backdrop within the node's silhouette clip.\r\n *\r\n * - `'foreground'` (the default): the shader is applied as an overlay on the\r\n * node's own layer via `ImageFilter.MakeShader`, generating a colour from\r\n * uniforms and position and compositing with {@link blendMode}. For procedural\r\n * overlays — noise, gradients, glows.\r\n *\r\n * Named for the paint it is the sibling of rather than for the dialect it is\r\n * written in: this is the same act as a `shader` **fill**, on a layer instead of\r\n * inside a path, and one word for both is what lets a source move between them.\r\n * It answered to `sksl` before, which is still accepted — see {@link resolve}.\r\n */\r\nexport interface ShaderEffect extends ModedEffect {\r\n type: \"shader\";\r\n /** SkSL source. */\r\n source: string;\r\n /**\r\n * Uniform values, by name. Values lerp component-wise.\r\n *\r\n * The positional `[{ name, value }]` array every document written before\r\n * this is still accepted and normalised on the way in — binding used to be\r\n * by *position*, so the array's order was the contract. It is not any more:\r\n * the program's own reflection says which float offset each name occupies,\r\n * which is what makes a padded value, a mistyped name and a forgotten one\r\n * behave instead of silently corrupting every uniform after them.\r\n */\r\n uniforms: SkSLUniformRecord | SkSLUniform[];\r\n /**\r\n * The shader pack this was built from, when it was built from one.\r\n *\r\n * **Reserved, and carried rather than read.** A pack resolves to a plain\r\n * uniform record before it reaches here, so nothing in the render path needs\r\n * this — the frame is identical with or without it. What it exists for is the\r\n * trip back: a document stores resolved uniforms, and without a reference to\r\n * the pack a host reopening a saved scene has a set of numbers and no way to\r\n * know which of them were `twist` and `ink`, so the property panel it drew\r\n * when the shader was applied cannot be drawn again.\r\n *\r\n * An id naming a pack that is not registered is **not** an error: the shader\r\n * still renders, because the uniforms it needs are already in the document.\r\n * The host simply cannot offer the panel, which is the honest degradation —\r\n * refusing to render a scene because an editor cannot edit it would be the\r\n * wrong way round.\r\n */\r\n shaderId?: string;\r\n /**\r\n * Blend mode used when `mode` is `'foreground'`. Defaults to `'screen'` so the\r\n * generated overlay composites additively onto the layer. Ignored for\r\n * `'backdrop'`, where the shader's output replaces the backdrop.\r\n */\r\n blendMode?: BlendMode;\r\n}\r\n\r\n/**\r\n * What this effect was called before, and the field its source sat in.\r\n *\r\n * @deprecated Use {@link ShaderEffect}. Documents naming `sksl` keep working.\r\n */\r\nexport type SkSLEffect = Omit<ShaderEffect, \"type\" | \"source\"> & {\r\n type: \"sksl\";\r\n shader: string;\r\n};\r\n\r\n/** The shape a document written against the old spelling has. */\r\ntype LegacyShaderEffect = ShaderEffect & { shader?: string };\r\n\r\nexport const shaderEffect: EffectData<ShaderEffect> = {\r\n /**\r\n * Migrate the two older spellings forward: the type key `sksl`, and the\r\n * source field `shader`.\r\n *\r\n * Both are rewritten here rather than understood separately by `lerp`,\r\n * `equals`, the surface predicate and the backend — one place that knows the\r\n * document is old, and nothing below it that has to. Returns the effect\r\n * untouched when it is already current, which is what keeps\r\n * `resolveChainEffects` from copying an array per write.\r\n */\r\n resolve: (effect) => {\r\n const legacy = effect as LegacyShaderEffect;\r\n const stale = effect.type !== \"shader\" || legacy.shader !== undefined;\r\n if (!stale) return effect;\r\n const { shader, ...rest } = legacy;\r\n return { ...rest, type: \"shader\", source: effect.source ?? shader ?? \"\" };\r\n },\r\n // The program and what it is blended with snap at the midpoint, as the\r\n // `shader` fill's source does: the source is the compile-cache key, so there\r\n // is no program halfway between two. Only the uniform values interpolate\r\n // (over the union of names), which keeps a same-program tween smooth.\r\n lerp: (from, to, t) => {\r\n const near = t < 0.5 ? from : to;\r\n return {\r\n type: \"shader\",\r\n source: near.source,\r\n ...(near.shaderId !== undefined ? { shaderId: near.shaderId } : {}),\r\n mode: near.mode,\r\n blendMode: near.blendMode,\r\n uniforms: lerpUniformRecord(\r\n normalizeUniforms(from.uniforms),\r\n normalizeUniforms(to.uniforms),\r\n t,\r\n ),\r\n };\r\n },\r\n // By name, matching how the values are bound. Two sets agreeing on every\r\n // name and value are the same binding — which they were not while the float\r\n // buffer was filled in array order.\r\n equals: (a, b) =>\r\n a.source === b.source &&\r\n a.mode === b.mode &&\r\n a.blendMode === b.blendMode &&\r\n uniformRecordsEqual(normalizeUniforms(a.uniforms), normalizeUniforms(b.uniforms)),\r\n // A backdrop shader resamples `u_backdrop`, so it needs a redraw scope; the\r\n // foreground variant is an overlay composed via ImageFilter.MakeShader.\r\n surface: (effect) => (effect.mode === \"backdrop\" ? \"shader\" : \"filter\"),\r\n};\r\n\r\n/** @deprecated Use {@link shaderEffect}. */\r\nexport const skslEffect = shaderEffect;\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharpen.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/sharpen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,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,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrF,6EAA6E;IAC7E,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Unsharp mask — the standard sharpen: subtract a blurred copy of the content\n * from itself and add the difference back, which exaggerates local contrast at\n * edges.\n *\n * out = c + amount · (c − blur(c, radius))\n *\n * `radius` sets the scale of detail affected (a small radius crisps fine texture,\n * a large one adds \"clarity\" to broad shapes); `amount` sets how hard. Past\n * ~2 the classic halo artefact shows up, which is sometimes the point.\n */\nexport interface SharpenEffect extends ModedEffect {\n type: \"sharpen\";\n /** Edge-contrast boost. 0 = off, 1 = a firm sharpen, >2 haloes. */\n amount: number;\n /** Radius of the blurred reference, in px. */\n radius: number;\n}\n\nexport const sharpenEffect: EffectData<SharpenEffect> = {\n lerp: (from, to, t) => ({\n type: \"sharpen\",\n amount: lerpNumber(from.amount, to.amount, t),\n radius: lerpNumber(from.radius, to.radius, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.amount === b.amount && a.radius === b.radius && a.mode === b.mode,\n // Convolves a neighbourhood — this CanvasKit build has no MatrixConvolution.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"sharpen.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/sharpen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,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,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrF,6EAA6E;IAC7E,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 * Unsharp mask — the standard sharpen: subtract a blurred copy of the content\r\n * from itself and add the difference back, which exaggerates local contrast at\r\n * edges.\r\n *\r\n * out = c + amount · (c − blur(c, radius))\r\n *\r\n * `radius` sets the scale of detail affected (a small radius crisps fine texture,\r\n * a large one adds \"clarity\" to broad shapes); `amount` sets how hard. Past\r\n * ~2 the classic halo artefact shows up, which is sometimes the point.\r\n */\r\nexport interface SharpenEffect extends ModedEffect {\r\n type: \"sharpen\";\r\n /** Edge-contrast boost. 0 = off, 1 = a firm sharpen, >2 haloes. */\r\n amount: number;\r\n /** Radius of the blurred reference, in px. */\r\n radius: number;\r\n}\r\n\r\nexport const sharpenEffect: EffectData<SharpenEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"sharpen\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.amount === b.amount && a.radius === b.radius && a.mode === b.mode,\r\n // Convolves a neighbourhood — this CanvasKit build has no MatrixConvolution.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streak.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/streak.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,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,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,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,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,6EAA6E;CAChF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Anamorphic glare — a bright pass smeared along one axis and screened back on.\n *\n * Where `bloom` spreads light equally in all directions, this spreads it along\n * `angle` only. That asymmetry is the entire anamorphic look: the horizontal\n * flare a wide lens throws off a highlight, rather than a halo around it.\n */\nexport interface StreakEffect extends ModedEffect {\n type: \"streak\";\n /** Additive multiplier for the streak pass. 0 = off. */\n intensity: number;\n /** 0–1 luminance cutoff — only pixels brighter than this streak. */\n threshold: number;\n /** Smear length in px along `angle`. */\n length: number;\n /** Smear axis in degrees; 0 = horizontal. */\n angle: number;\n}\n\nexport const streakEffect: EffectData<StreakEffect> = {\n lerp: (from, to, t) => ({\n type: \"streak\",\n intensity: lerpNumber(from.intensity, to.intensity, t),\n threshold: lerpNumber(from.threshold, to.threshold, t),\n length: lerpNumber(from.length, to.length, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.intensity === b.intensity &&\n a.threshold === b.threshold &&\n a.length === b.length &&\n a.angle === b.angle &&\n a.mode === b.mode,\n // An anisotropic blur of a colour-matrix bright pass — all ImageFilter work.\n};\n"]}
|
|
1
|
+
{"version":3,"file":"streak.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/streak.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,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,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,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,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,6EAA6E;CAChF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Anamorphic glare — a bright pass smeared along one axis and screened back on.\r\n *\r\n * Where `bloom` spreads light equally in all directions, this spreads it along\r\n * `angle` only. That asymmetry is the entire anamorphic look: the horizontal\r\n * flare a wide lens throws off a highlight, rather than a halo around it.\r\n */\r\nexport interface StreakEffect extends ModedEffect {\r\n type: \"streak\";\r\n /** Additive multiplier for the streak pass. 0 = off. */\r\n intensity: number;\r\n /** 0–1 luminance cutoff — only pixels brighter than this streak. */\r\n threshold: number;\r\n /** Smear length in px along `angle`. */\r\n length: number;\r\n /** Smear axis in degrees; 0 = horizontal. */\r\n angle: number;\r\n}\r\n\r\nexport const streakEffect: EffectData<StreakEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"streak\",\r\n intensity: lerpNumber(from.intensity, to.intensity, t),\r\n threshold: lerpNumber(from.threshold, to.threshold, t),\r\n length: lerpNumber(from.length, to.length, 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) =>\r\n a.intensity === b.intensity &&\r\n a.threshold === b.threshold &&\r\n a.length === b.length &&\r\n a.angle === b.angle &&\r\n a.mode === b.mode,\r\n // An anisotropic blur of a colour-matrix bright pass — all ImageFilter work.\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threshold.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/threshold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,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,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,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC3F,8EAA8E;IAC9E,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Two-tone cut: every pixel brighter than `level` becomes white, everything\n * else black — the stencil / high-contrast look.\n *\n * `smoothness` widens the cut into a ramp centred on `level`, which both\n * anti-aliases the boundary and, at higher values, keeps some midtone\n * modelling instead of a pure stencil.\n */\nexport interface ThresholdEffect extends ModedEffect {\n type: \"threshold\";\n /** 0–1 luminance cut point. */\n level: number;\n /** 0–1 width of the ramp around the cut; 0 is a hard, aliased edge. */\n smoothness: number;\n}\n\nexport const thresholdEffect: EffectData<ThresholdEffect> = {\n lerp: (from, to, t) => ({\n type: \"threshold\",\n level: lerpNumber(from.level, to.level, t),\n smoothness: lerpNumber(from.smoothness, to.smoothness, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.level === b.level && a.smoothness === b.smoothness && a.mode === b.mode,\n // A non-linear per-pixel remap; no LUT colour filter in this CanvasKit build.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"threshold.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/threshold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmB1C,MAAM,CAAC,MAAM,eAAe,GAAgC;IACxD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,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,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,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC3F,8EAA8E;IAC9E,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 * Two-tone cut: every pixel brighter than `level` becomes white, everything\r\n * else black — the stencil / high-contrast look.\r\n *\r\n * `smoothness` widens the cut into a ramp centred on `level`, which both\r\n * anti-aliases the boundary and, at higher values, keeps some midtone\r\n * modelling instead of a pure stencil.\r\n */\r\nexport interface ThresholdEffect extends ModedEffect {\r\n type: \"threshold\";\r\n /** 0–1 luminance cut point. */\r\n level: number;\r\n /** 0–1 width of the ramp around the cut; 0 is a hard, aliased edge. */\r\n smoothness: number;\r\n}\r\n\r\nexport const thresholdEffect: EffectData<ThresholdEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"threshold\",\r\n level: lerpNumber(from.level, to.level, t),\r\n smoothness: lerpNumber(from.smoothness, to.smoothness, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.level === b.level && a.smoothness === b.smoothness && a.mode === b.mode,\r\n // A non-linear per-pixel remap; no LUT colour filter in this CanvasKit build.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twirl.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/twirl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAyBxE,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,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,8CAA8C;IAC9C,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Twirl / swirl — the content is rotated about `center` by an amount that falls\n * off with distance, so the middle spins and the rim stays put.\n *\n * The falloff is what separates this from simply rotating the node: rotation is\n * rigid, this shears. Everything inside `radius` twists by a fraction of `angle`\n * that reaches full strength at the centre and zero at the rim, which is what\n * makes it read as a vortex rather than a transform.\n *\n * Animating `angle` past a full turn keeps winding — there is no wrap point, so\n * a long tween produces an ever-tightening spiral.\n */\nexport interface TwirlEffect extends ModedEffect {\n type: \"twirl\";\n /** Rotation at the centre in degrees. Negative twirls the other way. 0 = off. */\n angle: number;\n /** 0–1 radius of influence, as a fraction of the node's half-extent. */\n radius: number;\n /** Vortex centre in 0–1 layer coords. */\n center: Vector2;\n}\n\nexport const twirlEffect: EffectData<TwirlEffect> = {\n lerp: (from, to, t) => ({\n type: \"twirl\",\n angle: lerpNumber(from.angle, to.angle, t),\n radius: lerpNumber(from.radius, to.radius, 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.angle === b.angle &&\n a.radius === b.radius &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.mode === b.mode,\n // Resamples the source at a rotated position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"twirl.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/twirl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAyBxE,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,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,8CAA8C;IAC9C,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Twirl / swirl — the content is rotated about `center` by an amount that falls\r\n * off with distance, so the middle spins and the rim stays put.\r\n *\r\n * The falloff is what separates this from simply rotating the node: rotation is\r\n * rigid, this shears. Everything inside `radius` twists by a fraction of `angle`\r\n * that reaches full strength at the centre and zero at the rim, which is what\r\n * makes it read as a vortex rather than a transform.\r\n *\r\n * Animating `angle` past a full turn keeps winding — there is no wrap point, so\r\n * a long tween produces an ever-tightening spiral.\r\n */\r\nexport interface TwirlEffect extends ModedEffect {\r\n type: \"twirl\";\r\n /** Rotation at the centre in degrees. Negative twirls the other way. 0 = off. */\r\n angle: number;\r\n /** 0–1 radius of influence, as a fraction of the node's half-extent. */\r\n radius: number;\r\n /** Vortex centre in 0–1 layer coords. */\r\n center: Vector2;\r\n}\r\n\r\nexport const twirlEffect: EffectData<TwirlEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"twirl\",\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n radius: lerpNumber(from.radius, to.radius, 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.angle === b.angle &&\r\n a.radius === b.radius &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.mode === b.mode,\r\n // Resamples the source at a rotated position.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vignette.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.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,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0EAA0E;IAC1E,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 * Darkened corners — the lens falloff every photo grade reaches for.\n *\n * The node box is normalised to a unit ellipse, so the falloff follows the\n * node's aspect ratio rather than an off-centre circle. Everything inside\n * `radius` is untouched; from there to `radius + softness` the tint ramps in\n * with a smoothstep, reaching `amount` at the corners.\n */\nexport interface VignetteEffect extends ModedEffect {\n type: \"vignette\";\n /** 0–1 tint strength at the very edge. 0 = off. */\n amount: number;\n /** 0–1 normalised radius where the falloff starts (1 ≈ the box corners). */\n radius: number;\n /** 0–1 width of the ramp; 0 is a hard ring, 1 a long gradient. */\n softness: number;\n /** Tint colour — black darkens (the classic look), white blows the edges out. */\n color: Color;\n}\n\nexport const vignetteEffect: EffectData<VignetteEffect> = {\n lerp: (from, to, t) => ({\n type: \"vignette\",\n amount: lerpNumber(from.amount, to.amount, t),\n radius: lerpNumber(from.radius, to.radius, t),\n softness: lerpNumber(from.softness, to.softness, 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.amount === b.amount &&\n a.radius === b.radius &&\n a.softness === b.softness &&\n sameEffectColor(a.color, b.color) &&\n a.mode === b.mode,\n // Needs each pixel's position within the node box to compute its falloff.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"vignette.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vignette.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,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,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,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,0EAA0E;IAC1E,OAAO,EAAE,QAAQ;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 * Darkened corners — the lens falloff every photo grade reaches for.\r\n *\r\n * The node box is normalised to a unit ellipse, so the falloff follows the\r\n * node's aspect ratio rather than an off-centre circle. Everything inside\r\n * `radius` is untouched; from there to `radius + softness` the tint ramps in\r\n * with a smoothstep, reaching `amount` at the corners.\r\n */\r\nexport interface VignetteEffect extends ModedEffect {\r\n type: \"vignette\";\r\n /** 0–1 tint strength at the very edge. 0 = off. */\r\n amount: number;\r\n /** 0–1 normalised radius where the falloff starts (1 ≈ the box corners). */\r\n radius: number;\r\n /** 0–1 width of the ramp; 0 is a hard ring, 1 a long gradient. */\r\n softness: number;\r\n /** Tint colour — black darkens (the classic look), white blows the edges out. */\r\n color: Color;\r\n}\r\n\r\nexport const vignetteEffect: EffectData<VignetteEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"vignette\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n softness: lerpNumber(from.softness, to.softness, 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.amount === b.amount &&\r\n a.radius === b.radius &&\r\n a.softness === b.softness &&\r\n sameEffectColor(a.color, b.color) &&\r\n a.mode === b.mode,\r\n // Needs each pixel's position within the node box to compute its falloff.\r\n surface: \"shader\",\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vintage.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,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,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\nexport interface VintageEffect extends ModedEffect {\n type: \"vintage\";\n /** 0–1: blend from original (0) to full sepia/desaturate (1). */\n amount: number;\n /** -1…1: negative = cool/cyan tint, positive = warm/orange tint. */\n warmth: number;\n}\n\nexport const vintageEffect: EffectData<VintageEffect> = {\n lerp: (from, to, t) => ({\n type: \"vintage\",\n amount: lerpNumber(from.amount, to.amount, t),\n warmth: lerpNumber(from.warmth, to.warmth, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) => a.amount === b.amount && a.warmth === b.warmth && a.mode === b.mode,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"vintage.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/vintage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,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,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface VintageEffect extends ModedEffect {\r\n type: \"vintage\";\r\n /** 0–1: blend from original (0) to full sepia/desaturate (1). */\r\n amount: number;\r\n /** -1…1: negative = cool/cyan tint, positive = warm/orange tint. */\r\n warmth: number;\r\n}\r\n\r\nexport const vintageEffect: EffectData<VintageEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"vintage\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n warmth: lerpNumber(from.warmth, to.warmth, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.amount === b.amount && a.warmth === b.warmth && a.mode === b.mode,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAwCxE,MAAM,CAAC,MAAM,UAAU,GAA2B;IAC9C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACvD,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,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,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,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/B,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,8CAA8C;IAC9C,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * How the wave's crests are laid out.\n *\n * - `\"linear\"` — parallel crests running across the node, travelling along\n * `angle`. Flags, banners, wobbling type, heat shimmer.\n * - `\"radial\"` — concentric rings expanding from `center`. The pond-ripple /\n * drop-impact look, and the one that reads as *something happened here*.\n */\nexport type WaveShape = \"linear\" | \"radial\";\n\n/**\n * Sine displacement — the procedural warp that needs no asset.\n *\n * Pixels are resampled at a position offset by a sine of their own coordinate,\n * so the content ripples without anything being generated or loaded. For an\n * arbitrary warp driven by an image, see `displace`.\n *\n * `phase` is in degrees and the sine wraps, so a **linear tween of `phase` over\n * 360 loops seamlessly** — that is how you make the wave travel. Animating it is\n * the whole point; a static wave reads as a distortion rather than as motion.\n */\nexport interface WaveEffect extends ModedEffect {\n type: \"wave\";\n /** Peak displacement in px per axis. `{ x: 0, y: 20 }` ripples vertically only. */\n amplitude: Vector2;\n /** Distance between crests in px. */\n wavelength: number;\n /** Phase offset in degrees. Tween it over 360 for one seamless loop. */\n phase: number;\n /** Crest layout — parallel bands or concentric rings. */\n shape: WaveShape;\n /** Direction the crests advance along, in degrees. `\"linear\"` only. */\n angle: number;\n /** Ring origin in 0–1 layer coords. `\"radial\"` only. */\n center: Vector2;\n}\n\nexport const waveEffect: EffectData<WaveEffect> = {\n lerp: (from, to, t) => ({\n type: \"wave\",\n amplitude: lerpVector2(from.amplitude, to.amplitude, t),\n wavelength: lerpNumber(from.wavelength, to.wavelength, t),\n phase: lerpNumber(from.phase, to.phase, t),\n shape: t < 0.5 ? from.shape : to.shape,\n angle: lerpNumber(from.angle, to.angle, 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.amplitude.x === b.amplitude.x &&\n a.amplitude.y === b.amplitude.y &&\n a.wavelength === b.wavelength &&\n a.phase === b.phase &&\n a.shape === b.shape &&\n a.angle === b.angle &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.mode === b.mode,\n // Resamples the source at an offset position.\n surface: \"shader\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"wave.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/wave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAwCxE,MAAM,CAAC,MAAM,UAAU,GAA2B;IAC9C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACvD,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,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,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,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/B,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,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,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,8CAA8C;IAC9C,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * How the wave's crests are laid out.\r\n *\r\n * - `\"linear\"` — parallel crests running across the node, travelling along\r\n * `angle`. Flags, banners, wobbling type, heat shimmer.\r\n * - `\"radial\"` — concentric rings expanding from `center`. The pond-ripple /\r\n * drop-impact look, and the one that reads as *something happened here*.\r\n */\r\nexport type WaveShape = \"linear\" | \"radial\";\r\n\r\n/**\r\n * Sine displacement — the procedural warp that needs no asset.\r\n *\r\n * Pixels are resampled at a position offset by a sine of their own coordinate,\r\n * so the content ripples without anything being generated or loaded. For an\r\n * arbitrary warp driven by an image, see `displace`.\r\n *\r\n * `phase` is in degrees and the sine wraps, so a **linear tween of `phase` over\r\n * 360 loops seamlessly** — that is how you make the wave travel. Animating it is\r\n * the whole point; a static wave reads as a distortion rather than as motion.\r\n */\r\nexport interface WaveEffect extends ModedEffect {\r\n type: \"wave\";\r\n /** Peak displacement in px per axis. `{ x: 0, y: 20 }` ripples vertically only. */\r\n amplitude: Vector2;\r\n /** Distance between crests in px. */\r\n wavelength: number;\r\n /** Phase offset in degrees. Tween it over 360 for one seamless loop. */\r\n phase: number;\r\n /** Crest layout — parallel bands or concentric rings. */\r\n shape: WaveShape;\r\n /** Direction the crests advance along, in degrees. `\"linear\"` only. */\r\n angle: number;\r\n /** Ring origin in 0–1 layer coords. `\"radial\"` only. */\r\n center: Vector2;\r\n}\r\n\r\nexport const waveEffect: EffectData<WaveEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"wave\",\r\n amplitude: lerpVector2(from.amplitude, to.amplitude, t),\r\n wavelength: lerpNumber(from.wavelength, to.wavelength, t),\r\n phase: lerpNumber(from.phase, to.phase, t),\r\n shape: t < 0.5 ? from.shape : to.shape,\r\n angle: lerpNumber(from.angle, to.angle, 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.amplitude.x === b.amplitude.x &&\r\n a.amplitude.y === b.amplitude.y &&\r\n a.wavelength === b.wavelength &&\r\n a.phase === b.phase &&\r\n a.shape === b.shape &&\r\n a.angle === b.angle &&\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.mode === b.mode,\r\n // Resamples the source at an offset position.\r\n surface: \"shader\",\r\n};\r\n"]}
|