Orchestrator

A timeline animator for Transform objects.

Constructor

Orchestrator(target: Transform | object)

Parameters

  • target : Either a Transform object or an object with a transform attribute (like Sprite).

Properties


NameDescriptionType
finalizedWhether the orchestrator has been finalizedbool
finishedWhether the animation has completedbool
playingWhether the animation is currently playingbool
loopingWhether the animation should loop when finishedbool

Methods


Then

then(effect: Effect) Orchestrator

Add a single effect to the timeline.

Parameters

  • effect : The Effect to add.

Returns

Orchestrator : Self for method chaining.

Parallel

parallel(*effects: Effect) Orchestrator

Add multiple effects to run in parallel.

Parameters

  • *effects : Variable number of Effect objects to run simultaneously.

Returns

Orchestrator : Self for method chaining.

Finalize

finalize() None

Finalize the orchestrator, preventing further edits.

Note:

Must be called before play(). Logs a warning if called multiple times.

Play

play() None

Start playing the animation from the beginning.

Note:

Logs a warning if not finalized or if there are no steps.

Pause

pause() None

Pause the animation at the current position.

Resume

resume() None

Resume a paused animation.

Stop

stop() None

Stop the animation and reset to the beginning.

Rewind

rewind() None

Reset the animation to the beginning without stopping.