add stopAnimationByName
This commit is contained in:
@@ -365,7 +365,9 @@ abstract class FilamentController {
|
||||
|
||||
Future setAnimationFrame(
|
||||
FilamentEntity entity, int index, int animationFrame);
|
||||
|
||||
Future stopAnimation(FilamentEntity entity, int animationIndex);
|
||||
Future stopAnimationByName(FilamentEntity entity, String name);
|
||||
|
||||
///
|
||||
/// Sets the current scene camera to the glTF camera under [name] in [entity].
|
||||
|
||||
@@ -950,6 +950,12 @@ class FilamentControllerFFI extends FilamentController {
|
||||
_sceneManager!, entity, index, loop, reverse, replaceActive, crossfade);
|
||||
}
|
||||
|
||||
@override
|
||||
Future stopAnimationByName(FilamentEntity entity, String name) async {
|
||||
var animations = await getAnimationNames(entity);
|
||||
await stopAnimation(entity, animations.indexOf(name));
|
||||
}
|
||||
|
||||
@override
|
||||
Future playAnimationByName(FilamentEntity entity, String name,
|
||||
{bool loop = false,
|
||||
|
||||
Reference in New Issue
Block a user