One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

SkeletonResource.JointBuilder

struct · iOS 27.0+ · SDK 27.1

@resultBuilder struct JointBuilder

A result builder for declaratively constructing the children of a joint. Inside the `Joint(_:restPoseTransform:children:)` closure, you can write any mix of: - **`Joint` literals** — each becomes one child of the parent joint. ```swift try Joint("root") { try Joint("spine") try Joint("hip") } // root.children == [spine, hip] ``` - **`[Joint]` values** — each element becomes a child of the parent joint, in array order, alongside any other declarations in the same closure body. Use this when the children are produced from runtime data (e.g. mapped from a flat array) rather than spelled out as literals. ```swift let kids: [Joint] = ... try Joint("root") { kids // every element of kids becomes a child of root } ``` Both forms can be mixed freely. Each `Joint` in any array can itself be a fully built subtree.

Members (2)

static · iOS 27.0+

buildExpression

TypeScript
static buildExpression(expression: SkeletonResource_Joint): Array<SkeletonResource_Joint>
Swift declaration
static func buildExpression(_ expression: SkeletonResource.Joint) -> [SkeletonResource.Joint]

Treats a single `Joint` value in the closure body as one child of the parent.

static · iOS 27.0+

buildExpression

TypeScript
static buildExpression41642(expression: Array<SkeletonResource_Joint>): Array<SkeletonResource_Joint>
Swift declaration
static func buildExpression(_ expression: [SkeletonResource.Joint]) -> [SkeletonResource.Joint]

Treats a `[Joint]` value in the closure body as a list of children of the parent. All elements become children, in array order; they are siblings of any other joints declared in the same closure body.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SkeletonResource.JointBuilder.buildBlock(_:)

A variable number of Swift arguments is not supported.

All RealityFoundation types →