diff --git a/lib/animations/morph_animation_data.dart b/lib/animations/morph_animation_data.dart index 30eb0320..00973885 100644 --- a/lib/animations/morph_animation_data.dart +++ b/lib/animations/morph_animation_data.dart @@ -8,24 +8,24 @@ import 'dart:typed_data'; class MorphAnimationData { final String meshName; - final List morphNames; - final List morphIndices; + final List animatedMorphNames; + final List animatedMorphIndices; final List 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 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]; }