AnimationNodeBlendSpace1D
A set of AnimationRootNode
s placed on a virtual axis, crossfading between the two adjacent ones. Used by AnimationTree
.
class AnimationNodeBlendSpace1D
A resource used by AnimationNodeBlendTree
.
AnimationNodeBlendSpace1D
represents a virtual axis on which any type of AnimationRootNode
s can be added using addBlendPoint(node:pos:atIndex:)
. Outputs the linear blend of the two AnimationRootNode
s adjacent to the current value.
You can set the extents of the axis with minSpace
and maxSpace
.
Superclasses
class AnimationRootNode
Base class for
AnimationNode
s that hold one or multiple composite animations. Usually used fortreeRoot
.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
var blendMode: AnimationNodeBlendSpace1D.BlendMode
Controls the interpolation between animations. See
BlendMode
constants.var maxSpace: Double
The blend space’s axis’s upper limit for the points’ position. See
addBlendPoint(node:pos:atIndex:)
.var minSpace: Double
The blend space’s axis’s lower limit for the points’ position. See
addBlendPoint(node:pos:atIndex:)
.var snap: Double
Position increment to snap to when moving a point on the axis.
var sync: Bool
If
false
, the blended animations’ frame are stopped when the blend value is0
.var valueLabel: String
Label of the virtual axis of the blend space.
func addBlendPoint(node: AnimationRootNode?, pos: Double, atIndex: Int32
) Adds a new point that represents a
node
on the virtual axis at a given position set bypos
. You can insert it at a specific index using theatIndex
argument. If you use the default value foratIndex
, the point is inserted at the end of the blend points array.func getBlendPointCount(
) -> Int32 Returns the number of points on the blend axis.
func getBlendPointNode(point: Int32
) -> AnimationRootNode? Returns the
AnimationNode
referenced by the point at indexpoint
.func getBlendPointPosition(point: Int32
) -> Double Returns the position of the point at index
point
.func removeBlendPoint(Int32
) Removes the point at index
point
from the blend axis.func setBlendPointNode(point: Int32, node: AnimationRootNode?
) Changes the
AnimationNode
referenced by the point at indexpoint
.func setBlendPointPosition(point: Int32, pos: Double
) Updates the position of the point at index
point
on the blend axis.