-
Notifications
You must be signed in to change notification settings - Fork 0
Animation
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Animation |
| Namespace | Electron2D |
| Kind | class |
| Category | Animation and Tweening |
Stores keyframed value and method-call tracks for Electron2D.AnimationPlayer.
public sealed class Electron2D.Animation : Electron2D.ResourceProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Animation
Resource for value tracks and method call tracks with deterministic key ordering and interpolation for the supported Variant subset.
An Electron2D.Animation is a passive resource. It stores ordered tracks,
key times, key values and method-call entries, but it does not advance time
or modify scene nodes by itself.
Electron2D 0.1.0 Preview supports value tracks and method tracks only. Editor-only tracks, audio tracks, section playback and blend-tree data are outside this runtime baseline.
This type is not synchronized. Mutate an instance from one thread, normally during loading or on the main scene thread. Read-only access is safe only while no thread is mutating the resource.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.AnimationLibraryElectron2D.AnimationPlayer
| Member | Kind | Summary |
|---|---|---|
Length |
Property | Gets or sets the animation length in seconds. |
LoopMode |
Property | Gets or sets the loop mode used by Electron2D.AnimationPlayer. |
Electron2D.Animation() |
Constructor | Creates an empty animation resource. |
AddTrack(Electron2D.Animation.TrackTypeEnum, System.Int32) |
Method | Adds a new track. |
GetTrackCount() |
Method | Gets the number of tracks stored in this resource. |
MethodTrackInsertKey(System.Int32, System.Double, Electron2D.StringName, Electron2D.Variant[]) |
Method | Inserts or replaces a method-call key. |
RemoveTrack(System.Int32) |
Method | Removes a track. |
TrackGetInterpolationType(System.Int32) |
Method | Gets the interpolation mode for a value track. |
TrackGetKeyCount(System.Int32) |
Method | Gets the number of keys in a track. |
TrackGetKeyTime(System.Int32, System.Int32) |
Method | Gets a key time. |
TrackGetKeyValue(System.Int32, System.Int32) |
Method | Gets a value key's Variant value. |
TrackGetPath(System.Int32) |
Method | Gets the path assigned to a track. |
TrackGetType(System.Int32) |
Method | Gets the kind of a track. |
TrackInsertKey(System.Int32, System.Double, Electron2D.Variant) |
Method | Inserts or replaces a value key. |
TrackIsEnabled(System.Int32) |
Method | Gets whether a track is enabled. |
TrackSetEnabled(System.Int32, System.Boolean) |
Method | Enables or disables a track. |
TrackSetInterpolationType(System.Int32, Electron2D.Animation.InterpolationTypeEnum) |
Method | Sets the interpolation mode for a value track. |
TrackSetPath(System.Int32, Electron2D.NodePath) |
Method | Assigns a path to a track. |
ValueTrackInterpolate(System.Int32, System.Double) |
Method | Evaluates a value track at a specific time. |
Kind: Property
public System.Double Length { get; set; }Gets or sets the animation length in seconds.
This property follows the validation and lifetime rules of its declaring type.
A finite value greater than or equal to 0.
-
System.ArgumentOutOfRangeException: Thrown when the assigned value is not finite or is less than0.
This property is not synchronized. Mutate it from one thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Property
public Electron2D.Animation.LoopModeEnum LoopMode { get; set; }Gets or sets the loop mode used by Electron2D.AnimationPlayer.
This property follows the validation and lifetime rules of its declaring type.
The loop behavior for playback of this resource.
This property is not synchronized. Mutate it from one thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Constructor
public Electron2D.Animation()Creates an empty animation resource.
New animations have a length of 0, no tracks and
Electron2D.Animation.LoopModeEnum.None loop behavior.
Construction is safe on any thread when the instance is not shared until construction completes.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public System.Int32 AddTrack(Electron2D.Animation.TrackTypeEnum, System.Int32)(Electron2D.Animation.TrackTypeEnum type, System.Int32 atPosition)Adds a new track.
This method follows the validation and lifetime rules of its declaring type.
-
type: The kind of track to add. -
atPosition: The insertion index, or-1to append the track.
The zero-based index of the inserted track.
-
System.ArgumentOutOfRangeException: Thrown whentypeis outside the supported enum range oratPositionis outside the insertion range.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.RemoveTrack(System.Int32)
Kind: Method
public System.Int32 GetTrackCount()()Gets the number of tracks stored in this resource.
This method follows the validation and lifetime rules of its declaring type.
The track count.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public System.Void MethodTrackInsertKey(System.Int32, System.Double, Electron2D.StringName, Electron2D.Variant[])(System.Int32 trackIdx, System.Double time, Electron2D.StringName method, Electron2D.Variant[] arguments)Inserts or replaces a method-call key.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based method track index. -
time: The finite key time in seconds. It must be at least0. -
method: The method name to call on the track target. -
arguments: The optional method arguments stored as Variant values.
-
System.ArgumentException: Thrown whenmethodis empty. -
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range ortimeis not finite or less than0. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a method track.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public System.Void RemoveTrack(System.Int32)(System.Int32 trackIdx)Removes a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.AddTrack(Electron2D.Animation.TrackTypeEnum,System.Int32)
Kind: Method
public Electron2D.Animation.InterpolationTypeEnum TrackGetInterpolationType(System.Int32)(System.Int32 trackIdx)Gets the interpolation mode for a value track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
The interpolation mode.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a value track.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackSetInterpolationType(System.Int32,Electron2D.Animation.InterpolationTypeEnum)
Kind: Method
public System.Int32 TrackGetKeyCount(System.Int32)(System.Int32 trackIdx)Gets the number of keys in a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
The number of keys in the track.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public System.Double TrackGetKeyTime(System.Int32, System.Int32)(System.Int32 trackIdx, System.Int32 keyIdx)Gets a key time.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index. -
keyIdx: The zero-based key index.
The key time in seconds.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxorkeyIdxis outside the valid range.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public Electron2D.Variant TrackGetKeyValue(System.Int32, System.Int32)(System.Int32 trackIdx, System.Int32 keyIdx)Gets a value key's Variant value.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based value track index. -
keyIdx: The zero-based key index.
The stored key value.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxorkeyIdxis outside the valid range. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a value track.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackInsertKey(System.Int32,System.Double,Electron2D.Variant)
Kind: Method
public Electron2D.NodePath TrackGetPath(System.Int32)(System.Int32 trackIdx)Gets the path assigned to a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
The track path.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackSetPath(System.Int32,Electron2D.NodePath)
Kind: Method
public Electron2D.Animation.TrackTypeEnum TrackGetType(System.Int32)(System.Int32 trackIdx)Gets the kind of a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
The track type.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation
Kind: Method
public System.Void TrackInsertKey(System.Int32, System.Double, Electron2D.Variant)(System.Int32 trackIdx, System.Double time, Electron2D.Variant value)Inserts or replaces a value key.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based value track index. -
time: The finite key time in seconds. It must be at least0. -
value: The value stored at the key.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range ortimeis not finite or less than0. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a value track.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.ValueTrackInterpolate(System.Int32,System.Double)
Kind: Method
public System.Boolean TrackIsEnabled(System.Int32)(System.Int32 trackIdx)Gets whether a track is enabled.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index.
true when the track is enabled; otherwise, false.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackSetEnabled(System.Int32,System.Boolean)
Kind: Method
public System.Void TrackSetEnabled(System.Int32, System.Boolean)(System.Int32 trackIdx, System.Boolean enabled)Enables or disables a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index. -
enabled:trueto enable the track; otherwise,false.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackIsEnabled(System.Int32)
Kind: Method
public System.Void TrackSetInterpolationType(System.Int32, Electron2D.Animation.InterpolationTypeEnum)(System.Int32 trackIdx, Electron2D.Animation.InterpolationTypeEnum interpolation)Sets the interpolation mode for a value track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index. -
interpolation: The interpolation mode to assign.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range orinterpolationis outside the supported enum range. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a value track.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackGetInterpolationType(System.Int32)
Kind: Method
public System.Void TrackSetPath(System.Int32, Electron2D.NodePath)(System.Int32 trackIdx, Electron2D.NodePath path)Assigns a path to a track.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based track index. -
path: The target path. Value tracks use node path plus property subnames; method tracks use the node path.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range.
This method is not synchronized. Mutate the resource from one thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackGetPath(System.Int32)
Kind: Method
public Electron2D.Variant ValueTrackInterpolate(System.Int32, System.Double)(System.Int32 trackIdx, System.Double time)Evaluates a value track at a specific time.
This method follows the validation and lifetime rules of its declaring type.
-
trackIdx: The zero-based value track index. -
time: The finite time in seconds.
The nearest or interpolated value. A track with no keys returns a nil
Electron2D.Variant.
-
System.ArgumentOutOfRangeException: Thrown whentrackIdxis outside the track range ortimeis not finite. -
System.InvalidOperationException: Thrown whentrackIdxdoes not reference a value track.
This method is safe when no thread is mutating the resource.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Animation.TrackInsertKey(System.Int32,System.Double,Electron2D.Variant)Electron2D.Animation.TrackSetInterpolationType(System.Int32,Electron2D.Animation.InterpolationTypeEnum)
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.