init
TypeScriptstatic init(weightsMapping: BlendShapeWeightsMapping): BlendShapeWeightsComponentSwift declarationinit(weightsMapping: BlendShapeWeightsMapping)Create a BlendShapeWeightsComponent from a BlendShapeWeightsMapping.
struct · iOS 18.0+ · SDK 27.1
struct BlendShapeWeightsComponentA 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 ```
static init(weightsMapping: BlendShapeWeightsMapping): BlendShapeWeightsComponentSwift declarationinit(weightsMapping: BlendShapeWeightsMapping)Create a BlendShapeWeightsComponent from a BlendShapeWeightsMapping.
get weightSet(): BlendShapeWeightsSetSwift declarationvar 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 weightSet(value: BlendShapeWeightsSet)Swift declarationvar 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.
No declarations were skipped in this snapshot.