remove superseded cruft from MacOS plugin

This commit is contained in:
Nick Fisher
2023-09-29 18:40:29 +08:00
parent 4b19632129
commit 99484d6838
4 changed files with 21 additions and 79 deletions

View File

@@ -34,7 +34,7 @@ abstract class FilamentController {
/// If you need to wait until a FilamentViewer has been created, [await] the [isReadyForScene] Future.
///
Future createViewer(int width, int height);
Future resize(int width, int height, {double contentScaleFactor = 1.0});
Future resize(int width, int height, {double scaleFactor = 1.0});
Future clearBackgroundImage();
Future setBackgroundImage(String path, {bool fillHeight = false});

View File

@@ -145,13 +145,16 @@ class FilamentControllerFFI extends FilamentController {
_isReadyForScene.complete(true);
}
Future resize(int width, int height,
{double contentScaleFactor = 1.0}) async {
Future resize(int width, int height, {double scaleFactor = 1.0}) async {
_resizing = true;
_textureId = await _channel.invokeMethod("resize",
[width * _pixelRatio, height * _pixelRatio, contentScaleFactor]);
setRendering(false);
_textureId = await _channel.invokeMethod(
"resize", [width * _pixelRatio, height * _pixelRatio, scaleFactor]);
_textureIdController.add(_textureId);
_lib.update_viewport_and_camera_projection_ffi(
_viewer!, width, height, scaleFactor);
_resizing = false;
setRendering(true);
}
Future clearBackgroundImage() async {

View File

@@ -109,11 +109,10 @@ class FilamentControllerMethodChannel extends FilamentController {
bool _resizing = false;
Future resize(int width, int height,
{double contentScaleFactor = 1.0}) async {
Future resize(int width, int height, {double scaleFactor = 1.0}) async {
_resizing = true;
_textureId = await _channel.invokeMethod("resize",
[width * _pixelRatio, height * _pixelRatio, contentScaleFactor]);
_textureId = await _channel.invokeMethod(
"resize", [width * _pixelRatio, height * _pixelRatio, scaleFactor]);
_textureIdController.add(_textureId);
_resizing = false;
}