name
TypeScriptget name(): stringSwift declarationvar name: StringA textual name for the blend node.
struct · iOS 15.0+ · SDK 27.1
struct BlendTreeSourceNodeA blend node that contains an animation. This structure adopts ``BlendTreeNode`` and adds the ability to store a single animation. A complete ``BlendTreeAnimation`` represents a mix of all the animations that its source nodes contain. Each source node defines a ``BlendTreeSourceNode/weight`` that determines how much effect the source's animation has in the blend tree's resulting, mixed animation. To define the source's animation, set this structure's ``BlendTreeSourceNode/source`` property. ### Access a source node of a blend tree A source may exist in any leaf-node position in the blend animation's tree. The following code checks the root node for a source. If instead the root node is a branch, the code begins checking the branches sources. ```swift // Check if the root node is a source. if let blendNode = blendTree.root as? BlendTreeSourceNode { // Found a source. // Check if the root node is a branch. } else if let source = blendTree.root as? BlendTreeBlendNode { // Check for a source in the branch's sources. if let source = blendNode.sources[0] as? BlendTreeSourceNode { // Found a source. } } } ```
get name(): stringSwift declarationvar name: StringA textual name for the blend node.
set name(value: string)Swift declarationvar name: StringA textual name for the blend node.
static init(source: SDKHandle, name?: string, weight?: BlendWeight): BlendTreeSourceNodeSwift declarationinit(source: any AnimationDefinition, name: String = "", weight: BlendWeight = .value(1.0))Creates a node that defines an animation within a tree of other blend nodes. - Parameters: - source: The blend node’s animation. - name: A textual name for the blend node. - weight: A normalized percentage that designates how much effect this node has compared to peer nodes.
get source(): (SDKHandle) | nullSwift declarationvar source: (any AnimationDefinition)?The blend node's animation.
set source(value: (SDKHandle) | null)Swift declarationvar source: (any AnimationDefinition)?The blend node's animation.
get weight(): BlendWeightSwift declarationvar weight: BlendWeightA normalized percentage that designates how much effect this node has compared to peer nodes.
set weight(value: BlendWeight)Swift declarationvar weight: BlendWeightA normalized percentage that designates how much effect this node has compared to peer nodes.
No declarations were skipped in this snapshot.