Class: FilterRegistry
Defined in: attributes/shape/filters/registry.ts:17
Central registry that maps filter type strings to their FilterData handlers.
Each filter implementation file calls FilterRegistry.register at module load time
so the registry is populated as a side effect of importing that module.
Constructors
Constructor
new FilterRegistry():
FilterRegistry
Returns
FilterRegistry
Methods
get()
staticget(type):FilterData<MediaFilter> |undefined
Defined in: attributes/shape/filters/registry.ts:32
Look up the FilterData for a given type key, or undefined if not registered.
Parameters
type
string
Returns
FilterData<MediaFilter> | undefined
has()
statichas(type):boolean
Defined in: attributes/shape/filters/registry.ts:37
Return true when a filter type has been registered.
Parameters
type
string
Returns
boolean
lerp()
staticlerp(from,to,t):MediaFilter
Defined in: attributes/shape/filters/registry.ts:45
Interpolate between two individual filters at progress t.
Falls back to a hard cut at t = 0.5 when the types differ or are unregistered.
Parameters
from
to
t
number
Returns
lerpArray()
staticlerpArray(from,to,t):MediaFilter[]
Defined in: attributes/shape/filters/registry.ts:55
Interpolate between two filter arrays of potentially different lengths. Indices present in only one array are kept as-is; matched indices are lerped pairwise.
Parameters
from
to
t
number
Returns
register()
staticregister<T>(type,data):void
Defined in: attributes/shape/filters/registry.ts:24
Register a filter type.
Throws if the same type key is registered more than once to catch accidental double-imports.
Type Parameters
T
T extends MediaFilter
Parameters
type
string
data
FilterData<T>
Returns
void