simvx.core.animation.track¶
Keyframe animation tracks and clips.
Module Contents¶
Classes¶
Event that fires when playback crosses a specific timestamp. |
|
Property animation track with keyframe interpolation. |
|
Timeline-based animation with multiple property tracks. |
Data¶
API¶
- class simvx.core.animation.track.AnimationEvent[source]¶
Event that fires when playback crosses a specific timestamp.
Attributes: time: Timestamp in seconds when the event fires. callback: Function to call when the event triggers. args: Positional arguments passed to callback.
- time: float¶
None
- callback: collections.abc.Callable¶
None
- args: tuple¶
()
- class simvx.core.animation.track.Track(property_name: str)[source]¶
Property animation track with keyframe interpolation.
Stores (time, value) keyframes and interpolates between them. Optionally holds AnimationEvents that fire when playback crosses their timestamp.
Initialization
- add_event(time: float, callback: collections.abc.Callable, *args)[source]¶
Add an event that fires when playback crosses the given timestamp.
Args: time: Timestamp in seconds. callback: Function to invoke. *args: Additional arguments forwarded to callback.
- class simvx.core.animation.track.AnimationClip(name: str, duration: float)[source]¶
Timeline-based animation with multiple property tracks.
Example: clip = AnimationClip(“jump”, duration=1.0) clip.add_track(“position”, [ (0.0, Vec3(0, 0, 0)), (0.5, Vec3(0, 5, 0)), (1.0, Vec3(0, 0, 0)), ]) clip.add_track(“rotation”, [ (0.0, 0.0), (1.0, 360.0), ])
Initialization