TweenPlugin

View source

ExtendsPlugin

Connects one component type to its tween component type and interpolation function.

Each instance advances and interpolates the configured component/tween pair, including repeat and endpoint-flip behavior. Use one instance for each pair that the app should support. The plugin depends on CorePlugin and TimePlugin.

Constructor


constructor<T>(options: TweenPluginOptions<T>)

View source

Creates a tween plugin for one component/tween pair.

Type Parameters

T

Parameters

NameDescriptionDefault
options

Component, tween, and interpolation configuration.

—

Properties


readonlycomponent: object

View source

Component constructor whose values this plugin interpolates.

Methods


register(app: App): void

View source

Enables tweening for this plugin’s configured component/tween pair in an app.

Parameters

NameDescriptionDefault
app

App to configure.

—

requires(): TypeId[]

View source

Returns plugin IDs that must already be registered before finalization.

App#run asks PluginRegistry to validate every returned ID after all registration hooks complete and before any finish hook runs. A missing ID causes run to throw; IDs do not cause plugins to be installed, and this list does not reorder plugin hooks. The base implementation has no dependencies.

Returns

Required plugin type IDs.

name(): TypeId

View source

Returns this plugin’s identity used by PluginRegistry.

The default implementation returns typeid(this.constructor). Override it when a plugin has multiple valid instances that need distinct identities, such as a generic plugin keyed by a configured constructor. The returned ID is checked when App#registerPlugin adds the plugin; registering a duplicate ID throws instead of replacing the existing instance.

Returns

Plugin identity used for duplicate detection and dependency lookup.