MotionScript

@motion-script/core


@motion-script/core / FilterChain

Class: FilterChain

Defined in: attributes/shape/filters/chain.ts:415

An ImageFilterChain plus the video-only temporal filters — the filters valid on a video fill.

Example

node.filters = VideoFilters.posterizeTime(6).grayscale(1);

Extends

Constructors

Constructor

new FilterChain(list?): FilterChain

Defined in: attributes/shape/filters/chain.ts:160

Parameters

list?

AnyFilter[] = []

Returns

FilterChain

Inherited from

ImageFilterChain.constructor

Properties

list

list: AnyFilter[] = []

Defined in: attributes/shape/filters/chain.ts:160

Inherited from

ImageFilterChain.list

Methods

[iterator]()

[iterator](): Generator<AnyFilter, void, unknown>

Defined in: attributes/shape/filters/chain.ts:398

Allows spreading the chain into an array: [...ImageFilters.blur(5)].

Returns

Generator<AnyFilter, void, unknown>

Inherited from

ImageFilterChain.[iterator]


alpha()

alpha(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:186

Append an alpha (opacity) filter.

Parameters

options

number | AlphaFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.alpha


append()

protected append(filter): this

Defined in: attributes/shape/filters/chain.ts:166

Append filter, returning a chain of the same class — so the video subclass keeps its extra builders reachable after an inherited one.

Parameters

filter

AnyFilter

Returns

this

Inherited from

ImageFilterChain.append


ascii()

ascii(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:326

Append an ASCII-art remap of the fill through a glyph ramp.

Parameters

options?

number | Omit<AsciiOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.ascii


bitCrush()

bitCrush(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:281

Append a bit-depth crush, optionally snapping to a hardware palette.

Parameters

options?

number | Omit<BitCrushOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.bitCrush


blockDisplace()

blockDisplace(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:363

Append horizontal band tearing — the datamosh / bad-signal look.

Parameters

options?

number | Omit<BlockDisplaceOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.blockDisplace


bloom()

bloom(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:234

Append a bloom (glow): bright areas bleed soft light outward.

Parameters

options?

number | Omit<BloomOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.bloom


blur()

blur(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:174

Append a Gaussian blur.

Parameters

options

number | BlurFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.blur


bulge()

bulge(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:368

Append a bulge (barrel) or, with a negative strength, a pinch.

Parameters

options

number | Omit<BulgeOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.bulge


chromaticAberration()

chromaticAberration(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:348

Append lens-dispersion colour fringing.

Parameters

options?

number | Omit<ChromaticAberrationOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.chromaticAberration


colorAdjustment()

colorAdjustment(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:198

Append a color-adjustment filter from the given partial settings.

Parameters

options

ColorAdjustmentFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.colorAdjustment


colorMatrix()

colorMatrix(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:203

Append a raw 4×5 row-major color matrix (Skia format).

Parameters

options

number[] | ColorMatrixFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.colorMatrix


curves()

curves(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:209

Append a curves filter from control points ([input, output] pairs).

Parameters

options

CurvesFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.curves


directionalBlur()

directionalBlur(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:216

Append a directional (linear) blur, smearing the fill along one axis.

Parameters

options

number | Omit<DirectionalBlurOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.directionalBlur


displace()

displace(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:388

Append a displacement map, pushing pixels by another image's channels.

Parameters

options

AsFilterOptions<DisplaceOptions>

Returns

FilterChain

Inherited from

ImageFilterChain.displace


dither()

dither(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:291

Append ordered (Bayer) dithering — quantize to levels tones, hiding the banding in a repeating threshold pattern.

Parameters

options?

number | Omit<DitherOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.dither


duotone()

duotone(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:266

Append a duotone map — remap luminance between two colours.

Parameters

options?

number | Omit<DuotoneOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.duotone


echo()

echo(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:423

Append an echo (motion-trail) filter over the clip's past frames.

Parameters

options

VideoEchoFilterOptions

Returns

FilterChain


edges()

edges(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:331

Append an edge-detect pass (Sobel / Prewitt / Laplacian).

Parameters

options?

number | Omit<EdgesOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.edges


exposure()

exposure(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:192

Append an exposure filter.

Parameters

options

number | ExposureFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.exposure


godRays()

godRays(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:244

Append volumetric light rays radiating from the fill's bright areas.

Parameters

options?

number | Omit<GodRaysOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.godRays


grain()

grain(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:301

Append film grain. Animate it by tweening seed.

Parameters

options?

number | Omit<GrainOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.grain


grayscale()

grayscale(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:180

Append a grayscale filter.

Parameters

options

number | GrayscaleFilterOptions

Returns

FilterChain

Inherited from

ImageFilterChain.grayscale


halftone()

halftone(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:296

Append a halftone screen — print-style dots (or lines) sized by tone.

Parameters

options?

number | Omit<HalftoneOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.halftone


invert()

invert(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:256

Append a colour invert (negative).

Parameters

options?

number | Omit<InvertOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.invert


kaleidoscope()

kaleidoscope(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:383

Append a kaleidoscope mirror of the fill about a centre point.

Parameters

options?

number | Omit<KaleidoscopeOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.kaleidoscope


oilPaint()

oilPaint(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:321

Append Kuwahara "oil paint" brushwork: average within a region, never across an edge, so flat areas smooth into strokes while edges stay crisp.

Cost grows with radius² — the most expensive filter in the set.

Parameters

options?

number | Omit<OilPaintOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.oilPaint


pixelate()

pixelate(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:311

Append an After Effects-style Mosaic — blocks across the fill.

Parameters

options

number | Omit<PixelateOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.pixelate


posterize()

posterize(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:271

Append colour banding: quantize to levels tones per channel.

Parameters

options?

number | Omit<PosterizeOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.posterize


posterizeTime()

posterizeTime(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:417

Append a posterize-time filter; snaps the video playhead to fps.

Parameters

options

number | PosterizeTimeFilterOptions

Returns

FilterChain


progressiveBlur()

progressiveBlur(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:229

Append a progressive blur — a blur that ramps across the fill, for the frosted-toward-one-edge look.

Parameters

options?

number | Omit<ProgressiveBlurOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.progressiveBlur


radialBlur()

radialBlur(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:221

Append a radial blur — zoom or spin streaks about a centre point.

Parameters

options?

number | Omit<RadialBlurOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.radialBlur


rgbShift()

rgbShift(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:353

Append a hard per-channel RGB offset (the glitchy cousin of the above).

Parameters

options?

number | Omit<RgbShiftOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.rgbShift


scanlines()

scanlines(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:306

Append CRT-style scanlines.

Parameters

options?

number | Omit<ScanlinesOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.scanlines


scatter()

scatter(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:358

Append per-pixel random jitter.

Parameters

options?

number | Omit<ScatterOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.scatter


sharpen()

sharpen(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:249

Append an unsharp-mask sharpen.

Parameters

options?

number | Omit<SharpenOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.sharpen


sksl()

sksl(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:393

Append a custom SkSL shader pass over the fill.

Parameters

options

AsFilterOptions<SkSLOptions>

Returns

FilterChain

Inherited from

ImageFilterChain.sksl


streak()

streak(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:239

Append anamorphic streaks off the fill's highlights.

Parameters

options?

number | Omit<StreakOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.streak


texture()

texture(options): FilterChain

Defined in: attributes/shape/filters/chain.ts:341

Append an overlaid texture image (paper, canvas, noise map).

Parameters

options

AsFilterOptions<TextureOptions>

Returns

FilterChain

Inherited from

ImageFilterChain.texture


threshold()

threshold(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:276

Append a hard luminance threshold (1-bit black/white).

Parameters

options?

number | Omit<ThresholdOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.threshold


toJSON()

toJSON(): AnyFilter[]

Defined in: attributes/shape/filters/chain.ts:403

Serializes to the raw filter array so frameworks that call toJSON get a plain value.

Returns

AnyFilter[]

Inherited from

ImageFilterChain.toJSON


twirl()

twirl(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:373

Append a twirl (swirl about a centre point).

Parameters

options?

number | Omit<TwirlOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.twirl


vignette()

vignette(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:336

Append a darkened border falling off toward the fill's corners.

Parameters

options?

number | Omit<VignetteOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.vignette


vintage()

vintage(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:261

Append a vintage / film-look grade (sepia + desaturate + warmth).

Parameters

options?

number | Omit<VintageOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.vintage


wave()

wave(options?): FilterChain

Defined in: attributes/shape/filters/chain.ts:378

Append a sine/triangle/square wave warp.

Parameters

options?

number | Omit<WaveOptions, "mode">

Returns

FilterChain

Inherited from

ImageFilterChain.wave