ProteinMotion
Reference navigation
On this page

AnimationGroup

Compose actions with independent durations and start offsets in seconds. Animation.during(seconds, delay=...) is shorthand.

python
from proteinmotion import AnimationGroup

Constructor

python
AnimationGroup(*animations, durations=None, offsets=None)

Parameters

ParameterDefaultDescription
*animations—Animation objects to run together.
durationskeyword onlyNoneOne positive duration in seconds per action; None uses natural durations.
offsetskeyword onlyNoneOne nonnegative start offset in seconds per animation.

Methods and properties

NameDescription
targetspropertyObjects whose state this animation changes.
bind()methodCapture starting values when the scene schedules the animation.
apply()methodEvaluate the animation at eased progress alpha. Called by the timeline.
during()method · inherited from AnimationSet this animation duration and start delay in seconds.
python
AnimationGroup.targets

Objects whose state this animation changes.

python
AnimationGroup.bind()

Capture starting values when the scene schedules the animation.

Returns: None

Called by ProteinScene.play(). An animation instance can be bound once.

python
AnimationGroup.apply(alpha)

Evaluate the animation at eased progress alpha. Called by the timeline.

ParameterDefaultDescription
alphaRequiredEased animation progress in [0, 1].

Returns: None

Inherited from animation.Animation.

python
AnimationGroup.during(seconds, *, delay=0)

Set this animation duration and start delay in seconds.

ParameterDefaultDescription
secondsRequiredPositive animation duration in seconds.
delaykeyword only0Nonnegative animation start delay in seconds.