Skip to content

textmode.js / Textmodifier / filter

Method: filter()

Call Signature

ts
filter<T>(name, params?): void;

Apply a filter to the final composited output.

Filters are applied after all layers are composited but before the result is presented to the canvas. Multiple filters can be queued per frame and will be applied in order.

Type Parameters

Type Parameter
T extends BuiltInFilterName

Parameters

ParameterTypeDescription
nameTThe name of the filter to apply (built-in or custom)
params?BuiltInFilterParams[T]Optional parameters for the filter

Returns

void

Example

Call Signature

ts
filter<TParams>(name, params?): void;

Apply a filter to the final composited output.

Filters are applied after all layers are composited but before the result is presented to the canvas. Multiple filters can be queued per frame and will be applied in order.

Type Parameters

Type ParameterDefault type
TParamsunknown

Parameters

ParameterTypeDescription
namestringThe name of the filter to apply (built-in or custom)
params?TParamsOptional parameters for the filter

Returns

void

Example