One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

BlendTreeSourceNode

struct · iOS 15.0+ · SDK 27.1

struct BlendTreeSourceNode

A 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. } } } ```

Members (7)

get · iOS 15.0+

name

TypeScript
get name(): string
Swift declaration
var name: String

A textual name for the blend node.

set · iOS 15.0+

name

TypeScript
set name(value: string)
Swift declaration
var name: String

A textual name for the blend node.

init · iOS 15.0+

init

TypeScript
static init(source: SDKHandle, name?: string, weight?: BlendWeight): BlendTreeSourceNode
Swift declaration
init(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 · iOS 15.0+

source

TypeScript
get source(): (SDKHandle) | null
Swift declaration
var source: (any AnimationDefinition)?

The blend node's animation.

set · iOS 15.0+

source

TypeScript
set source(value: (SDKHandle) | null)
Swift declaration
var source: (any AnimationDefinition)?

The blend node's animation.

get · iOS 15.0+

weight

TypeScript
get weight(): BlendWeight
Swift declaration
var weight: BlendWeight

A normalized percentage that designates how much effect this node has compared to peer nodes.

set · iOS 15.0+

weight

TypeScript
set weight(value: BlendWeight)
Swift declaration
var weight: BlendWeight

A normalized percentage that designates how much effect this node has compared to peer nodes.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →