---
title: JointTransforms
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/jointtransforms
---

# JointTransforms

A set of animatable transform values for joints that collectively represent a single skeletal pose.

## Declaration

```swift
struct JointTransforms
```

## Overview

Overview This structure provides a template that informs an animation on how to animate a character. The resulting movement bases on the from (fromValue) , to (toValue) , or by values (byValue) you supply for a FromToByAnimation. The animation determines which joints take on the movement through its jointNames property. Animate an Entity’s Skeleton The following code moves the joints of a 3D asset by specifying the joint, joint1, beginning, and ending values. // Define the joint's pose at the start of the animation. let fromTransforms: [Transform] = [Transform(scale: SIMD3<Float>(1, 2, 3), rotation: simd_quatf(ix: 5.0, iy: 6.0, iz: 7.0, r: 8.0), translation: SIMD3<Float>(10, 20, 30))] let fromPose = JointTransforms(fromTransforms)

// Define the joint's pose at the end of the animation. let toTransforms: [Transform] = [Transform(scale: SIMD3<Float>(10, 20, 30), rotation: simd_quatf(ix: 50.0, iy: 60.0, iz: 70.0, r: 80.0), translation: SIMD3<Float>(100, 200, 300)) ] let toPose = JointTransforms(toTransforms)

// Indicate that the animation applies to the joint named 'joint1'. let jointNames = ["joint1"]

// Configure the animation specifics. var fromToBy = FromToByAnimation<JointTransforms>() fromToBy.name = "anim" fromToBy.blendLayer = 100 fromToBy.duration = 10.0 fromToBy.fillMode = .forwards fromToBy.jointNames = jointNames fromToBy.fromValue = fromPose fromToBy.toValue = toPose fromToBy.bindTarget = .transform

// Generate a resource from the animation. let animationResource = fromToBy.create() To run the animation on an entity and animate the joints, call playAnimation(_:transitionDuration:startsPaused:). Optionally, you can control the animation’s playback by storing the returned controller object. // Play the animation on an entity. let entity = AnchorEntity(...) let controller = entity.playAnimation(animationResource)

// Optionally control playback using the returned controller. controller.pause()

## Topics

### Creating joint transforms

- [init()](realitykit/jointtransforms/init().md)
- [init(_:)](realitykit/jointtransforms/init(_:).md)
- [init(arrayLiteral:)](realitykit/jointtransforms/init(arrayliteral:).md)

### Identifying joint transforms

- [JointTransforms.Index](realitykit/jointtransforms/index.md)

### Inspecting joint transform details

- [startIndex](realitykit/jointtransforms/startindex.md)
- [endIndex](realitykit/jointtransforms/endindex.md)

### Accessing joint transforms

- [subscript(_:)](realitykit/jointtransforms/subscript(_:).md)
- [index(after:)](realitykit/jointtransforms/index(after:).md)
- [index(before:)](realitykit/jointtransforms/index(before:).md)

### Operators

- [==(_:_:)](realitykit/jointtransforms/==(_:_:).md)

### Type Aliases

- [JointTransforms.ArrayLiteralElement](realitykit/jointtransforms/arrayliteralelement.md)
- [JointTransforms.Element](realitykit/jointtransforms/element.md)

## Relationships

### Conforms To

- [AnimatableData](realitykit/animatabledata.md)
- [BidirectionalCollection](swift/bidirectionalcollection.md)
- [Collection](swift/collection.md)
- [Copyable](swift/copyable.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [MutableCollection](swift/mutablecollection.md)
- [Sequence](swift/sequence.md)
