addMorphTargets method
dynamic
addMorphTargets(
- dynamic parentGeo,
- dynamic parentGeoNode,
- dynamic morphTargets,
- dynamic preTransform,
Implementation
addMorphTargets(parentGeo, parentGeoNode, morphTargets, preTransform) {
if (morphTargets.length == 0) return;
parentGeo.morphTargetsRelative = true;
parentGeo.morphAttributes.position = [];
// parentGeo.morphAttributes.normal = []; // not implemented
var scope = this;
morphTargets.forEach((morphTarget) {
morphTarget.rawTargets.forEach((rawTarget) {
var morphGeoNode = fbxTree.Objects["Geometry"][rawTarget.geoID];
if (morphGeoNode != null) {
scope.genMorphGeometry(parentGeo, parentGeoNode, morphGeoNode,
preTransform, rawTarget.name);
}
});
});
}