Reference navigation
On this page
CLASS · v0.9.1
AnnotationAnimate
Build position, offset, and opacity animations for annotations.
from proteinmotion.annotations import AnnotationAnimateConstructor
AnnotationAnimate(target)Parameters
| Parameter | Default | Description |
|---|---|---|
target | Required | Object to animate or use as a destination. The supported object type depends on the operation. |
Notes
Use annotation.animate. Text and Callout support move_to() and shift(); ResidueLabel supports set_offset(). All support set_opacity().
Methods and properties
| Name | Description |
|---|---|
| move_to()method | Set or animate text position in normalized image coordinates. |
| shift()method | Translate the object by an offset. |
| set_offset()method | Set or animate a residue label’s offset from its projected atom. |
| set_opacity()method | Set or animate opacity in [0, 1]. |
| bind()method | Capture starting values when the scene schedules the animation. |
| apply()method | Evaluate the animation at eased progress alpha. Called by the timeline. |
| targetsproperty · inherited from Animation | Objects whose state this animation changes. |
AnnotationAnimate.move_to(position)Set or animate text position in normalized image coordinates.
| Parameter | Default | Description |
|---|---|---|
position | Required | Image coordinates (x, y), with (0, 0) at the top-left and (1, 1) at the bottom-right. |
Returns: The annotation or animation builder.
AnnotationAnimate.shift(offset)Translate the object by an offset.
| Parameter | Default | Description |
|---|---|---|
offset | Required | Offset (x, y) in design pixels at 1080p for residue labels; normalized image units for text shifts. |
Returns: The object or animation builder.
AnnotationAnimate.set_offset(offset)Set or animate a residue label’s offset from its projected atom.
| Parameter | Default | Description |
|---|---|---|
offset | Required | Offset (x, y) in design pixels at 1080p for residue labels; normalized image units for text shifts. |
Returns: The label or animation builder.
AnnotationAnimate.set_opacity(value)Set or animate opacity in [0, 1].
| Parameter | Default | Description |
|---|---|---|
value | Required | Value to assign; the supported range depends on the property. |
Returns: The object or animation builder.
AnnotationAnimate.bind()Capture starting values when the scene schedules the animation.
Returns: None
Called by ProteinScene.play(). An animation instance can be bound once.
AnnotationAnimate.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.
AnnotationAnimate.targetsObjects whose state this animation changes.