enable camera rotate

This commit is contained in:
Nick Fisher
2021-09-18 09:27:41 +08:00
parent 76f25ae7d5
commit 29008993d3
3 changed files with 55 additions and 13 deletions

View File

@@ -10,6 +10,9 @@ abstract class FilamentController {
Future panStart(double x, double y);
Future panUpdate(double x, double y);
Future panEnd();
Future rotateStart(double x, double y);
Future rotateUpdate(double x, double y);
Future rotateEnd();
Future applyWeights(List<double> weights, int primitiveIndex);
Future createMorpher(String meshName, String entityName,
{String? materialName});
@@ -58,6 +61,18 @@ class MimeticFilamentController extends FilamentController {
await _channel.invokeMethod("panEnd");
}
Future rotateStart(double x, double y) async {
await _channel.invokeMethod("rotateStart", [x.toInt(), y.toInt()]);
}
Future rotateUpdate(double x, double y) async {
await _channel.invokeMethod("rotateUpdate", [x.toInt(), y.toInt()]);
}
Future rotateEnd() async {
await _channel.invokeMethod("rotateEnd");
}
Future applyWeights(List<double> weights, int primitiveIndex) async {
await _channel.invokeMethod("applyWeights", [weights, primitiveIndex]);
}