One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

BlendShapeWeightsComponent

struct · iOS 18.0+ · SDK 27.1

struct BlendShapeWeightsComponent

A component that provides access to the current weights associated with all blend shape meshes on an entity. You can access the weights associated with an entity's blend shapes by using the ``weightSet`` variable after an initialized `BlendShapeWeightsComponent` is added to an entity. ```swift let blendShapeWeightsComponent = BlendShapeWeightsComponent( weightsMapping: weightsMapping) entity.components.set(blendShapeWeightsComponent) let weightValues = BlendShapeWeights([0.3, 0.8]) entity.components[BlendShapeWeightsComponent.self]!.weightSets[0].weights = weightValues ```

Members (3)

init · iOS 18.0+

init

TypeScript
static init(weightsMapping: BlendShapeWeightsMapping): BlendShapeWeightsComponent
Swift declaration
init(weightsMapping: BlendShapeWeightsMapping)

Create a BlendShapeWeightsComponent from a BlendShapeWeightsMapping.

get · iOS 18.0+

weightSet

TypeScript
get weightSet(): BlendShapeWeightsSet
Swift declaration
var weightSet: BlendShapeWeightsSet { get set }

The runtime named blend shapes weights. Initialize the `weightSet` variable using the ``BlendShapeWeightsSet/init()`` function. The `weightSet` variable has the following limitations as to how it can be set: * If `weightSet` is assigned to a new ``BlendShapeWeightsSet``, then the new set have the same number of weights and weight names as the current variable. Additionally, make sure the weight names exactly match the current set's weight names. * Weight name changes are ignored. * Setting an incorrect number of weight values are ignored. * Blend shape name changes are ignored.

set · iOS 18.0+

weightSet

TypeScript
set weightSet(value: BlendShapeWeightsSet)
Swift declaration
var weightSet: BlendShapeWeightsSet { get set }

The runtime named blend shapes weights. Initialize the `weightSet` variable using the ``BlendShapeWeightsSet/init()`` function. The `weightSet` variable has the following limitations as to how it can be set: * If `weightSet` is assigned to a new ``BlendShapeWeightsSet``, then the new set have the same number of weights and weight names as the current variable. Additionally, make sure the weight names exactly match the current set's weight names. * Weight name changes are ignored. * Setting an incorrect number of weight values are ignored. * Blend shape name changes are ignored.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →