add frame length check
This commit is contained in:
1 parent
d963984944
commit
0c9a079298
1 file changed
+5
-1
@@ -15,7 +15,11 @@ class Animation {
|
||||
final Float32List? boneTransforms;
|
||||
|
||||
Animation(this.morphData, this.numMorphWeights, this.boneTransforms,
|
||||
this.boneNames, this.meshNames, this.numFrames, this.frameLengthInMs);
|
||||
this.boneNames, this.meshNames, this.numFrames, this.frameLengthInMs) {
|
||||
if (morphData != null && morphData!.length != numFrames * numMorphWeights) {
|
||||
throw Exception("Mismatched animation data with frame length");
|
||||
}
|
||||
}
|
||||
|
||||
Animation.from(
|
||||
{required List<List<double>> morphData,
|
||||
|
||||
Reference in new issue
Block a user