updateMorphTargets method

void updateMorphTargets()
inherited

Implementation

void updateMorphTargets() {
  var geometry = this.geometry!;

  var morphAttributes = geometry.morphAttributes;
  var keys = morphAttributes.keys.toList();

  if (keys.isNotEmpty) {
    var morphAttribute = morphAttributes[keys[0]];

    if (morphAttribute != null) {
      morphTargetInfluences = [];
      morphTargetDictionary = {};

      for (int m = 0, ml = morphAttribute.length; m < ml; m++) {
        var name = morphAttribute[m].name ?? m.toString();

        morphTargetInfluences!.add(0);
        morphTargetDictionary![name] = m;
      }
    }
  }

  // else {
  //   var morphTargets = geometry.morphTargets;

  //   if (morphTargets != null && morphTargets.length > 0) {
  //     print(
  //         'three.Line.updateMorphTargets() does not support three.Geometry. Use three.BufferGeometry instead.');
  //   }
  // }
}