Reference navigation
On this page
AnimationGroup
Compose actions with independent durations and start offsets in seconds. Animation.during(seconds, delay=...) is shorthand.
from proteinmotion import AnimationGroupConstructor
AnimationGroup(*animations, durations=None, offsets=None)Parameters
| Parameter | Default | Description |
|---|---|---|
*animations | — | Animation objects to run together. |
durationskeyword only | None | One positive duration in seconds per action; None uses natural durations. |
offsetskeyword only | None | One nonnegative start offset in seconds per animation. |
Methods and properties
| Name | Description |
|---|---|
| targetsproperty | Objects whose state this animation changes. |
| bind()method | Capture starting values when the scene schedules the animation. |
| apply()method | Evaluate the animation at eased progress alpha. Called by the timeline. |
| during()method · inherited from Animation | Set this animation duration and start delay in seconds. |
AnimationGroup.targetsObjects whose state this animation changes.
AnimationGroup.bind()Capture starting values when the scene schedules the animation.
Returns: None
Called by ProteinScene.play(). An animation instance can be bound once.
AnimationGroup.apply(alpha)Evaluate the animation at eased progress alpha. Called by the timeline.
| Parameter | Default | Description |
|---|---|---|
alpha | Required | Eased animation progress in [0, 1]. |
Returns: None
Inherited from animation.Animation.
AnimationGroup.during(seconds, *, delay=0)Set this animation duration and start delay in seconds.
| Parameter | Default | Description |
|---|---|---|
seconds | Required | Positive animation duration in seconds. |
delaykeyword only | 0 | Nonnegative animation start delay in seconds. |