Describes a single blend mask for selective animation control.
Blend masks enable selective application of animations by defining per-joint weights.
They allow fine-grained control over which parts of a skeleton are affected by specific
animations, enabling layered animation systems and partial poses.
```swift
typealias BlendMask = SkeletonResource.BlendMask
// Create blend masks for different body regions
// Joints not listed default to weight 1.0 (full animation effect)
let armOnlyMask = BlendMask(
name: "armOnly",
jointWeights: ["shoulder": 0.0] // Only affect upperArm, forearm, hand
)
let handOnlyMask = BlendMask(
name: "handOnly",
jointWeights: ["shoulder": 0.0, "upperArm": 0.0, "forearm": 0.0] // Only affect hand
)
```
Members (5)
get · iOS 27.0+
jointWeights
TypeScript
get jointWeights(): Record<string, number>
Swift declaration
var jointWeights: [String : Float]
Dictionary of joint weights keyed by joint name.
Each weight corresponds to a joint in the skeleton, controlling how much
that joint is affected by animations using this mask. Values range from 0.0 (no effect)
to 1.0 (full effect). Joints not present in the dictionary are treated as having weight 1.0 (full animation effect).
set · iOS 27.0+
jointWeights
TypeScript
set jointWeights(value: Record<string, number>)
Swift declaration
var jointWeights: [String : Float]
Dictionary of joint weights keyed by joint name.
Each weight corresponds to a joint in the skeleton, controlling how much
that joint is affected by animations using this mask. Values range from 0.0 (no effect)
to 1.0 (full effect). Joints not present in the dictionary are treated as having weight 1.0 (full animation effect).
get · iOS 27.0+
id
TypeScript
get id(): string
Swift declaration
var id: String { get }
The identifier of the blend mask, derived from its name.
Creates a blend mask with the specified parameters.
- Parameters:
- name: The unique name of the blend mask within the skeleton
- jointWeights: Dictionary of joint weights keyed by joint name (0-1 range). Joints not in dictionary default to 1.0 (full animation effect).
get · iOS 27.0+
name
TypeScript
get name(): string
Swift declaration
let name: String
The name of the blend mask. Must be unique within the skeleton.
Used to identify and reference specific masks within animation systems.