Contents

SkeletonResource

Represents a skeleton asset with joint hierarchy and animation capabilities.

Declaration

final class SkeletonResource

Overview

SkeletonResource is the single type for defining and using skeletons. It encapsulates the joint hierarchy together with additional animation-related skeletal data into one self-contained, immutable animation resource.

Basic Usage

Create a skeleton resource with joints and (optionally) animation-evaluation data:

typealias Joint = SkeletonResource.Joint
let skeleton = try SkeletonResource(
    named: "Character",
    rootJoint: try Joint("Root") {
        try Joint("Spine")
    },
    animationEvaluation: .init(
        ikResources: [ikResource1, ikResource2],
        blendMasks: blendMasks
    )
)

Topics

Creating a skeleton resource

Defining the joint hierarchy

Configuring animation evaluation

Initializers

Instance Properties

See Also

Skeletons and retargeting