Code-first video & image, rendered natively on WebGPU.
// @generated by scripts/generate-effects.mts — do not edit.
// Source of truth: nodes/*/package.json (`framefields`) and nodes/*/src/shared/config.ts.
// Regenerate with `pnpm run generate:effects`.
import { Effect } from "@framefields/core";
import type { EffectProp } from "../types.js";
import { withDefaults } from "../with-defaults.js";
import { effectMeta } from "./meta.js";
export interface CornerPinPointsItem {
/** Range 0 to 100. */
x: number;
/** Range 0 to 100. */
y: number;
}
export interface KenBurnsKeyframesItem {
id?: string;
/** Range 0 to 20000. */
durationMs: number;
/**
* Range 0 to 20000.
* @default 1000
*/
holdMs: number;
/** Range 1 to 20. */
scale: number;
/** Range 0 to 100. */
x: number;
/** Range 0 to 100. */
y: number;
/**
* @default "ease-in-out"
*/
easing: "linear" | "ease-in" | "ease-out" | "ease-in-out" | "spring";
}
export interface LayerStyleBevelEmboss {
/**
* @default false
*/
enabled: boolean;
/**
* @default "InnerBevel"
*/
style: "InnerBevel" | "OuterBevel" | "Emboss" | "PillowEmboss";
/**
* @default "Smooth"
*/
technique: "Smooth" | "ChiselHard" | "ChiselSoft";
/**
* Range 1 to 1000.
* @default 100
*/
depth: number;
/**
* @default "Up"
*/
direction: "Up" | "Down";
/**
* Range 0 to 250.
* @default 5
*/
size: number;
/**
* Range 0 to 50.
* @default 0
*/
soften: number;
/**
* Range 0 to 360.
* @default 120
*/
angle: number;
/**
* Range 0 to 90.
* @default 30
*/
altitude: number;
/**
* @default "#ffffff"
*/
highlightColor: string;
/**
* Range 0 to 1.
* @default 0.75
*/
highlightOpacity: number;
/**
* @default "#000000"
*/
shadowColor: string;
/**
* Range 0 to 1.
* @default 0.75
*/
shadowOpacity: number;
}
export interface LayerStyleColorOverlay {
/**
* @default false
*/
enabled: boolean;
/**
* @default "#ff0000"
*/
color: string;
/**
* Range 0 to 1.
* @default 1
*/
opacity: number;
/**
* @default "normal"
*/
blendMode: string;
}
export interface LayerStyleDropShadow {
/**
* @default false
*/
enabled: boolean;
/**
* @default "#000000"
*/
color: string;
/**
* Range 0 to 1.
* @default 0.75
*/
opacity: number;
/**
* Range 0 to 360.
* @default 120
*/
angle: number;
/**
* Range 0 to 500.
* @default 10
*/
distance: number;
/**
* Range 0 to 100.
* @default 0
*/
spread: number;
/**
* Range 0 to 250.
* @default 10
*/
size: number;
/**
* @default "multiply"
*/
blendMode: string;
}
export interface LayerStyleInnerGlow {
/**
* @default false
*/
enabled: boolean;
/**
* @default "#ffffff"
*/
color: string;
/**
* Range 0 to 1.
* @default 0.75
*/
opacity: number;
/**
* Range 0 to 250.
* @default 15
*/
size: number;
/**
* Range 0 to 100.
* @default 0
*/
spread: number;
/**
* @default "screen"
*/
blendMode: string;
}
export interface LayerStyleInnerShadow {
/**
* @default false
*/
enabled: boolean;
/**
* @default "#000000"
*/
color: string;
/**
* Range 0 to 1.
* @default 0.75
*/
opacity: number;
/**
* Range 0 to 360.
* @default 120
*/
angle: number;
/**
* Range 0 to 500.
* @default 5
*/
distance: number;
/**
* Range 0 to 100.
* @default 0
*/
choke: number;
/**
* Range 0 to 250.
* @default 5
*/
size: number;
/**
* @default "multiply"
*/
blendMode: string;
}
export interface LayerStyleOuterGlow {
/**
* @default false
*/
enabled: boolean;
/**
* @default "#ffffff"
*/
color: string;
/**
* Range 0 to 1.
* @default 0.75
*/
opacity: number;
/**
* Range 0 to 250.
* @default 15
*/
size: number;
/**
* Range 0 to 100.
* @default 0
*/
spread: number;
/**
* @default "screen"
*/
blendMode: string;
}
export interface LayerStyleStroke {
/**
* @default false
*/
enabled: boolean;
/**
* Range 0 to 100.
* @default 2
*/
size: number;
/**
* @default "outside"
*/
position: "inside" | "center" | "outside";
/**
* @default "#ffffff"
*/
color: string;
/**
* Range 0 to 1.
* @default 1
*/
opacity: number;
/**
* @default "normal"
*/
blendMode: string;
}
export interface LiquifyOperationsItem {
/**
* @default "Bloat"
*/
type: "Push" | "Pull" | "Bloat" | "Pucker" | "TwirlCW" | "TwirlCCW";
/** Range 0 to 1. */
x: number;
/** Range 0 to 1. */
y: number;
/**
* Range 0.01 to 1.
* @default 0.15
*/
radius: number;
/**
* Range 0 to 1.
* @default 0.5
*/
strength: number;
/**
* Range -1 to 1.
* @default 0
*/
dx: number;
/**
* Range -1 to 1.
* @default 0
*/
dy: number;
}
export interface MeshWarpPointsItem {
/** Range 0 to 100. */
x: number;
/** Range 0 to 100. */
y: number;
}
export interface PaintStrokesItemOption1 {
/**
* @default "brush"
*/
id: string;
tool: "brush";
path: string;
color: string;
size: number;
/**
* Range 0 to 1.
* @default 1
*/
opacity: number;
}
export interface PaintStrokesItemOption2 {
/**
* @default "eraser"
*/
id: string;
tool: "eraser";
path: string;
size: number;
}
export interface PaintStrokesItemOption3 {
/**
* @default "fill"
*/
id: string;
tool: "fill";
imageData: string;
/** Maximum 16384. */
width: number;
/** Maximum 16384. */
height: number;
}
export interface PatchHealPatchesItem {
/**
* @default "patch"
*/
id: string;
/**
* Range 0 to 1.
* @default 0.5
*/
centerX: number;
/**
* Range 0 to 1.
* @default 0.5
*/
centerY: number;
/**
* Range -4096 to 4096.
* @default 50
*/
offsetX: number;
/**
* Range -4096 to 4096.
* @default 0
*/
offsetY: number;
/**
* Range 1 to 500.
* @default 25
*/
radius: number;
/**
* Range 1 to 500.
* @default 25
*/
sourceRadius: number;
/**
* Range 0 to 100.
* @default 50
*/
feather: number;
/**
* Range 0 to 1.
* @default 1
*/
opacity: number;
/**
* @default "SeamlessHeal"
*/
mode: "Clone" | "SeamlessHeal" | "TextureTransfer";
}
export interface TonalShift {
/**
* Range -100 to 100.
* @default 0
*/
cyanRed: number;
/**
* Range -100 to 100.
* @default 0
*/
magentaGreen: number;
/**
* Range -100 to 100.
* @default 0
*/
yellowBlue: number;
}
export interface AsciiProps {
/**
* Character cell size, px.
* Range 4 to 64. Accepts a signal.
* @default 10
*/
cellSize?: EffectProp<number>;
/**
* Glyph color: `fg`, the layer's own colors, or green phosphor.
* @default "mono"
*/
colorMode?: "mono" | "source" | "green";
/**
* Glyph color (mono).
* @default "#e8e8e8"
*/
fg?: string;
/**
* Background color.
* @default "#0b0b0b"
*/
bg?: string;
/**
* Brightness contrast before picking glyphs.
* Range 0.5 to 3. Accepts a signal.
* @default 1.2
*/
contrast?: EffectProp<number>;
/**
* Dark areas get dense glyphs.
* @default false
*/
invert?: boolean;
}
const asciiDefaults: AsciiProps = {
cellSize: 10,
colorMode: "mono",
fg: "#e8e8e8",
bg: "#0b0b0b",
contrast: 1.2,
invert: false,
};
export class Ascii extends Effect<AsciiProps, "Ascii", "visual"> {
public readonly op = "Ascii" as const;
public override readonly domain = "visual" as const;
public declare cellSize: number;
public declare colorMode: "mono" | "source" | "green";
public declare fg: string;
public declare bg: string;
public declare contrast: number;
public declare invert: boolean;
constructor(config: AsciiProps = {}) {
super(withDefaults("Ascii", asciiDefaults, config, effectMeta.Ascii));
}
}
export interface AudioCompressorProps {
/**
* Level (dBFS) above which gain reduction begins (-60 to 0 dB). Can be modulated by a static number or dynamic signal.
* Range -60 to 0. Accepts a signal.
* @default -24
*/
threshold?: EffectProp<number>;
/**
* Input-to-output ratio above threshold (1 to 100). Can be modulated by a static number or dynamic signal.
* Range 1 to 100. Accepts a signal.
* @default 4
*/
ratio?: EffectProp<number>;
/**
* Seconds to reach full gain reduction (0.0001 to 1.0s). Can be modulated by a static number or dynamic signal.
* Range 0.0001 to 1. Accepts a signal.
* @default 0.003
*/
attack?: EffectProp<number>;
/**
* Seconds to recover gain after signal drops (0.01 to 5.0s). Can be modulated by a static number or dynamic signal.
* Range 0.01 to 5. Accepts a signal.
* @default 0.25
*/
release?: EffectProp<number>;
/**
* dB range for soft-knee transition around threshold (0 to 24 dB). Can be modulated by a static number or dynamic signal.
* Range 0 to 24. Accepts a signal.
* @default 6
*/
knee?: EffectProp<number>;
/**
* dBFS of gain applied after compression (0 to 24 dB). Can be modulated by a static number or dynamic signal.
* Range 0 to 24. Accepts a signal.
* @default 0
*/
makeupGain?: EffectProp<number>;
}
const audioCompressorDefaults: AudioCompressorProps = {
threshold: -24,
ratio: 4,
attack: 0.003,
release: 0.25,
knee: 6,
makeupGain: 0,
};
export class AudioCompressor extends Effect<
AudioCompressorProps,
"AudioCompressor",
"audio"
> {
public readonly op = "AudioCompressor" as const;
public override readonly domain = "audio" as const;
public declare threshold: number;
public declare ratio: number;
public declare attack: number;
public declare release: number;
public declare knee: number;
public declare makeupGain: number;
constructor(config: AudioCompressorProps = {}) {
super(
withDefaults(
"AudioCompressor",
audioCompressorDefaults,
config,
effectMeta.AudioCompressor,
),
);
}
}
export interface AudioDelayProps {
/**
* Delay time in seconds (0.001 to 5.0s). Can be modulated by a static number or dynamic signal.
* Range 0.001 to 5. Accepts a signal.
* @default 0.25
*/
delayTime?: EffectProp<number>;
/**
* Amount of delayed signal fed back into delay line (0.0 to 0.95). Can be modulated by a static number or dynamic signal.
* Range 0 to 0.95. Accepts a signal.
* @default 0.4
*/
feedback?: EffectProp<number>;
/**
* Mix level of the wet delayed signal (0.0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.3
*/
wet?: EffectProp<number>;
/**
* Mix level of the original dry signal (0.0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 1
*/
dry?: EffectProp<number>;
/**
* Alternates echo reflections between left and right channels
* @default false
*/
pingPong?: boolean;
}
const audioDelayDefaults: AudioDelayProps = {
delayTime: 0.25,
feedback: 0.4,
wet: 0.3,
dry: 1,
pingPong: false,
};
export class AudioDelay extends Effect<AudioDelayProps, "AudioDelay", "audio"> {
public readonly op = "AudioDelay" as const;
public override readonly domain = "audio" as const;
public declare delayTime: number;
public declare feedback: number;
public declare wet: number;
public declare dry: number;
public declare pingPong: boolean;
constructor(config: AudioDelayProps = {}) {
super(
withDefaults(
"AudioDelay",
audioDelayDefaults,
config,
effectMeta.AudioDelay,
),
);
}
}
export interface AudioFadeProps {
/**
* Duration in seconds of fade in from silence (0 to 60s). Can be modulated by a static number or dynamic signal.
* Range 0 to 60. Accepts a signal.
* @default 0
*/
fadeInDuration?: EffectProp<number>;
/**
* Duration in seconds of fade out to silence (0 to 60s). Can be modulated by a static number or dynamic signal.
* Range 0 to 60. Accepts a signal.
* @default 0
*/
fadeOutDuration?: EffectProp<number>;
/**
* Envelope shape for fade in
* @default "linear"
*/
fadeInCurve?: "linear" | "exponential" | "scurve";
/**
* Envelope shape for fade out
* @default "linear"
*/
fadeOutCurve?: "linear" | "exponential" | "scurve";
}
const audioFadeDefaults: AudioFadeProps = {
fadeInDuration: 0,
fadeOutDuration: 0,
fadeInCurve: "linear",
fadeOutCurve: "linear",
};
export class AudioFade extends Effect<AudioFadeProps, "AudioFade", "audio"> {
public readonly op = "AudioFade" as const;
public override readonly domain = "audio" as const;
public declare fadeInDuration: number;
public declare fadeOutDuration: number;
public declare fadeInCurve: "linear" | "exponential" | "scurve";
public declare fadeOutCurve: "linear" | "exponential" | "scurve";
constructor(config: AudioFadeProps = {}) {
super(
withDefaults(
"AudioFade",
audioFadeDefaults,
config,
effectMeta.AudioFade,
),
);
}
}
export interface AudioNoiseGateProps {
/**
* dBFS level below which the gate closes (-120 to 0 dB). Can be modulated by a static number or dynamic signal.
* Range -120 to 0. Accepts a signal.
* @default -40
*/
threshold?: EffectProp<number>;
/**
* Seconds to open (fade in) when signal exceeds threshold (0.0001 to 1.0s). Can be modulated by a static number or dynamic signal.
* Range 0.0001 to 1. Accepts a signal.
* @default 0.005
*/
attack?: EffectProp<number>;
/**
* Seconds to stay open after signal drops below threshold (0.001 to 5.0s). Can be modulated by a static number or dynamic signal.
* Range 0.001 to 5. Accepts a signal.
* @default 0.05
*/
hold?: EffectProp<number>;
/**
* Seconds to close (fade out) after hold expires (0.01 to 5.0s). Can be modulated by a static number or dynamic signal.
* Range 0.01 to 5. Accepts a signal.
* @default 0.1
*/
release?: EffectProp<number>;
/**
* dBFS floor when gate is closed (-120 to 0 dB). Can be modulated by a static number or dynamic signal.
* Range -120 to 0. Accepts a signal.
* @default -80
*/
range?: EffectProp<number>;
}
const audioNoiseGateDefaults: AudioNoiseGateProps = {
threshold: -40,
attack: 0.005,
hold: 0.05,
release: 0.1,
range: -80,
};
export class AudioNoiseGate extends Effect<
AudioNoiseGateProps,
"AudioNoiseGate",
"audio"
> {
public readonly op = "AudioNoiseGate" as const;
public override readonly domain = "audio" as const;
public declare threshold: number;
public declare attack: number;
public declare hold: number;
public declare release: number;
public declare range: number;
constructor(config: AudioNoiseGateProps = {}) {
super(
withDefaults(
"AudioNoiseGate",
audioNoiseGateDefaults,
config,
effectMeta.AudioNoiseGate,
),
);
}
}
export interface AudioParametricEqProps {
/**
* Type of biquad filter
* @default "peak"
*/
type?: "lowShelf" | "highShelf" | "peak" | "lowPass" | "highPass" | "notch";
/**
* Cutoff or center frequency in Hz (20 to 20000 Hz). Can be modulated by a static number or dynamic signal.
* Range 20 to 20000. Accepts a signal.
* @default 1000
*/
frequency?: EffectProp<number>;
/**
* Gain boost or cut in dB (-24 to 24 dB). Can be modulated by a static number or dynamic signal.
* Range -24 to 24. Accepts a signal.
* @default 0
*/
gain?: EffectProp<number>;
/**
* Filter bandwidth / Q factor (0.01 to 10.0). Can be modulated by a static number or dynamic signal.
* Range 0.01 to 10. Accepts a signal.
* @default 1
*/
q?: EffectProp<number>;
}
const audioParametricEqDefaults: AudioParametricEqProps = {
type: "peak",
frequency: 1000,
gain: 0,
q: 1,
};
export class AudioParametricEq extends Effect<
AudioParametricEqProps,
"AudioParametricEq",
"audio"
> {
public readonly op = "AudioParametricEq" as const;
public override readonly domain = "audio" as const;
public declare type:
| "lowShelf"
| "highShelf"
| "peak"
| "lowPass"
| "highPass"
| "notch";
public declare frequency: number;
public declare gain: number;
public declare q: number;
constructor(config: AudioParametricEqProps = {}) {
super(
withDefaults(
"AudioParametricEq",
audioParametricEqDefaults,
config,
effectMeta.AudioParametricEq,
),
);
}
}
export interface AudioReverbProps {
/**
* Room decay, size of simulated space (0 to 0.98). Can be modulated by a static number or dynamic signal.
* Range 0 to 0.98. Accepts a signal.
* @default 0.5
*/
roomSize?: EffectProp<number>;
/**
* High-frequency absorption (0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
damping?: EffectProp<number>;
/**
* Mix level of the wet reverberated signal (0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.3
*/
wet?: EffectProp<number>;
/**
* Mix level of the original dry signal (0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 1
*/
dry?: EffectProp<number>;
/**
* Stereo spread of the reverb tail (0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 1
*/
width?: EffectProp<number>;
}
const audioReverbDefaults: AudioReverbProps = {
roomSize: 0.5,
damping: 0.5,
wet: 0.3,
dry: 1,
width: 1,
};
export class AudioReverb extends Effect<
AudioReverbProps,
"AudioReverb",
"audio"
> {
public readonly op = "AudioReverb" as const;
public override readonly domain = "audio" as const;
public declare roomSize: number;
public declare damping: number;
public declare wet: number;
public declare dry: number;
public declare width: number;
constructor(config: AudioReverbProps = {}) {
super(
withDefaults(
"AudioReverb",
audioReverbDefaults,
config,
effectMeta.AudioReverb,
),
);
}
}
export interface BlurBaseProps {
/**
* Blur Type
* @default "Gaussian"
*/
blurType?:
| "Gaussian"
| "Box"
| "Median"
| "Motion"
| "Bilateral"
| "Edge-preserving"
| "Radial"
| "Zoom";
/**
* The intensity of the blur. 0 = no blur. Can be modulated by a static number or a dynamic signal.
* Range 0 to 100. Accepts a signal.
* @default 5
*/
strength?: EffectProp<number>;
/**
* Direction of a Motion blur, in degrees.
* Range 0 to 360. Accepts a signal.
* @default 0
*/
angle?: EffectProp<number>;
/**
* Sigma value for color space in Bilateral / Edge-preserving blurs. Can be modulated by a static number or a dynamic signal.
* Range 0.01 to 1. Accepts a signal.
* @default 0.1
*/
sigmaColor?: EffectProp<number>;
/**
* The X coordinate of the blur center (0.0 to 1.0). Can be modulated by a static number or a dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerX?: EffectProp<number>;
/**
* The Y coordinate of the blur center (0.0 to 1.0). Can be modulated by a static number or a dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerY?: EffectProp<number>;
/**
* Blurs only a specific circular area around center point.
* Accepts a signal.
* @default false
*/
partialBlur?: EffectProp<boolean>;
/**
* Radius of the partial blur region (0.01 to 1.0). Can be modulated by a static number or a dynamic signal.
* Range 0.01 to 1. Accepts a signal.
* @default 0.3
*/
radius?: EffectProp<number>;
/**
* Vertical radius of the partial blur region (0 to 1.0). 0 reuses the horizontal radius.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
radiusY?: EffectProp<number>;
/**
* Shape of the partial blur region.
* @default "circle"
*/
shape?: "ellipse" | "circle" | "rect";
}
const blurDefaults: BlurBaseProps = {
blurType: "Gaussian",
strength: 5,
angle: 0,
sigmaColor: 0.1,
centerX: 0.5,
centerY: 0.5,
partialBlur: false,
radius: 0.3,
radiusY: 0,
shape: "circle",
};
/** @internal Extended by `effects/custom/blur.ts`, which exports `Blur`. */
export class BlurBase extends Effect<BlurBaseProps, "Blur", "visual"> {
public readonly op = "Blur" as const;
public override readonly domain = "visual" as const;
public declare blurType:
| "Gaussian"
| "Box"
| "Median"
| "Motion"
| "Bilateral"
| "Edge-preserving"
| "Radial"
| "Zoom";
public declare strength: number;
public declare angle: number;
public declare sigmaColor: number;
public declare centerX: number;
public declare centerY: number;
public declare partialBlur: boolean;
public declare radius: number;
public declare radiusY: number;
public declare shape: "ellipse" | "circle" | "rect";
constructor(config: BlurBaseProps = {}) {
super(withDefaults("Blur", blurDefaults, config, effectMeta.Blur));
}
}
export interface CameraParallax3DProps {
/**
* Motion Preset
* @default "DollyZoom"
*/
motionPreset?:
| "Custom"
| "DollyZoom"
| "Orbit"
| "FlyThrough"
| "HandheldShake"
| "RackFocus";
/**
* Horizontal camera pan angle / position offset (-1.0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range -1 to 1. Accepts a signal.
* @default 0
*/
panX?: EffectProp<number>;
/**
* Vertical camera tilt angle / position offset (-1.0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range -1 to 1. Accepts a signal.
* @default 0
*/
panY?: EffectProp<number>;
/**
* Camera forward/backward zoom position (-1.0 to 1.0). Can be modulated by a static number or dynamic signal.
* Range -1 to 1. Accepts a signal.
* @default 0
*/
dollyZ?: EffectProp<number>;
/**
* Camera Field of View in degrees (15° to 120°). Can be modulated by a static number or dynamic signal.
* Range 15 to 120. Accepts a signal.
* @default 50
*/
fov?: EffectProp<number>;
/**
* Strength of 3D spatial displacement depth relief. Can be modulated by a static number or dynamic signal.
* Range 0 to 2. Accepts a signal.
* @default 0.6
*/
parallaxAmount?: EffectProp<number>;
/**
* Lens aperture size / Circle of Confusion bokeh blur radius. Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.3
*/
dofAperture?: EffectProp<number>;
/**
* Focal plane depth in scene (0.0=foreground, 1.0=background). Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.4
*/
focusPlane?: EffectProp<number>;
/**
* Inpainting border bleed to eliminate border occlusion tearing.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
edgeDilation?: EffectProp<number>;
/**
* Invert depth polarity (white = near vs black = near).
* @default false
*/
depthInvert?: boolean;
}
const cameraParallax3DDefaults: CameraParallax3DProps = {
motionPreset: "DollyZoom",
panX: 0,
panY: 0,
dollyZ: 0,
fov: 50,
parallaxAmount: 0.6,
dofAperture: 0.3,
focusPlane: 0.4,
edgeDilation: 0.5,
depthInvert: false,
};
export class CameraParallax3D extends Effect<
CameraParallax3DProps,
"CameraParallax3D",
"visual"
> {
public readonly op = "CameraParallax3D" as const;
public override readonly domain = "visual" as const;
public declare motionPreset:
| "Custom"
| "DollyZoom"
| "Orbit"
| "FlyThrough"
| "HandheldShake"
| "RackFocus";
public declare panX: number;
public declare panY: number;
public declare dollyZ: number;
public declare fov: number;
public declare parallaxAmount: number;
public declare dofAperture: number;
public declare focusPlane: number;
public declare edgeDilation: number;
public declare depthInvert: boolean;
constructor(config: CameraParallax3DProps = {}) {
super(
withDefaults(
"CameraParallax3D",
cameraParallax3DDefaults,
config,
effectMeta.CameraParallax3D,
),
);
}
}
export interface ChannelMergerProps {
/**
* Color space used for channel recombination (RGBA, HSLA, CMYK, or LAB).
* @default "RGBA"
*/
colorSpace?: "RGBA" | "HSLA" | "CMYK" | "LAB";
/**
* Fallback value used when Channel 4 is unconnected (Alpha=1.0, Black=0.0 in CMYK).
* Range 0 to 1. Accepts a signal.
* @default 1
*/
defaultChannel4?: EffectProp<number>;
}
const channelMergerDefaults: ChannelMergerProps = {
colorSpace: "RGBA",
defaultChannel4: 1,
};
export class ChannelMerger extends Effect<
ChannelMergerProps,
"ChannelMerger",
"visual"
> {
public readonly op = "ChannelMerger" as const;
public override readonly domain = "visual" as const;
public declare colorSpace: "RGBA" | "HSLA" | "CMYK" | "LAB";
public declare defaultChannel4: number;
constructor(config: ChannelMergerProps = {}) {
super(
withDefaults(
"ChannelMerger",
channelMergerDefaults,
config,
effectMeta.ChannelMerger,
),
);
}
}
export interface ChannelSplitterProps {
/**
* Color space used for channel decomposition (RGBA, HSLA, CMYK, or LAB).
* @default "RGBA"
*/
colorSpace?: "RGBA" | "HSLA" | "CMYK" | "LAB";
}
const channelSplitterDefaults: ChannelSplitterProps = {
colorSpace: "RGBA",
};
export class ChannelSplitter extends Effect<
ChannelSplitterProps,
"ChannelSplitter",
"visual"
> {
public readonly op = "ChannelSplitter" as const;
public override readonly domain = "visual" as const;
public declare colorSpace: "RGBA" | "HSLA" | "CMYK" | "LAB";
constructor(config: ChannelSplitterProps = {}) {
super(
withDefaults(
"ChannelSplitter",
channelSplitterDefaults,
config,
effectMeta.ChannelSplitter,
),
);
}
}
export interface ColorBalanceProps {
/**
* @default {"cyanRed":0,"magentaGreen":0,"yellowBlue":0}
*/
shadows?: Partial<TonalShift>;
/**
* @default {"cyanRed":0,"magentaGreen":0,"yellowBlue":0}
*/
midtones?: Partial<TonalShift>;
/**
* @default {"cyanRed":0,"magentaGreen":0,"yellowBlue":0}
*/
highlights?: Partial<TonalShift>;
/**
* @default true
*/
preserveLuminosity?: boolean;
}
const colorBalanceDefaults: ColorBalanceProps = {
shadows: { cyanRed: 0, magentaGreen: 0, yellowBlue: 0 },
midtones: { cyanRed: 0, magentaGreen: 0, yellowBlue: 0 },
highlights: { cyanRed: 0, magentaGreen: 0, yellowBlue: 0 },
preserveLuminosity: true,
};
export class ColorBalance extends Effect<
ColorBalanceProps,
"ColorBalance",
"visual"
> {
public readonly op = "ColorBalance" as const;
public override readonly domain = "visual" as const;
public declare shadows: Partial<TonalShift>;
public declare midtones: Partial<TonalShift>;
public declare highlights: Partial<TonalShift>;
public declare preserveLuminosity: boolean;
constructor(config: ColorBalanceProps = {}) {
super(
withDefaults(
"ColorBalance",
colorBalanceDefaults,
config,
effectMeta.ColorBalance,
),
);
}
}
export interface ColorKeyProps {
/**
* Key Color
* @default "#00ff00"
*/
keyColor?: string;
/**
* How close the color must be to the Key Color to be removed.
* Range 0 to 1. Accepts a signal.
* @default 0.4
*/
similarity?: EffectProp<number>;
/**
* The softness of the transparency edge.
* Range 0 to 1. Accepts a signal.
* @default 0.1
*/
smoothness?: EffectProp<number>;
/**
* Amount of key color spill to remove from foreground edges.
* Range 0 to 1. Accepts a signal.
* @default 0.2
*/
spillSuppression?: EffectProp<number>;
/**
* Color space used to calculate similarity distance.
* @default "YUV"
*/
colorSpace?: "YUV" | "RGB";
/**
* How key color spill is suppressed on foreground edges.
* @default "Desaturate"
*/
spillSuppressionType?: "Desaturate" | "Neutralize" | "None";
}
const colorKeyDefaults: ColorKeyProps = {
keyColor: "#00ff00",
similarity: 0.4,
smoothness: 0.1,
spillSuppression: 0.2,
colorSpace: "YUV",
spillSuppressionType: "Desaturate",
};
export class ColorKey extends Effect<ColorKeyProps, "ColorKey", "visual"> {
public readonly op = "ColorKey" as const;
public override readonly domain = "visual" as const;
public declare keyColor: string;
public declare similarity: number;
public declare smoothness: number;
public declare spillSuppression: number;
public declare colorSpace: "YUV" | "RGB";
public declare spillSuppressionType: "Desaturate" | "Neutralize" | "None";
constructor(config: ColorKeyProps = {}) {
super(
withDefaults("ColorKey", colorKeyDefaults, config, effectMeta.ColorKey),
);
}
}
export interface ContourProps {
/**
* Contour lines from dark to light.
* Range 2 to 64. Accepts a signal.
* @default 14
*/
levels?: EffectProp<number>;
/**
* Line width, px.
* Range 0.5 to 8. Accepts a signal.
* @default 1.2
*/
lineWidth?: EffectProp<number>;
/**
* Line color.
* @default "#2b1d0e"
*/
lineColor?: string;
/**
* Under the lines: the layer, `fillColor`, or transparent.
* @default "source"
*/
fill?: "source" | "flat" | "none";
/**
* Paper color (flat fill).
* @default "#f3ead8"
*/
fillColor?: string;
/**
* Blur before tracing, px (smoother lines).
* Range 0 to 8. Accepts a signal.
* @default 2
*/
smoothing?: EffectProp<number>;
}
const contourDefaults: ContourProps = {
levels: 14,
lineWidth: 1.2,
lineColor: "#2b1d0e",
fill: "source",
fillColor: "#f3ead8",
smoothing: 2,
};
export class Contour extends Effect<ContourProps, "Contour", "visual"> {
public readonly op = "Contour" as const;
public override readonly domain = "visual" as const;
public declare levels: number;
public declare lineWidth: number;
public declare lineColor: string;
public declare fill: "source" | "flat" | "none";
public declare fillColor: string;
public declare smoothing: number;
constructor(config: ContourProps = {}) {
super(withDefaults("Contour", contourDefaults, config, effectMeta.Contour));
}
}
export interface CornerPinProps {
points?: CornerPinPointsItem[];
}
const cornerPinDefaults: CornerPinProps = {};
export class CornerPin extends Effect<CornerPinProps, "CornerPin", "visual"> {
public readonly op = "CornerPin" as const;
public override readonly domain = "visual" as const;
public declare points: CornerPinPointsItem[] | undefined;
constructor(config: CornerPinProps = {}) {
super(
withDefaults(
"CornerPin",
cornerPinDefaults,
config,
effectMeta.CornerPin,
),
);
}
}
export interface CRTProps {
/**
* Scanline darkness.
* Range 0 to 1. Accepts a signal.
* @default 0.45
*/
scanlines?: EffectProp<number>;
/**
* Scanlines over the height.
* Range 100 to 2160. Accepts a signal.
* @default 540
*/
lineCount?: EffectProp<number>;
/**
* Barrel distortion of the tube.
* Range 0 to 1. Accepts a signal.
* @default 0.12
*/
curvature?: EffectProp<number>;
/**
* RGB aperture-grille strength.
* Range 0 to 1. Accepts a signal.
* @default 0.25
*/
mask?: EffectProp<number>;
/**
* Darkening toward the edges.
* Range 0 to 1. Accepts a signal.
* @default 0.35
*/
vignette?: EffectProp<number>;
/**
* Animated static.
* Range 0 to 1. Accepts a signal.
* @default 0.08
*/
noise?: EffectProp<number>;
/**
* Brightness flicker.
* Range 0 to 1. Accepts a signal.
* @default 0.03
*/
flicker?: EffectProp<number>;
/**
* VHS tracking error: line jitter and a rolling band.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
tracking?: EffectProp<number>;
/**
* VHS color bleed, px.
* Range 0 to 20. Accepts a signal.
* @default 0
*/
chroma?: EffectProp<number>;
}
const cRTDefaults: CRTProps = {
scanlines: 0.45,
lineCount: 540,
curvature: 0.12,
mask: 0.25,
vignette: 0.35,
noise: 0.08,
flicker: 0.03,
tracking: 0,
chroma: 0,
};
export class CRT extends Effect<CRTProps, "CRT", "visual"> {
public readonly op = "CRT" as const;
public override readonly domain = "visual" as const;
public declare scanlines: number;
public declare lineCount: number;
public declare curvature: number;
public declare mask: number;
public declare vignette: number;
public declare noise: number;
public declare flicker: number;
public declare tracking: number;
public declare chroma: number;
constructor(config: CRTProps = {}) {
super(withDefaults("CRT", cRTDefaults, config, effectMeta.CRT));
}
}
export interface DatamoshProps {
/**
* Layer frames that show the clean picture again (I-frames). The first frame always does.
* @default []
*/
keyframes?: number[];
/**
* How far pixels are dragged along the motion.
* Range 0 to 10. Accepts a signal.
* @default 1
*/
strength?: EffectProp<number>;
/**
* Clean picture mixed back in per frame, 0–1.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
bleed?: EffectProp<number>;
/**
* Most frames replayed to rebuild the smear after a jump.
* Range 1 to 240.
* @default 48
*/
warmup?: number;
}
const datamoshDefaults: DatamoshProps = {
keyframes: [],
strength: 1,
bleed: 0,
warmup: 48,
};
export class Datamosh extends Effect<DatamoshProps, "Datamosh", "visual"> {
public readonly op = "Datamosh" as const;
public override readonly domain = "visual" as const;
public declare keyframes: number[];
public declare strength: number;
public declare bleed: number;
public declare warmup: number;
constructor(config: DatamoshProps = {}) {
super(
withDefaults("Datamosh", datamoshDefaults, config, effectMeta.Datamosh),
);
}
}
export interface DisplacementMapProps {
/**
* Horizontal displacement strength in pixels. Can be modulated by a static number or a dynamic signal.
* Range 0 to 500. Accepts a signal.
* @default 50
*/
strengthX?: EffectProp<number>;
/**
* Vertical displacement strength in pixels. Can be modulated by a static number or a dynamic signal.
* Range 0 to 500. Accepts a signal.
* @default 50
*/
strengthY?: EffectProp<number>;
/**
* X Channel
* @default "Red"
*/
xChannel?: "Red" | "Green" | "Blue" | "Alpha" | "Luminance";
/**
* Y Channel
* @default "Green"
*/
yChannel?: "Red" | "Green" | "Blue" | "Alpha" | "Luminance";
/**
* Wrap Mode
* @default "Clamp"
*/
wrapMode?: "Clamp" | "Repeat" | "Mirror";
}
const displacementMapDefaults: DisplacementMapProps = {
strengthX: 50,
strengthY: 50,
xChannel: "Red",
yChannel: "Green",
wrapMode: "Clamp",
};
export class DisplacementMap extends Effect<
DisplacementMapProps,
"DisplacementMap",
"visual"
> {
public readonly op = "DisplacementMap" as const;
public override readonly domain = "visual" as const;
public declare strengthX: number;
public declare strengthY: number;
public declare xChannel: "Red" | "Green" | "Blue" | "Alpha" | "Luminance";
public declare yChannel: "Red" | "Green" | "Blue" | "Alpha" | "Luminance";
public declare wrapMode: "Clamp" | "Repeat" | "Mirror";
constructor(config: DisplacementMapProps = {}) {
super(
withDefaults(
"DisplacementMap",
displacementMapDefaults,
config,
effectMeta.DisplacementMap,
),
);
}
}
export interface DitherProps {
/**
* Pattern: Bayer matrix, blue-ish noise or round halftone dots.
* @default "bayer"
*/
mode?: "bayer" | "noise" | "halftone";
/**
* Levels per channel (2 = 1-bit).
* Range 2 to 16. Accepts a signal.
* @default 2
*/
levels?: EffectProp<number>;
/**
* Dither pixel size, px.
* Range 1 to 16. Accepts a signal.
* @default 2
*/
scale?: EffectProp<number>;
/**
* Map brightness to the dark → light colors instead of dithering each channel.
* @default true
*/
monochrome?: boolean;
/**
* Dark color (monochrome).
* @default "#111111"
*/
dark?: string;
/**
* Light color (monochrome).
* @default "#f2efe6"
*/
light?: string;
}
const ditherDefaults: DitherProps = {
mode: "bayer",
levels: 2,
scale: 2,
monochrome: true,
dark: "#111111",
light: "#f2efe6",
};
export class Dither extends Effect<DitherProps, "Dither", "visual"> {
public readonly op = "Dither" as const;
public override readonly domain = "visual" as const;
public declare mode: "bayer" | "noise" | "halftone";
public declare levels: number;
public declare scale: number;
public declare monochrome: boolean;
public declare dark: string;
public declare light: string;
constructor(config: DitherProps = {}) {
super(withDefaults("Dither", ditherDefaults, config, effectMeta.Dither));
}
}
export interface ExtractLUTProps {
/**
* Extraction Strategy
* @default "deterministic"
*/
strategy?: "deterministic" | "statistical";
/**
* Sample Points
* Range 10 to 500. Accepts a signal.
* @default 150
*/
samplePoints?: EffectProp<number>;
}
const extractLUTDefaults: ExtractLUTProps = {
strategy: "deterministic",
samplePoints: 150,
};
export class ExtractLUT extends Effect<
ExtractLUTProps,
"ExtractLUT",
"visual"
> {
public readonly op = "ExtractLUT" as const;
public override readonly domain = "visual" as const;
public declare strategy: "deterministic" | "statistical";
public declare samplePoints: number;
constructor(config: ExtractLUTProps = {}) {
super(
withDefaults(
"ExtractLUT",
extractLUTDefaults,
config,
effectMeta.ExtractLUT,
),
);
}
}
export interface FlipProps {
/**
* Mirror horizontally along the vertical center axis.
* @default true
*/
horizontal?: boolean;
/**
* Mirror vertically along the horizontal center axis.
* @default false
*/
vertical?: boolean;
/**
* Swap horizontal and vertical axes (diagonal transposition).
* @default false
*/
diagonal?: boolean;
/**
* Quick preset mode for flipping or transposition.
* @default "horizontal"
*/
mode?:
| "horizontal"
| "vertical"
| "both"
| "diagonal"
| "antiDiagonal"
| "custom";
/**
* Split-mirror reflection and symmetry effects.
* @default "none"
*/
symmetry?:
| "none"
| "leftToRight"
| "rightToLeft"
| "topToBottom"
| "bottomToTop"
| "quadrant";
}
const flipDefaults: FlipProps = {
horizontal: true,
vertical: false,
diagonal: false,
mode: "horizontal",
symmetry: "none",
};
export class Flip extends Effect<FlipProps, "Flip", "visual"> {
public readonly op = "Flip" as const;
public override readonly domain = "visual" as const;
public declare horizontal: boolean;
public declare vertical: boolean;
public declare diagonal: boolean;
public declare mode:
| "horizontal"
| "vertical"
| "both"
| "diagonal"
| "antiDiagonal"
| "custom";
public declare symmetry:
| "none"
| "leftToRight"
| "rightToLeft"
| "topToBottom"
| "bottomToTop"
| "quadrant";
constructor(config: FlipProps = {}) {
super(withDefaults("Flip", flipDefaults, config, effectMeta.Flip));
}
}
export interface GooeyProps {
/**
* Melt distance, px.
* Range 1 to 60. Accepts a signal.
* @default 12
*/
radius?: EffectProp<number>;
/**
* Alpha cut, 0–1 (higher = thinner blobs).
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
threshold?: EffectProp<number>;
/**
* Edge softness.
* Range 0.001 to 0.5. Accepts a signal.
* @default 0.04
*/
softness?: EffectProp<number>;
}
const gooeyDefaults: GooeyProps = {
radius: 12,
threshold: 0.5,
softness: 0.04,
};
export class Gooey extends Effect<GooeyProps, "Gooey", "visual"> {
public readonly op = "Gooey" as const;
public override readonly domain = "visual" as const;
public declare radius: number;
public declare threshold: number;
public declare softness: number;
constructor(config: GooeyProps = {}) {
super(withDefaults("Gooey", gooeyDefaults, config, effectMeta.Gooey));
}
}
export interface IridescenceProps {
/**
* How much rainbow, 0–1.
* Range 0 to 1. Accepts a signal.
* @default 0.6
*/
strength?: EffectProp<number>;
/**
* Rainbow bands over the range.
* Range 0.1 to 10. Accepts a signal.
* @default 2
*/
scale?: EffectProp<number>;
/**
* Hue shift, degrees (animate it).
* Range -3600 to 3600. Accepts a signal.
* @default 0
*/
shift?: EffectProp<number>;
/**
* Bands from brightness, or from the slope of the image (foil).
* @default "relief"
*/
mode?: "luminance" | "relief";
}
const iridescenceDefaults: IridescenceProps = {
strength: 0.6,
scale: 2,
shift: 0,
mode: "relief",
};
export class Iridescence extends Effect<
IridescenceProps,
"Iridescence",
"visual"
> {
public readonly op = "Iridescence" as const;
public override readonly domain = "visual" as const;
public declare strength: number;
public declare scale: number;
public declare shift: number;
public declare mode: "luminance" | "relief";
constructor(config: IridescenceProps = {}) {
super(
withDefaults(
"Iridescence",
iridescenceDefaults,
config,
effectMeta.Iridescence,
),
);
}
}
export interface KaleidoscopeProps {
/**
* Mirror segments.
* Range 2 to 32. Accepts a signal.
* @default 6
*/
segments?: EffectProp<number>;
/**
* Pattern rotation, degrees.
* Range -3600 to 3600. Accepts a signal.
* @default 0
*/
rotation?: EffectProp<number>;
/**
* Center, 0–1 across.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerX?: EffectProp<number>;
/**
* Center, 0–1 down.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerY?: EffectProp<number>;
/**
* Scale of the folded image.
* Range 0.2 to 4. Accepts a signal.
* @default 1
*/
zoom?: EffectProp<number>;
}
const kaleidoscopeDefaults: KaleidoscopeProps = {
segments: 6,
rotation: 0,
centerX: 0.5,
centerY: 0.5,
zoom: 1,
};
export class Kaleidoscope extends Effect<
KaleidoscopeProps,
"Kaleidoscope",
"visual"
> {
public readonly op = "Kaleidoscope" as const;
public override readonly domain = "visual" as const;
public declare segments: number;
public declare rotation: number;
public declare centerX: number;
public declare centerY: number;
public declare zoom: number;
constructor(config: KaleidoscopeProps = {}) {
super(
withDefaults(
"Kaleidoscope",
kaleidoscopeDefaults,
config,
effectMeta.Kaleidoscope,
),
);
}
}
export interface KenBurnsProps {
/**
* @default []
*/
keyframes?: KenBurnsKeyframesItem[];
/**
* Range 0 to 10.
* @default 1.5
*/
motionBlurSize?: number;
/**
* @default "spline"
*/
movementStyle?: "spline" | "direct";
/**
* @default "input"
*/
aspectRatio?:
| "input"
| "16:9"
| "9:16"
| "21:9"
| "9:21"
| "1:1"
| "4:3"
| "3:2"
| "2:3"
| "4:5"
| "5:4";
}
const kenBurnsDefaults: KenBurnsProps = {
keyframes: [],
motionBlurSize: 1.5,
movementStyle: "spline",
aspectRatio: "input",
};
export class KenBurns extends Effect<KenBurnsProps, "KenBurns", "visual"> {
public readonly op = "KenBurns" as const;
public override readonly domain = "visual" as const;
public declare keyframes: KenBurnsKeyframesItem[];
public declare motionBlurSize: number;
public declare movementStyle: "spline" | "direct";
public declare aspectRatio:
| "input"
| "16:9"
| "9:16"
| "21:9"
| "9:21"
| "1:1"
| "4:3"
| "3:2"
| "2:3"
| "4:5"
| "5:4";
constructor(config: KenBurnsProps = {}) {
super(
withDefaults("KenBurns", kenBurnsDefaults, config, effectMeta.KenBurns),
);
}
}
export interface LayerStyleProps {
/**
* @default {"enabled":false,"color":"#000000","opacity":0.75,"angle":120,"distance":10,"spread":0,"size":10,"blendMode":"multiply"}
*/
dropShadow?: Partial<LayerStyleDropShadow>;
/**
* @default {"enabled":false,"color":"#000000","opacity":0.75,"angle":120,"distance":5,"choke":0,"size":5,"blendMode":"multiply"}
*/
innerShadow?: Partial<LayerStyleInnerShadow>;
/**
* @default {"enabled":false,"color":"#ffffff","opacity":0.75,"size":15,"spread":0,"blendMode":"screen"}
*/
outerGlow?: Partial<LayerStyleOuterGlow>;
/**
* @default {"enabled":false,"color":"#ffffff","opacity":0.75,"size":15,"spread":0,"blendMode":"screen"}
*/
innerGlow?: Partial<LayerStyleInnerGlow>;
/**
* @default {"enabled":false,"size":2,"position":"outside","color":"#ffffff","opacity":1,"blendMode":"normal"}
*/
stroke?: Partial<LayerStyleStroke>;
/**
* @default {"enabled":false,"style":"InnerBevel","technique":"Smooth","depth":100,"direction":"Up","size":5,"soften":0,"angle":120,"altitude":30,"highlightColor":"#ffffff","highlightOpacity":0.75,"shadowColor":"#000000","shadowOpacity":0.75}
*/
bevelEmboss?: Partial<LayerStyleBevelEmboss>;
/**
* @default {"enabled":false,"color":"#ff0000","opacity":1,"blendMode":"normal"}
*/
colorOverlay?: Partial<LayerStyleColorOverlay>;
dropShadowAngleHandleId?: string | null;
dropShadowDistanceHandleId?: string | null;
dropShadowSpreadHandleId?: string | null;
dropShadowSizeHandleId?: string | null;
dropShadowOpacityHandleId?: string | null;
innerShadowAngleHandleId?: string | null;
innerShadowDistanceHandleId?: string | null;
innerShadowChokeHandleId?: string | null;
innerShadowSizeHandleId?: string | null;
innerShadowOpacityHandleId?: string | null;
outerGlowSizeHandleId?: string | null;
outerGlowSpreadHandleId?: string | null;
outerGlowOpacityHandleId?: string | null;
innerGlowSizeHandleId?: string | null;
innerGlowSpreadHandleId?: string | null;
innerGlowOpacityHandleId?: string | null;
strokeSizeHandleId?: string | null;
strokeOpacityHandleId?: string | null;
bevelEmbossDepthHandleId?: string | null;
bevelEmbossSizeHandleId?: string | null;
bevelEmbossSoftenHandleId?: string | null;
bevelEmbossAngleHandleId?: string | null;
bevelEmbossAltitudeHandleId?: string | null;
bevelEmbossHighlightOpacityHandleId?: string | null;
bevelEmbossShadowOpacityHandleId?: string | null;
colorOverlayOpacityHandleId?: string | null;
}
const layerStyleDefaults: LayerStyleProps = {
dropShadow: {
enabled: false,
color: "#000000",
opacity: 0.75,
angle: 120,
distance: 10,
spread: 0,
size: 10,
blendMode: "multiply",
},
innerShadow: {
enabled: false,
color: "#000000",
opacity: 0.75,
angle: 120,
distance: 5,
choke: 0,
size: 5,
blendMode: "multiply",
},
outerGlow: {
enabled: false,
color: "#ffffff",
opacity: 0.75,
size: 15,
spread: 0,
blendMode: "screen",
},
innerGlow: {
enabled: false,
color: "#ffffff",
opacity: 0.75,
size: 15,
spread: 0,
blendMode: "screen",
},
stroke: {
enabled: false,
size: 2,
position: "outside",
color: "#ffffff",
opacity: 1,
blendMode: "normal",
},
bevelEmboss: {
enabled: false,
style: "InnerBevel",
technique: "Smooth",
depth: 100,
direction: "Up",
size: 5,
soften: 0,
angle: 120,
altitude: 30,
highlightColor: "#ffffff",
highlightOpacity: 0.75,
shadowColor: "#000000",
shadowOpacity: 0.75,
},
colorOverlay: {
enabled: false,
color: "#ff0000",
opacity: 1,
blendMode: "normal",
},
};
export class LayerStyle extends Effect<
LayerStyleProps,
"LayerStyle",
"visual"
> {
public readonly op = "LayerStyle" as const;
public override readonly domain = "visual" as const;
public declare dropShadow: Partial<LayerStyleDropShadow>;
public declare innerShadow: Partial<LayerStyleInnerShadow>;
public declare outerGlow: Partial<LayerStyleOuterGlow>;
public declare innerGlow: Partial<LayerStyleInnerGlow>;
public declare stroke: Partial<LayerStyleStroke>;
public declare bevelEmboss: Partial<LayerStyleBevelEmboss>;
public declare colorOverlay: Partial<LayerStyleColorOverlay>;
public declare dropShadowAngleHandleId: string | null | undefined;
public declare dropShadowDistanceHandleId: string | null | undefined;
public declare dropShadowSpreadHandleId: string | null | undefined;
public declare dropShadowSizeHandleId: string | null | undefined;
public declare dropShadowOpacityHandleId: string | null | undefined;
public declare innerShadowAngleHandleId: string | null | undefined;
public declare innerShadowDistanceHandleId: string | null | undefined;
public declare innerShadowChokeHandleId: string | null | undefined;
public declare innerShadowSizeHandleId: string | null | undefined;
public declare innerShadowOpacityHandleId: string | null | undefined;
public declare outerGlowSizeHandleId: string | null | undefined;
public declare outerGlowSpreadHandleId: string | null | undefined;
public declare outerGlowOpacityHandleId: string | null | undefined;
public declare innerGlowSizeHandleId: string | null | undefined;
public declare innerGlowSpreadHandleId: string | null | undefined;
public declare innerGlowOpacityHandleId: string | null | undefined;
public declare strokeSizeHandleId: string | null | undefined;
public declare strokeOpacityHandleId: string | null | undefined;
public declare bevelEmbossDepthHandleId: string | null | undefined;
public declare bevelEmbossSizeHandleId: string | null | undefined;
public declare bevelEmbossSoftenHandleId: string | null | undefined;
public declare bevelEmbossAngleHandleId: string | null | undefined;
public declare bevelEmbossAltitudeHandleId: string | null | undefined;
public declare bevelEmbossHighlightOpacityHandleId: string | null | undefined;
public declare bevelEmbossShadowOpacityHandleId: string | null | undefined;
public declare colorOverlayOpacityHandleId: string | null | undefined;
constructor(config: LayerStyleProps = {}) {
super(
withDefaults(
"LayerStyle",
layerStyleDefaults,
config,
effectMeta.LayerStyle,
),
);
}
}
export interface LiquifyProps {
/**
* List of localized liquify deformation operations.
* @default []
*/
operations?: LiquifyOperationsItem[];
}
const liquifyDefaults: LiquifyProps = {
operations: [],
};
export class Liquify extends Effect<LiquifyProps, "Liquify", "visual"> {
public readonly op = "Liquify" as const;
public override readonly domain = "visual" as const;
public declare operations: LiquifyOperationsItem[];
constructor(config: LiquifyProps = {}) {
super(withDefaults("Liquify", liquifyDefaults, config, effectMeta.Liquify));
}
}
export interface MaskMathProps {
/**
* Morphological or Boolean set operation applied to input alpha masks.
* @default "Union"
*/
operation?:
| "Union"
| "Intersect"
| "Subtract"
| "Difference"
| "Invert"
| "Dilate"
| "Erode"
| "Choke"
| "Feather";
/**
* Kernel radius in pixels for Dilate, Erode, Choke, or Feather operations.
* Range 0 to 200. Accepts a signal.
* @default 0
*/
radius?: EffectProp<number>;
/**
* Cutoff threshold level (0.0–1.0) for binarization step or non-linear choke.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
threshold?: EffectProp<number>;
/**
* Minimum alpha matte cutoff limit (0.0–1.0).
* Range 0 to 1. Accepts a signal.
* @default 0
*/
clampMin?: EffectProp<number>;
/**
* Maximum alpha matte cutoff limit (0.0–1.0).
* Range 0 to 1. Accepts a signal.
* @default 1
*/
clampMax?: EffectProp<number>;
/**
* Source channel to extract mask from Mask A (Alpha, Luminance, Red, Green, Blue).
* @default "Alpha"
*/
channelA?: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
/**
* Source channel to extract mask from Mask B (Alpha, Luminance, Red, Green, Blue).
* @default "Alpha"
*/
channelB?: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
/**
* When enabled, outputs crisp 1-bit binary matte based on threshold.
* @default false
*/
binarize?: boolean;
/**
* Inverts final matte output.
* @default false
*/
invertResult?: boolean;
/**
* WhiteWithAlpha (rgba(1,1,1,a)), GrayscaleRGB (rgba(a,a,a,1)), AlphaOnly (rgba(0,0,0,a)), PassthroughRGB (Mask A RGB with new alpha).
* @default "WhiteWithAlpha"
*/
outputFormat?:
| "WhiteWithAlpha"
| "GrayscaleRGB"
| "AlphaOnly"
| "PassthroughRGB";
}
const maskMathDefaults: MaskMathProps = {
operation: "Union",
radius: 0,
threshold: 0.5,
clampMin: 0,
clampMax: 1,
channelA: "Alpha",
channelB: "Alpha",
binarize: false,
invertResult: false,
outputFormat: "WhiteWithAlpha",
};
export class MaskMath extends Effect<MaskMathProps, "MaskMath", "visual"> {
public readonly op = "MaskMath" as const;
public override readonly domain = "visual" as const;
public declare operation:
| "Union"
| "Intersect"
| "Subtract"
| "Difference"
| "Invert"
| "Dilate"
| "Erode"
| "Choke"
| "Feather";
public declare radius: number;
public declare threshold: number;
public declare clampMin: number;
public declare clampMax: number;
public declare channelA: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
public declare channelB: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
public declare binarize: boolean;
public declare invertResult: boolean;
public declare outputFormat:
| "WhiteWithAlpha"
| "GrayscaleRGB"
| "AlphaOnly"
| "PassthroughRGB";
constructor(config: MaskMathProps = {}) {
super(
withDefaults("MaskMath", maskMathDefaults, config, effectMeta.MaskMath),
);
}
}
export interface MeshWarpProps {
/**
* Range 2 to 12.
* @default 3
*/
cols?: number;
/**
* Range 2 to 12.
* @default 3
*/
rows?: number;
points?: MeshWarpPointsItem[];
}
const meshWarpDefaults: MeshWarpProps = {
cols: 3,
rows: 3,
};
export class MeshWarp extends Effect<MeshWarpProps, "MeshWarp", "visual"> {
public readonly op = "MeshWarp" as const;
public override readonly domain = "visual" as const;
public declare cols: number;
public declare rows: number;
public declare points: MeshWarpPointsItem[] | undefined;
constructor(config: MeshWarpProps = {}) {
super(
withDefaults("MeshWarp", meshWarpDefaults, config, effectMeta.MeshWarp),
);
}
}
export interface NoiseGeneratorProps {
/**
* Noise Type
* @default "Perlin"
*/
noiseType?: "Perlin" | "Simplex" | "Voronoi";
/**
* Output Type
* @default "Image"
*/
outputType?: "Image" | "Video";
/**
* Width
* Range 16 to 4096.
* @default 512
*/
width?: number;
/**
* Height
* Range 16 to 4096.
* @default 512
*/
height?: number;
/**
* Scale of the noise pattern. Can be modulated by a static number or a dynamic signal.
* Range 0.1 to 100. Accepts a signal.
* @default 10
*/
scale?: EffectProp<number>;
/**
* Fractal detail depth of the noise.
* Range 1 to 8. Accepts a signal.
* @default 4
*/
octaves?: EffectProp<number>;
/**
* Roughness multiplier for each fractal octave.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
persistence?: EffectProp<number>;
/**
* Frequency spacing multiplier for each fractal octave.
* Range 1 to 4. Accepts a signal.
* @default 2
*/
lacunarity?: EffectProp<number>;
/**
* Speed of time-based noise animation in Video mode.
* Range 0 to 10. Accepts a signal.
* @default 1
*/
speed?: EffectProp<number>;
/**
* Color Start
* @default "#000000"
*/
colorStart?: string;
/**
* Color End
* @default "#ffffff"
*/
colorEnd?: string;
/**
* Duration (ms)
* Range 1 to 60000.
* @default 5000
*/
durationMs?: number;
/**
* FPS
* Range 1 to 120.
* @default 30
*/
fps?: number;
}
const noiseGeneratorDefaults: NoiseGeneratorProps = {
noiseType: "Perlin",
outputType: "Image",
width: 512,
height: 512,
scale: 10,
octaves: 4,
persistence: 0.5,
lacunarity: 2,
speed: 1,
colorStart: "#000000",
colorEnd: "#ffffff",
durationMs: 5000,
fps: 30,
};
export class NoiseGenerator extends Effect<
NoiseGeneratorProps,
"NoiseGenerator",
"visual"
> {
public readonly op = "NoiseGenerator" as const;
public override readonly domain = "visual" as const;
public declare noiseType: "Perlin" | "Simplex" | "Voronoi";
public declare outputType: "Image" | "Video";
public declare width: number;
public declare height: number;
public declare scale: number;
public declare octaves: number;
public declare persistence: number;
public declare lacunarity: number;
public declare speed: number;
public declare colorStart: string;
public declare colorEnd: string;
public declare durationMs: number;
public declare fps: number;
constructor(config: NoiseGeneratorProps = {}) {
super(
withDefaults(
"NoiseGenerator",
noiseGeneratorDefaults,
config,
effectMeta.NoiseGenerator,
),
);
}
}
export interface OpArtProps {
/**
* Line pattern.
* @default "stripes"
*/
pattern?: "stripes" | "rings" | "checker" | "waves";
/**
* Lines across the height.
* Range 2 to 300. Accepts a signal.
* @default 48
*/
frequency?: EffectProp<number>;
/**
* Pattern angle, degrees.
* Range -360 to 360. Accepts a signal.
* @default 0
*/
angle?: EffectProp<number>;
/**
* How far brightness bends the lines.
* Range 0 to 3. Accepts a signal.
* @default 0.6
*/
warp?: EffectProp<number>;
/**
* How much darks thicken the lines (0 = even lines).
* Range 0 to 1. Accepts a signal.
* @default 1
*/
source?: EffectProp<number>;
/**
* Line color.
* @default "#0a0a0a"
*/
colorA?: string;
/**
* Gap color.
* @default "#f5f5f5"
*/
colorB?: string;
}
const opArtDefaults: OpArtProps = {
pattern: "stripes",
frequency: 48,
angle: 0,
warp: 0.6,
source: 1,
colorA: "#0a0a0a",
colorB: "#f5f5f5",
};
export class OpArt extends Effect<OpArtProps, "OpArt", "visual"> {
public readonly op = "OpArt" as const;
public override readonly domain = "visual" as const;
public declare pattern: "stripes" | "rings" | "checker" | "waves";
public declare frequency: number;
public declare angle: number;
public declare warp: number;
public declare source: number;
public declare colorA: string;
public declare colorB: string;
constructor(config: OpArtProps = {}) {
super(withDefaults("OpArt", opArtDefaults, config, effectMeta.OpArt));
}
}
export interface PaintProps {
/**
* Range 1 to 16384.
* @default 1080
*/
width?: number;
/**
* Range 1 to 16384.
* @default 1080
*/
height?: number;
/**
* @default true
*/
maintainAspect?: boolean;
aspectRatio?: number;
/**
* @default "#ffffff"
*/
backgroundColor?: string;
strokes?: (
| PaintStrokesItemOption1
| PaintStrokesItemOption2
| PaintStrokesItemOption3
)[];
}
const paintDefaults: PaintProps = {
width: 1080,
height: 1080,
maintainAspect: true,
backgroundColor: "#ffffff",
};
export class Paint extends Effect<PaintProps, "Paint", "visual"> {
public readonly op = "Paint" as const;
public override readonly domain = "visual" as const;
public declare width: number;
public declare height: number;
public declare maintainAspect: boolean;
public declare aspectRatio: number | undefined;
public declare backgroundColor: string;
public declare strokes:
| (
| PaintStrokesItemOption1
| PaintStrokesItemOption2
| PaintStrokesItemOption3
)[]
| undefined;
constructor(config: PaintProps = {}) {
super(withDefaults("Paint", paintDefaults, config, effectMeta.Paint));
}
}
export interface PainterlyProps {
/**
* Oil (dense strokes) or watercolor (wet edges, paper).
* @default "oil"
*/
style?: "oil" | "watercolor";
/**
* Brush size, px.
* Range 2 to 12. Accepts a signal.
* @default 5
*/
radius?: EffectProp<number>;
/**
* Watercolor: pigment pooling at patch edges.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
edgeDarkening?: EffectProp<number>;
/**
* Paper / canvas grain.
* Range 0 to 1. Accepts a signal.
* @default 0.3
*/
paper?: EffectProp<number>;
/**
* Color saturation.
* Range 0 to 2. Accepts a signal.
* @default 1.05
*/
saturation?: EffectProp<number>;
}
const painterlyDefaults: PainterlyProps = {
style: "oil",
radius: 5,
edgeDarkening: 0.5,
paper: 0.3,
saturation: 1.05,
};
export class Painterly extends Effect<PainterlyProps, "Painterly", "visual"> {
public readonly op = "Painterly" as const;
public override readonly domain = "visual" as const;
public declare style: "oil" | "watercolor";
public declare radius: number;
public declare edgeDarkening: number;
public declare paper: number;
public declare saturation: number;
constructor(config: PainterlyProps = {}) {
super(
withDefaults(
"Painterly",
painterlyDefaults,
config,
effectMeta.Painterly,
),
);
}
}
export interface PatchHealProps {
/** List of patch healing operations applied sequentially. */
patches?: PatchHealPatchesItem[];
/**
* Horizontal normalized position of destination patch (0.0 to 1.0).
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerX?: EffectProp<number>;
/**
* Vertical normalized position of destination patch (0.0 to 1.0).
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerY?: EffectProp<number>;
/**
* Horizontal pixel distance from destination to sample source patch.
* Range -4096 to 4096. Accepts a signal.
* @default 50
*/
offsetX?: EffectProp<number>;
/**
* Vertical pixel distance from destination to sample source patch.
* Range -4096 to 4096. Accepts a signal.
* @default 0
*/
offsetY?: EffectProp<number>;
/**
* Radius of the destination circular patch in pixels (used when no explicit Mask input is connected).
* Range 1 to 500. Accepts a signal.
* @default 25
*/
radius?: EffectProp<number>;
/**
* Radius of the source sample circular patch in pixels.
* Range 1 to 500. Accepts a signal.
* @default 25
*/
sourceRadius?: EffectProp<number>;
/**
* Softness edge falloff percentage (0–100%).
* Range 0 to 100. Accepts a signal.
* @default 50
*/
feather?: EffectProp<number>;
/**
* Blending opacity of the healed patch (0.0–1.0).
* Range 0 to 1. Accepts a signal.
* @default 1
*/
opacity?: EffectProp<number>;
/**
* Healing algorithm: Clone (direct stamp), SeamlessHeal (Poisson color/lighting blend), TextureTransfer (luminance structure matching).
* @default "SeamlessHeal"
*/
mode?: "Clone" | "SeamlessHeal" | "TextureTransfer";
}
const patchHealDefaults: PatchHealProps = {
centerX: 0.5,
centerY: 0.5,
offsetX: 50,
offsetY: 0,
radius: 25,
sourceRadius: 25,
feather: 50,
opacity: 1,
mode: "SeamlessHeal",
};
export class PatchHeal extends Effect<PatchHealProps, "PatchHeal", "visual"> {
public readonly op = "PatchHeal" as const;
public override readonly domain = "visual" as const;
public declare patches: PatchHealPatchesItem[] | undefined;
public declare centerX: number;
public declare centerY: number;
public declare offsetX: number;
public declare offsetY: number;
public declare radius: number;
public declare sourceRadius: number;
public declare feather: number;
public declare opacity: number;
public declare mode: "Clone" | "SeamlessHeal" | "TextureTransfer";
constructor(config: PatchHealProps = {}) {
super(
withDefaults(
"PatchHeal",
patchHealDefaults,
config,
effectMeta.PatchHeal,
),
);
}
}
export interface PixelateProps {
/**
* Cell size, px.
* Range 1 to 256. Accepts a signal.
* @default 12
*/
size?: EffectProp<number>;
/**
* Cell shape: square pixels, round LEDs or diamonds.
* @default "square"
*/
shape?: "square" | "circle" | "diamond";
/**
* Space between cells, as a fraction of a cell (0 = touching).
* Range 0 to 0.9. Accepts a signal.
* @default 0
*/
gap?: EffectProp<number>;
}
const pixelateDefaults: PixelateProps = {
size: 12,
shape: "square",
gap: 0,
};
export class Pixelate extends Effect<PixelateProps, "Pixelate", "visual"> {
public readonly op = "Pixelate" as const;
public override readonly domain = "visual" as const;
public declare size: number;
public declare shape: "square" | "circle" | "diamond";
public declare gap: number;
constructor(config: PixelateProps = {}) {
super(
withDefaults("Pixelate", pixelateDefaults, config, effectMeta.Pixelate),
);
}
}
export interface PosterizeProps {
/**
* Steps per channel when no palette is set.
* Range 2 to 64. Accepts a signal.
* @default 6
*/
levels?: EffectProp<number>;
/**
* Snap to a retro palette, or `custom` to use `colors`.
* @default "none"
*/
palette?:
| "none"
| "gameboy"
| "teletext"
| "cga"
| "pico8"
| "c64"
| "grayscale"
| "sepia"
| "custom";
/**
* Your palette (up to 16 hex colors), used when `palette` is `custom`.
* @default []
*/
colors?: string[];
/**
* Ordered (Bayer) dithering between steps, 0–1.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
dither?: EffectProp<number>;
/**
* Pixel size, px: above 1 for pixel art.
* Range 1 to 64. Accepts a signal.
* @default 1
*/
pixelSize?: EffectProp<number>;
}
const posterizeDefaults: PosterizeProps = {
levels: 6,
palette: "none",
colors: [],
dither: 0,
pixelSize: 1,
};
export class Posterize extends Effect<PosterizeProps, "Posterize", "visual"> {
public readonly op = "Posterize" as const;
public override readonly domain = "visual" as const;
public declare levels: number;
public declare palette:
| "none"
| "gameboy"
| "teletext"
| "cga"
| "pico8"
| "c64"
| "grayscale"
| "sepia"
| "custom";
public declare colors: string[];
public declare dither: number;
public declare pixelSize: number;
constructor(config: PosterizeProps = {}) {
super(
withDefaults(
"Posterize",
posterizeDefaults,
config,
effectMeta.Posterize,
),
);
}
}
export interface ProceduralVFXProps {
/**
* Which procedural particle / light effect to synthesize.
* @default "Smoke"
*/
effectType?:
| "Smoke"
| "Fire"
| "Rain"
| "Sparks"
| "Snow"
| "Dust"
| "Lightning"
| "Magic"
| "LensFlare"
| "Embers"
| "EnergyBeam"
| "Aurora";
/**
* Image renders a static frame; Video animates over time.
* @default "Video"
*/
outputType?: "Image" | "Video";
/**
* Width
* Range 16 to 4096.
* @default 1080
*/
width?: number;
/**
* Height
* Range 16 to 4096.
* @default 1080
*/
height?: number;
/**
* Amount of particles / coverage of the effect. Can be modulated by a static number or dynamic signal.
* Range 0 to 1. Accepts a signal.
* @default 0.6
*/
density?: EffectProp<number>;
/**
* Spatial frequency / particle size of the effect. Can be modulated by a signal.
* Range 0.001 to 10. Accepts a signal.
* @default 0.01
*/
scale?: EffectProp<number>;
/**
* Animation speed in Video mode. Can be modulated by a signal.
* Range 0 to 10. Accepts a signal.
* @default 1
*/
speed?: EffectProp<number>;
/**
* Brightness / alpha gain of the effect. Can be modulated by a signal.
* Range 0 to 1. Accepts a signal.
* @default 0.8
*/
intensity?: EffectProp<number>;
/**
* Deterministic shuffle of the random pattern. Can be modulated by a signal.
* Range 0 to 1000000. Accepts a signal.
* @default 1234
*/
seed?: EffectProp<number>;
/**
* Color Start
* @default "#ffffff"
*/
colorStart?: string;
/**
* Color End
* @default "#ff5500"
*/
colorEnd?: string;
/**
* Duration (ms)
* Range 100 to 100000.
* @default 5000
*/
durationMs?: number;
/**
* FPS
* Range 1 to 120.
* @default 30
*/
fps?: number;
}
const proceduralVFXDefaults: ProceduralVFXProps = {
effectType: "Smoke",
outputType: "Video",
width: 1080,
height: 1080,
density: 0.6,
scale: 0.01,
speed: 1,
intensity: 0.8,
seed: 1234,
colorStart: "#ffffff",
colorEnd: "#ff5500",
durationMs: 5000,
fps: 30,
};
export class ProceduralVFX extends Effect<
ProceduralVFXProps,
"ProceduralVFX",
"visual"
> {
public readonly op = "ProceduralVFX" as const;
public override readonly domain = "visual" as const;
public declare effectType:
| "Smoke"
| "Fire"
| "Rain"
| "Sparks"
| "Snow"
| "Dust"
| "Lightning"
| "Magic"
| "LensFlare"
| "Embers"
| "EnergyBeam"
| "Aurora";
public declare outputType: "Image" | "Video";
public declare width: number;
public declare height: number;
public declare density: number;
public declare scale: number;
public declare speed: number;
public declare intensity: number;
public declare seed: number;
public declare colorStart: string;
public declare colorEnd: string;
public declare durationMs: number;
public declare fps: number;
constructor(config: ProceduralVFXProps = {}) {
super(
withDefaults(
"ProceduralVFX",
proceduralVFXDefaults,
config,
effectMeta.ProceduralVFX,
),
);
}
}
export interface RefineEdgeProps {
/**
* Amount of edge color spill decontamination/defringing (0.0–1.0).
* Range 0 to 1. Accepts a signal.
* @default 0.7
*/
decontaminateAmount?: EffectProp<number>;
/**
* Radius in pixels around alpha transitions to refine and decontaminate.
* Range 0.5 to 50. Accepts a signal.
* @default 2
*/
radius?: EffectProp<number>;
/**
* Matte edge smoothing curve intensity (0–100).
* Range 0 to 100. Accepts a signal.
* @default 5
*/
smooth?: EffectProp<number>;
/**
* Sub-pixel gaussian softness along the matte boundary.
* Range 0 to 50. Accepts a signal.
* @default 0.5
*/
feather?: EffectProp<number>;
/**
* Contract (<0) or expand (>0) the edge boundary (-100% to +100%).
* Range -100 to 100. Accepts a signal.
* @default 0
*/
shiftEdge?: EffectProp<number>;
/**
* Channel to extract matte from (Alpha, Luminance, Red, Green, Blue).
* @default "Alpha"
*/
matteChannel?: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
/**
* Composite (decontaminated RGB + refined alpha), MatteOnly (grayscale mask), DecontaminatedRGB (clean RGB with full alpha).
* @default "Composite"
*/
outputMode?: "Composite" | "MatteOnly" | "DecontaminatedRGB";
}
const refineEdgeDefaults: RefineEdgeProps = {
decontaminateAmount: 0.7,
radius: 2,
smooth: 5,
feather: 0.5,
shiftEdge: 0,
matteChannel: "Alpha",
outputMode: "Composite",
};
export class RefineEdge extends Effect<
RefineEdgeProps,
"RefineEdge",
"visual"
> {
public readonly op = "RefineEdge" as const;
public override readonly domain = "visual" as const;
public declare decontaminateAmount: number;
public declare radius: number;
public declare smooth: number;
public declare feather: number;
public declare shiftEdge: number;
public declare matteChannel: "Alpha" | "Luminance" | "Red" | "Green" | "Blue";
public declare outputMode: "Composite" | "MatteOnly" | "DecontaminatedRGB";
constructor(config: RefineEdgeProps = {}) {
super(
withDefaults(
"RefineEdge",
refineEdgeDefaults,
config,
effectMeta.RefineEdge,
),
);
}
}
export interface RefractionCaustics3DProps {
/**
* Index of Refraction (1.0=Air, 1.33=Water, 1.52=Crown Glass, 2.42=Diamond). Controls ray bending according to Snell's Law.
* Range 1 to 2.5. Accepts a signal.
* @default 1.52
*/
ior?: EffectProp<number>;
/**
* Chromatic dispersion (RGB wavelength splitting) creating prismatic rainbow fringing.
* Range 0 to 0.2. Accepts a signal.
* @default 0.04
*/
dispersion?: EffectProp<number>;
/**
* Depth displacement scale and effective glass thickness factor.
* Range 0 to 2. Accepts a signal.
* @default 0.5
*/
refractionScale?: EffectProp<number>;
/**
* Brightness multiplier for photometric caustic light rays focusing through curved glass.
* Range 0 to 2. Accepts a signal.
* @default 0.6
*/
causticBrightness?: EffectProp<number>;
/**
* Spatial frequency scale of photometric caustic patterns.
* Range 0.1 to 5. Accepts a signal.
* @default 1
*/
causticScale?: EffectProp<number>;
/**
* Dynamic liquid wave perturbation strength across the refractive surface.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
fluidRipples?: EffectProp<number>;
/**
* Speed of dynamic fluid wave animation.
* Range 0 to 5. Accepts a signal.
* @default 1
*/
rippleSpeed?: EffectProp<number>;
/**
* Microfacet frosted glass roughness and optical diffusion blur.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
roughness?: EffectProp<number>;
/**
* Fresnel specular reflection gleam intensity.
* Range 0 to 2. Accepts a signal.
* @default 0.8
*/
specularIntensity?: EffectProp<number>;
/**
* Horizontal normalized coordinate (0.0 to 1.0) of incident light source.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
lightPosX?: EffectProp<number>;
/**
* Vertical normalized coordinate (0.0 to 1.0) of incident light source.
* Range 0 to 1. Accepts a signal.
* @default 0.2
*/
lightPosY?: EffectProp<number>;
/**
* Internal glass color tint and absorption.
* @default "#ffffff"
*/
tintColor?: string;
/**
* Strength of internal glass color tint absorption.
* Range 0 to 1. Accepts a signal.
* @default 0
*/
tintStrength?: EffectProp<number>;
/**
* Invert depth polarity (white = near vs black = near).
* @default false
*/
depthInvert?: boolean;
/**
* Height-field surface normal extrusion exaggeration.
* Range 0.1 to 5. Accepts a signal.
* @default 1
*/
depthScale?: EffectProp<number>;
}
const refractionCaustics3DDefaults: RefractionCaustics3DProps = {
ior: 1.52,
dispersion: 0.04,
refractionScale: 0.5,
causticBrightness: 0.6,
causticScale: 1,
fluidRipples: 0,
rippleSpeed: 1,
roughness: 0,
specularIntensity: 0.8,
lightPosX: 0.5,
lightPosY: 0.2,
tintColor: "#ffffff",
tintStrength: 0,
depthInvert: false,
depthScale: 1,
};
export class RefractionCaustics3D extends Effect<
RefractionCaustics3DProps,
"RefractionCaustics3D",
"visual"
> {
public readonly op = "RefractionCaustics3D" as const;
public override readonly domain = "visual" as const;
public declare ior: number;
public declare dispersion: number;
public declare refractionScale: number;
public declare causticBrightness: number;
public declare causticScale: number;
public declare fluidRipples: number;
public declare rippleSpeed: number;
public declare roughness: number;
public declare specularIntensity: number;
public declare lightPosX: number;
public declare lightPosY: number;
public declare tintColor: string;
public declare tintStrength: number;
public declare depthInvert: boolean;
public declare depthScale: number;
constructor(config: RefractionCaustics3DProps = {}) {
super(
withDefaults(
"RefractionCaustics3D",
refractionCaustics3DDefaults,
config,
effectMeta.RefractionCaustics3D,
),
);
}
}
export interface ResizerScalerProps {
/**
* @default "16:9"
*/
aspectRatioPreset?: "9:16" | "16:9" | "1:1" | "4:5" | "21:9" | "custom";
/**
* @default "1080p"
*/
resolutionPreset?: "4k" | "1080p" | "720p" | "480p" | "custom";
/**
* Range 1 to 8192.
* @default 1920
*/
targetWidth?: number;
/**
* Range 1 to 8192.
* @default 1080
*/
targetHeight?: number;
/**
* @default "contain"
*/
fitMode?: "cover" | "contain" | "stretch" | "manual";
/**
* Range 1 to 1000.
* @default 100
*/
zoom?: number;
/**
* Range -8192 to 8192.
* @default 0
*/
offsetX?: number;
/**
* Range -8192 to 8192.
* @default 0
*/
offsetY?: number;
/**
* @default "solid"
*/
backgroundMode?: "solid" | "blurred" | "gradient" | "transparent";
/**
* @default "#000000FF"
*/
backgroundColor?: string;
/**
* @default "#000000FF"
*/
backgroundColor2?: string;
/**
* Range 0 to 100.
* @default 40
*/
blurRadius?: number;
/**
* Range 0 to 1.
* @default 0.6
*/
backgroundBrightness?: number;
/**
* @default "center"
*/
anchorX?: "left" | "center" | "right";
/**
* @default "center"
*/
anchorY?: "top" | "center" | "bottom";
}
const resizerScalerDefaults: ResizerScalerProps = {
aspectRatioPreset: "16:9",
resolutionPreset: "1080p",
targetWidth: 1920,
targetHeight: 1080,
fitMode: "contain",
zoom: 100,
offsetX: 0,
offsetY: 0,
backgroundMode: "solid",
backgroundColor: "#000000FF",
backgroundColor2: "#000000FF",
blurRadius: 40,
backgroundBrightness: 0.6,
anchorX: "center",
anchorY: "center",
};
export class ResizerScaler extends Effect<
ResizerScalerProps,
"ResizerScaler",
"visual"
> {
public readonly op = "ResizerScaler" as const;
public override readonly domain = "visual" as const;
public declare aspectRatioPreset:
| "9:16"
| "16:9"
| "1:1"
| "4:5"
| "21:9"
| "custom";
public declare resolutionPreset: "4k" | "1080p" | "720p" | "480p" | "custom";
public declare targetWidth: number;
public declare targetHeight: number;
public declare fitMode: "cover" | "contain" | "stretch" | "manual";
public declare zoom: number;
public declare offsetX: number;
public declare offsetY: number;
public declare backgroundMode:
| "solid"
| "blurred"
| "gradient"
| "transparent";
public declare backgroundColor: string;
public declare backgroundColor2: string;
public declare blurRadius: number;
public declare backgroundBrightness: number;
public declare anchorX: "left" | "center" | "right";
public declare anchorY: "top" | "center" | "bottom";
constructor(config: ResizerScalerProps = {}) {
super(
withDefaults(
"ResizerScaler",
resizerScalerDefaults,
config,
effectMeta.ResizerScaler,
),
);
}
}
export interface RGBSplitProps {
/**
* Split distance, px.
* Range 0 to 200. Accepts a signal.
* @default 8
*/
amount?: EffectProp<number>;
/**
* Split direction, degrees (linear mode).
* Range -360 to 360. Accepts a signal.
* @default 0
*/
angle?: EffectProp<number>;
/**
* Split outward from the center instead of along `angle`.
* @default false
*/
radial?: boolean;
}
const rGBSplitDefaults: RGBSplitProps = {
amount: 8,
angle: 0,
radial: false,
};
export class RGBSplit extends Effect<RGBSplitProps, "RGBSplit", "visual"> {
public readonly op = "RGBSplit" as const;
public override readonly domain = "visual" as const;
public declare amount: number;
public declare angle: number;
public declare radial: boolean;
constructor(config: RGBSplitProps = {}) {
super(
withDefaults("RGBSplit", rGBSplitDefaults, config, effectMeta.RGBSplit),
);
}
}
export interface RotateProps {
/**
* Rotation in degrees about the frame center, clockwise. Any value; 90 / 180 / 270 fix footage shot sideways or upside down.
* Accepts a signal.
* @default 90
*/
angle?: EffectProp<number>;
/**
* How the rotated source sits in the output: cover fills it (cropping the overhang), contain shows all of it (transparent margins), fill keeps the unrotated source stretched to the output and only turns it.
* @default "cover"
*/
fit?: "cover" | "contain" | "fill";
/**
* Extra zoom applied after the fit (1 = exactly fitted).
* Range 0.01 to 20. Accepts a signal.
* @default 1
*/
scale?: EffectProp<number>;
}
const rotateDefaults: RotateProps = {
angle: 90,
fit: "cover",
scale: 1,
};
export class Rotate extends Effect<RotateProps, "Rotate", "visual"> {
public readonly op = "Rotate" as const;
public override readonly domain = "visual" as const;
public declare angle: number;
public declare fit: "cover" | "contain" | "fill";
public declare scale: number;
constructor(config: RotateProps = {}) {
super(withDefaults("Rotate", rotateDefaults, config, effectMeta.Rotate));
}
}
export interface StereoPanningProps {
/**
* Stereo panning value: -1 (full left) to 1 (full right), 0 is center. Can be modulated by a static number or dynamic signal.
* Range -1 to 1. Accepts a signal.
* @default 0
*/
pan?: EffectProp<number>;
}
const stereoPanningDefaults: StereoPanningProps = {
pan: 0,
};
export class StereoPanning extends Effect<
StereoPanningProps,
"StereoPanning",
"audio"
> {
public readonly op = "StereoPanning" as const;
public override readonly domain = "audio" as const;
public declare pan: number;
constructor(config: StereoPanningProps = {}) {
super(
withDefaults(
"StereoPanning",
stereoPanningDefaults,
config,
effectMeta.StereoPanning,
),
);
}
}
export interface ToonProps {
/**
* Brightness bands.
* Range 2 to 12. Accepts a signal.
* @default 4
*/
levels?: EffectProp<number>;
/**
* How strong an edge must be to get ink, 0–1.
* Range 0 to 1. Accepts a signal.
* @default 0.2
*/
edgeThreshold?: EffectProp<number>;
/**
* Ink line width, px.
* Range 0.5 to 4. Accepts a signal.
* @default 1
*/
edgeWidth?: EffectProp<number>;
/**
* Ink color.
* @default "#111111"
*/
edgeColor?: string;
/**
* Color saturation after banding.
* Range 0 to 2. Accepts a signal.
* @default 1.15
*/
saturation?: EffectProp<number>;
}
const toonDefaults: ToonProps = {
levels: 4,
edgeThreshold: 0.2,
edgeWidth: 1,
edgeColor: "#111111",
saturation: 1.15,
};
export class Toon extends Effect<ToonProps, "Toon", "visual"> {
public readonly op = "Toon" as const;
public override readonly domain = "visual" as const;
public declare levels: number;
public declare edgeThreshold: number;
public declare edgeWidth: number;
public declare edgeColor: string;
public declare saturation: number;
constructor(config: ToonProps = {}) {
super(withDefaults("Toon", toonDefaults, config, effectMeta.Toon));
}
}
export interface TrailsProps {
/**
* History kept per frame, 0–1: 0.8 short echoes, 0.97 long light trails.
* Range 0 to 1. Accepts a signal.
* @default 0.9
*/
decay?: EffectProp<number>;
/**
* blend: running average (echoes on full-frame footage); over: the layer over its fading past (cutouts, text); add: glows build up (light painting); max: keeps the brightest.
* @default "blend"
*/
mode?: "blend" | "over" | "add" | "max";
/**
* History scale per frame; 1.02 pulls the past into a tunnel.
* Range 0.5 to 2. Accepts a signal.
* @default 1
*/
zoom?: EffectProp<number>;
/**
* History rotation per frame, degrees.
* Range -45 to 45. Accepts a signal.
* @default 0
*/
rotation?: EffectProp<number>;
/**
* History drift per frame, px.
* Range -500 to 500. Accepts a signal.
* @default 0
*/
offsetX?: EffectProp<number>;
/**
* History drift per frame, px.
* Range -500 to 500. Accepts a signal.
* @default 0
*/
offsetY?: EffectProp<number>;
/**
* History hue rotation per frame, degrees (psychedelic cycling).
* Range -180 to 180. Accepts a signal.
* @default 0
*/
hueShift?: EffectProp<number>;
/**
* Most frames replayed to rebuild the history after a jump (scrubbing, a single frame render).
* Range 0 to 240.
* @default 60
*/
warmup?: number;
}
const trailsDefaults: TrailsProps = {
decay: 0.9,
mode: "blend",
zoom: 1,
rotation: 0,
offsetX: 0,
offsetY: 0,
hueShift: 0,
warmup: 60,
};
export class Trails extends Effect<TrailsProps, "Trails", "visual"> {
public readonly op = "Trails" as const;
public override readonly domain = "visual" as const;
public declare decay: number;
public declare mode: "blend" | "over" | "add" | "max";
public declare zoom: number;
public declare rotation: number;
public declare offsetX: number;
public declare offsetY: number;
public declare hueShift: number;
public declare warmup: number;
constructor(config: TrailsProps = {}) {
super(withDefaults("Trails", trailsDefaults, config, effectMeta.Trails));
}
}
export interface VignetteProps {
/**
* The intensity of the vignette darkening effect. 0 = no vignette.
* Range 0 to 100. Accepts a signal.
* @default 50
*/
strength?: EffectProp<number>;
/**
* The extent/size of the vignette.
* Range 0.1 to 2. Accepts a signal.
* @default 1
*/
radius?: EffectProp<number>;
/**
* The softness of the vignette transition edge.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
softness?: EffectProp<number>;
/**
* 0.0 matches the image aspect ratio, 1.0 is a perfect circle.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
roundness?: EffectProp<number>;
/**
* The X coordinate of the vignette center.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerX?: EffectProp<number>;
/**
* The Y coordinate of the vignette center.
* Range 0 to 1. Accepts a signal.
* @default 0.5
*/
centerY?: EffectProp<number>;
}
const vignetteDefaults: VignetteProps = {
strength: 50,
radius: 1,
softness: 0.5,
roundness: 0.5,
centerX: 0.5,
centerY: 0.5,
};
export class Vignette extends Effect<VignetteProps, "Vignette", "visual"> {
public readonly op = "Vignette" as const;
public override readonly domain = "visual" as const;
public declare strength: number;
public declare radius: number;
public declare softness: number;
public declare roundness: number;
public declare centerX: number;
public declare centerY: number;
constructor(config: VignetteProps = {}) {
super(
withDefaults("Vignette", vignetteDefaults, config, effectMeta.Vignette),
);
}
}