add getAnimationDuration method

This commit is contained in:
Nick Fisher
2023-08-08 14:34:15 +08:00
parent fb53881183
commit fa8c6b1ca0
6 changed files with 40 additions and 4 deletions

View File

@@ -246,6 +246,13 @@ class FilamentController {
return names.cast<String>();
}
Future<double> getAnimationDuration(
FilamentEntity asset, int animationIndex) async {
var duration = await _channel.invokeMethod(
"getAnimationDuration", [_assetManager, asset, animationIndex]);
return duration as double;
}
///
/// Animates morph target weights/bone transforms (where each frame requires a duration of [frameLengthInMs].
/// [morphWeights] is a list of doubles in frame-major format.