add loop option to playAnimation
This commit is contained in:
@@ -17,7 +17,7 @@ abstract class FilamentController {
|
|||||||
Future<List<String>> getTargetNames(String meshName);
|
Future<List<String>> getTargetNames(String meshName);
|
||||||
Future<List<String>> getAnimationNames();
|
Future<List<String>> getAnimationNames();
|
||||||
Future releaseSourceAssets();
|
Future releaseSourceAssets();
|
||||||
Future playAnimation(int index);
|
Future playAnimation(int index, {bool loop=false});
|
||||||
Future setCamera(String name);
|
Future setCamera(String name);
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -44,6 +44,7 @@ class PolyvoxFilamentController extends FilamentController {
|
|||||||
_id = id;
|
_id = id;
|
||||||
_channel = MethodChannel("app.polyvox.filament/filament_view_$id");
|
_channel = MethodChannel("app.polyvox.filament/filament_view_$id");
|
||||||
_channel.setMethodCallHandler((call) async {
|
_channel.setMethodCallHandler((call) async {
|
||||||
|
print("Received Filament method channel call : ${call.method}");
|
||||||
if(call.method == "ready") {
|
if(call.method == "ready") {
|
||||||
onFilamentViewCreatedHandler?.call(_id);
|
onFilamentViewCreatedHandler?.call(_id);
|
||||||
return Future.value(true);
|
return Future.value(true);
|
||||||
@@ -126,8 +127,8 @@ class PolyvoxFilamentController extends FilamentController {
|
|||||||
await _channel.invokeMethod("createMorpher", [meshName, primitives]);
|
await _channel.invokeMethod("createMorpher", [meshName, primitives]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future playAnimation(int index) async {
|
Future playAnimation(int index, {bool loop=false}) async {
|
||||||
await _channel.invokeMethod("playAnimation", index);
|
await _channel.invokeMethod("playAnimation", [index,loop]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future setCamera(String name) async {
|
Future setCamera(String name) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user