setMorphWeights method

void setMorphWeights(
  1. List<double> values
)

Replaces morph weights on this node instance, in target order. Entries beyond the mesh's target count are ignored; missing trailing entries keep their current value.

Implementation

void setMorphWeights(List<double> values) {
  final live = internalMorphWeights;
  if (live == null) {
    throw StateError("This node's mesh has no morph targets");
  }
  for (var i = 0; i < values.length && i < live.length; i++) {
    live[i] = values[i];
  }
}