CLASS v1.8.0

Orchestrator

pykraken.Orchestrator

Timeline animator for Transform objects.

More about Orchestrator

Allows chaining effects to create complex animations that play over time. Effects can run sequentially or in parallel.

Attributes

  • finalized (bool) — Whether the orchestrator has been finalized.
  • playing (bool) — Whether the animation is currently playing.
  • finished (bool) — Whether the animation has completed.
  • looping (bool) — Whether the animation should loop when finished.

Methods

parallel(*effects): Add multiple effects to run in parallel. then(effect): Add a single effect to the timeline. finalize(): Finalize the orchestrator, preventing further edits. play(): Start playing the animation from the beginning. pause(): Pause the animation at the current position. resume(): Resume a paused animation. stop(): Stop the animation and reset to the beginning. rewind(): Reset the animation to the beginning without stopping.

Reference

PYTHON API
Orchestrator(target: Transform)

Create an Orchestrator for animating transforms.

Args

  • target (Transform) — The transform to animate.

finalized

property
finalized: bool

Whether the orchestrator has been finalized.

finished

property
finished: bool

Whether the animation has completed.

looping

property
looping: bool

Whether the animation should loop when finished.

playing

property
playing: bool

Whether the animation is currently playing.

finalize

method
finalize(self) -> None

Finalize the orchestrator, preventing further edits.

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

parallel

method
parallel(self, *effects: fx.Effect) -> Orchestrator

Add multiple effects to run in parallel.

Args

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

Returns

  • Orchestrator — Self for method chaining.

pause

method
pause(self) -> None

Pause the animation at the current position.

play

method
play(self) -> None

Start playing the animation from the beginning.

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

resume

method
resume(self) -> None

Resume a paused animation.

rewind

method
rewind(self) -> None

Reset the animation to the beginning without stopping.

stop

method
stop(self) -> None

Stop the animation and reset to the beginning.

then

method
then(self, effect: fx.Effect) -> Orchestrator

Add a single effect to the timeline.

Args

  • effect — The Effect to add.

Returns

  • Orchestrator — Self for method chaining.

Find your next step

Start typing to search the manual.