rename some fields in MorphAnimationData
This commit is contained in:
@@ -8,24 +8,24 @@ import 'dart:typed_data';
|
||||
|
||||
class MorphAnimationData {
|
||||
final String meshName;
|
||||
final List<String> morphNames;
|
||||
final List<int> morphIndices;
|
||||
final List<String> animatedMorphNames;
|
||||
final List<int> animatedMorphIndices;
|
||||
|
||||
final List<double> data;
|
||||
|
||||
MorphAnimationData(this.meshName, this.data, this.morphNames,
|
||||
this.morphIndices, this.frameLengthInMs) {
|
||||
assert(data.length == morphNames.length * numFrames);
|
||||
MorphAnimationData(this.meshName, this.data, this.animatedMorphNames,
|
||||
this.animatedMorphIndices, this.frameLengthInMs) {
|
||||
assert(data.length == animatedMorphNames.length * numFrames);
|
||||
}
|
||||
|
||||
int get numMorphTargets => morphNames.length;
|
||||
int get numMorphTargets => animatedMorphNames.length;
|
||||
|
||||
int get numFrames => data.length ~/ numMorphTargets;
|
||||
|
||||
final double frameLengthInMs;
|
||||
|
||||
Iterable<double> getData(String morphName) sync* {
|
||||
int index = morphNames.indexOf(morphName);
|
||||
int index = animatedMorphNames.indexOf(morphName);
|
||||
for (int i = 0; i < numFrames; i++) {
|
||||
yield data[(i * numMorphTargets) + index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user