Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
BlendMode
AnimationNodeBlendSpace2D.swift:23enum BlendMode
Cases
case interpolated
The interpolation between animations is linear.
case discrete
The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.
case discreteCarry
Similar to .discrete, but starts the new animation at the last animation’s playback position.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (21) members.
Type members
Instance members
var autoTriangles: Bool
If
true
, the blend space is triangulated automatically. The mesh updates every time you add or remove points withaddBlendPoint(node:pos:atIndex:)
andremoveBlendPoint(_:)
.var blendMode: AnimationNodeBlendSpace2D.BlendMode
Controls the interpolation between animations. See
BlendMode
constants.var maxSpace: Vector2
The blend space’s X and Y axes’ upper limit for the points’ position. See
addBlendPoint(node:pos:atIndex:)
.var minSpace: Vector2
The blend space’s X and Y axes’ lower limit for the points’ position. See
addBlendPoint(node:pos:atIndex:)
.var snap: Vector2
Position increment to snap to when moving a point.
var sync: Bool
If
false
, the blended animations’ frame are stopped when the blend value is0
.var trianglesUpdated: SimpleSignal
Emitted every time the blend space’s triangles are created, removed, or when one of their vertices changes position.
var xLabel: String
Name of the blend space’s X axis.
var yLabel: String
Name of the blend space’s Y axis.
func addBlendPoint(node: AnimationRootNode?, pos: Vector2, atIndex: Int32
) Adds a new point that represents a
node
at the 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 addTriangle(x: Int32, y: Int32, z: Int32, atIndex: Int32
) Creates a new triangle using three points
x
,y
, andz
. Triangles can overlap. You can insert the triangle 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 in the blend space.
func getBlendPointNode(point: Int32
) -> AnimationRootNode? Returns the
AnimationRootNode
referenced by the point at indexpoint
.func getBlendPointPosition(point: Int32
) -> Vector2 Returns the position of the point at index
point
.func getTriangleCount(
) -> Int32 Returns the number of triangles in the blend space.
func getTrianglePoint(triangle: Int32, point: Int32
) -> Int32 Returns the position of the point at index
point
in the triangle of indextriangle
.func removeBlendPoint(Int32
) Removes the point at index
point
from the blend space.func removeTriangle(Int32
) Removes the triangle at index
triangle
from the blend space.func setBlendPointNode(point: Int32, node: AnimationRootNode?
) Changes the
AnimationNode
referenced by the point at indexpoint
.func setBlendPointPosition(point: Int32, pos: Vector2
) Updates the position of the point at index
point
on the blend axis.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
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 RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.