updateMorphTargets method
void
updateMorphTargets()
Implementation
void updateMorphTargets() {
var geometry = this.geometry;
if (geometry is BufferGeometry) {
var morphAttributes = geometry.morphAttributes;
var keys = morphAttributes.keys.toList();
if (keys.isNotEmpty) {
var morphAttribute = morphAttributes[keys[0]];
if (morphAttribute != null) {
morphTargetInfluences = [];
morphTargetDictionary = {};
for (var 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.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.');
// }
// }
}