UpdateMode
Animation.swift:92enum UpdateModeenum UpdateModeimport SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
class AnimationHolds data that can be used to animate anything in the engine.
case continuousUpdate between keyframes and hold the value.
case discreteUpdate at the keyframes.
case captureSame as .updateContinuous but works as a flag to capture the value of the current object and perform interpolation in some methods. See also capture(name:duration:transType:easeType:), playbackAutoCapture, and playWithCapture(name:duration:customBlend:customSpeed:fromEnd:transType:easeType:).
override class var godotClassName: StringName { get }final var length: Double { get set }The total length of the animation (in seconds).
final var loopMode: Animation.LoopMode { get set }Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
final var step: Double { get set }The animation step value.
final func addTrack(type: Animation.TrackType, atPosition: Int32 = -1) -> Int32 Adds a track to the Animation.
final func animationTrackGetKeyAnimation(trackIdx: Int32, keyIdx: Int32) -> StringName Returns the animation name at the key identified by keyIdx. The trackIdx must be the index of an Animation Track.
final func animationTrackInsertKey(trackIdx: Int32, time: Double, animation: StringName) -> Int32 Inserts a key with value animation at the given time (in seconds). The trackIdx must be the index of an Animation Track.
final func animationTrackSetKeyAnimation(trackIdx: Int32, keyIdx: Int32, animation: StringName) Sets the key identified by keyIdx to value animation. The trackIdx must be the index of an Animation Track.
final func audioTrackGetKeyEndOffset(trackIdx: Int32, keyIdx: Int32) -> Double Returns the end offset of the key identified by keyIdx. The trackIdx must be the index of an Audio Track.
final func audioTrackGetKeyStartOffset(trackIdx: Int32, keyIdx: Int32) -> Double Returns the start offset of the key identified by keyIdx. The trackIdx must be the index of an Audio Track.
final func audioTrackGetKeyStream(trackIdx: Int32, keyIdx: Int32) -> Resource? Returns the audio stream of the key identified by keyIdx. The trackIdx must be the index of an Audio Track.
final func audioTrackInsertKey(trackIdx: Int32, time: Double, stream: Resource?, startOffset: Double = 0, endOffset: Double = 0) -> Int32 Inserts an Audio Track key at the given time in seconds. The trackIdx must be the index of an Audio Track.
final func audioTrackIsUseBlend(trackIdx: Int32) -> Bool Returns true if the track at trackIdx will be blended with other animations.
final func audioTrackSetKeyEndOffset(trackIdx: Int32, keyIdx: Int32, offset: Double) Sets the end offset of the key identified by keyIdx to value offset. The trackIdx must be the index of an Audio Track.
final func audioTrackSetKeyStartOffset(trackIdx: Int32, keyIdx: Int32, offset: Double) Sets the start offset of the key identified by keyIdx to value offset. The trackIdx must be the index of an Audio Track.
final func audioTrackSetKeyStream(trackIdx: Int32, keyIdx: Int32, stream: Resource?) Sets the stream of the key identified by keyIdx to value stream. The trackIdx must be the index of an Audio Track.
final func audioTrackSetUseBlend(trackIdx: Int32, enable: Bool) Sets whether the track will be blended with other animations. If true, the audio playback volume changes depending on the blend value.
final func bezierTrackGetKeyInHandle(trackIdx: Int32, keyIdx: Int32) -> Vector2 Returns the in handle of the key identified by keyIdx. The trackIdx must be the index of a Bezier Track.
final func bezierTrackGetKeyOutHandle(trackIdx: Int32, keyIdx: Int32) -> Vector2 Returns the out handle of the key identified by keyIdx. The trackIdx must be the index of a Bezier Track.
final func bezierTrackGetKeyValue(trackIdx: Int32, keyIdx: Int32) -> Double Returns the value of the key identified by keyIdx. The trackIdx must be the index of a Bezier Track.
final func bezierTrackInsertKey(trackIdx: Int32, time: Double, value: Double, inHandle: Vector2 = Vector2 (x: 0, y: 0), outHandle: Vector2 = Vector2 (x: 0, y: 0)) -> Int32 Inserts a Bezier Track key at the given time in seconds. The trackIdx must be the index of a Bezier Track.
final func bezierTrackInterpolate(trackIdx: Int32, time: Double) -> Double Returns the interpolated value at the given time (in seconds). The trackIdx must be the index of a Bezier Track.
final func bezierTrackSetKeyInHandle(trackIdx: Int32, keyIdx: Int32, inHandle: Vector2, balancedValueTimeRatio: Double = 1.0) Sets the in handle of the key identified by keyIdx to value inHandle. The trackIdx must be the index of a Bezier Track.
final func bezierTrackSetKeyOutHandle(trackIdx: Int32, keyIdx: Int32, outHandle: Vector2, balancedValueTimeRatio: Double = 1.0) Sets the out handle of the key identified by keyIdx to value outHandle. The trackIdx must be the index of a Bezier Track.
final func bezierTrackSetKeyValue(trackIdx: Int32, keyIdx: Int32, value: Double) Sets the value of the key identified by keyIdx to the given value. The trackIdx must be the index of a Bezier Track.
final func blendShapeTrackInsertKey(trackIdx: Int32, time: Double, amount: Double) -> Int32 Inserts a key in a given blend shape track. Returns the key index.
final func blendShapeTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Double Returns the interpolated blend shape value at the given time (in seconds). The trackIdx must be the index of a blend shape track.
final func clear() Clear the animation (clear all tracks and reset all).
final func compress(pageSize: UInt32 = 8192, fps: UInt32 = 120, splitTolerance: Double = 4.0) Compress the animation and all its tracks in-place. This will make trackIsCompressed(trackIdx:) return true once called on this Animation. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions.
final func copyTrack(trackIdx: Int32, toAnimation: Animation?) Adds a new track to toAnimation that is a copy of the given track from this animation.
final func findTrack(path: NodePath, type: Animation.TrackType) -> Int32 Returns the index of the specified track. If the track is not found, return -1.
final func getTrackCount() -> Int32 Returns the amount of tracks in the animation.
final func isCaptureIncluded() -> Bool final func methodTrackGetName(trackIdx: Int32, keyIdx: Int32) -> StringName Returns the method name of a method track.
final func methodTrackGetParams(trackIdx: Int32, keyIdx: Int32) -> GArray Returns the arguments values to be called on a method track for a given key in a given track.
final func positionTrackInsertKey(trackIdx: Int32, time: Double, position: Vector3) -> Int32 Inserts a key in a given 3D position track. Returns the key index.
final func positionTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Vector3 Returns the interpolated position value at the given time (in seconds). The trackIdx must be the index of a 3D position track.
final func removeTrack(trackIdx: Int32) Removes a track by specifying the track index.
final func rotationTrackInsertKey(trackIdx: Int32, time: Double, rotation: Quaternion) -> Int32 Inserts a key in a given 3D rotation track. Returns the key index.
final func rotationTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Quaternion Returns the interpolated rotation value at the given time (in seconds). The trackIdx must be the index of a 3D rotation track.
final func scaleTrackInsertKey(trackIdx: Int32, time: Double, scale: Vector3) -> Int32 Inserts a key in a given 3D scale track. Returns the key index.
final func scaleTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Vector3 Returns the interpolated scale value at the given time (in seconds). The trackIdx must be the index of a 3D scale track.
final func trackFindKey(trackIdx: Int32, time: Double, findMode: Animation.FindMode = .nearest, limit: Bool = false, backward: Bool = false) -> Int32 Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given.
final func trackGetInterpolationLoopWrap(trackIdx: Int32) -> Bool Returns true if the track at trackIdx wraps the interpolation loop. New tracks wrap the interpolation loop by default.
final func trackGetInterpolationType(trackIdx: Int32) -> Animation.InterpolationType Returns the interpolation type of a given track.
final func trackGetKeyCount(trackIdx: Int32) -> Int32 Returns the number of keys in a given track.
final func trackGetKeyTime(trackIdx: Int32, keyIdx: Int32) -> Double Returns the time at which the key is located.
final func trackGetKeyTransition(trackIdx: Int32, keyIdx: Int32) -> Double Returns the transition curve (easing) for a specific key (see the built-in math function @GlobalScope.ease).
final func trackGetKeyValue(trackIdx: Int32, keyIdx: Int32) -> Variant Returns the value of a given key in a given track.
final func trackGetPath(trackIdx: Int32) -> NodePath Gets the path of a track. For more information on the path format, see trackSetPath(trackIdx:path:).
final func trackGetType(trackIdx: Int32) -> Animation.TrackType Gets the type of a track.
final func trackInsertKey(trackIdx: Int32, time: Double, key: Variant, transition: Double = 1) -> Int32 Inserts a generic key in a given track. Returns the key index.
final func trackIsCompressed(trackIdx: Int32) -> Bool Returns true if the track is compressed, false otherwise. See also compress(pageSize:fps:splitTolerance:).
final func trackIsEnabled(trackIdx: Int32) -> Bool Returns true if the track at index trackIdx is enabled.
final func trackIsImported(trackIdx: Int32) -> Bool Returns true if the given track is imported. Else, return false.
final func trackMoveDown(trackIdx: Int32) Moves a track down.
final func trackMoveTo(trackIdx: Int32, toIdx: Int32) Changes the index position of track trackIdx to the one defined in toIdx.
final func trackMoveUp(trackIdx: Int32) Moves a track up.
final func trackRemoveKey(trackIdx: Int32, keyIdx: Int32) Removes a key by index in a given track.
final func trackRemoveKeyAtTime(trackIdx: Int32, time: Double) Removes a key at time in a given track.
final func trackSetEnabled(trackIdx: Int32, enabled: Bool) Enables/disables the given track. Tracks are enabled by default.
final func trackSetImported(trackIdx: Int32, imported: Bool) Sets the given track as imported or not.
final func trackSetInterpolationLoopWrap(trackIdx: Int32, interpolation: Bool) If true, the track at trackIdx wraps the interpolation loop.
final func trackSetInterpolationType(trackIdx: Int32, interpolation: Animation.InterpolationType) Sets the interpolation type of a given track.
final func trackSetKeyTime(trackIdx: Int32, keyIdx: Int32, time: Double) Sets the time of an existing key.
final func trackSetKeyTransition(trackIdx: Int32, keyIdx: Int32, transition: Double) Sets the transition curve (easing) for a specific key (see the built-in math function @GlobalScope.ease).
final func trackSetKeyValue(trackIdx: Int32, key: Int32, value: Variant) Sets the value of an existing key.
final func trackSetPath(trackIdx: Int32, path: NodePath) Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":".
final func trackSwap(trackIdx: Int32, withIdx: Int32) Swaps the track trackIdx’s index position with the track withIdx.
final func valueTrackGetUpdateMode(trackIdx: Int32) -> Animation.UpdateMode Returns the update mode of a value track.
final func valueTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Variant Returns the interpolated value at the given time (in seconds). The trackIdx must be the index of a value track.
final func valueTrackSetUpdateMode(trackIdx: Int32, mode: Animation.UpdateMode) Sets the update mode (see UpdateMode) of a value track.
enum FindModeenum InterpolationTypeenum LoopModeenum LoopedFlagenum TrackTypeprotocol CaseIterableA type that provides a collection of all of its values.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
init?(rawValue: Int64) var debugDescription: String { get }A textual representation of this instance, suitable for debugging
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)