more Linux plugin work, separate out MorphAnimation and require entity name

This commit is contained in:
Nick Fisher
2023-02-14 16:11:21 +08:00
parent d3fd6e592d
commit 494d2bad43
12 changed files with 172 additions and 106 deletions

View File

@@ -15,7 +15,7 @@ class AnimationBuilder {
List<BoneAnimation>? _boneAnimations = null;
Animation build() {
Animation build(String meshName, List<String> morphNames) {
if (_numMorphWeights == 0 || _duration == 0 || _frameLengthInMs == 0)
throw Exception();
@@ -36,8 +36,11 @@ class AnimationBuilder {
}
}
return Animation(morphData, _numMorphWeights, _boneAnimations, numFrames,
_frameLengthInMs);
var morphAnimation =
MorphAnimation(meshName, morphData, morphNames, _frameLengthInMs);
return Animation(
morphAnimation: morphAnimation, boneAnimations: _boneAnimations);
}
AnimationBuilder setFramerate(int framerate) {