expose setToneMapping method
This commit is contained in:
@@ -13,6 +13,8 @@ typedef AssetManager = int;
|
||||
typedef FilamentEntity = int;
|
||||
const FilamentEntity FILAMENT_ASSET_ERROR = 0;
|
||||
|
||||
enum ToneMapper { ACES, FILMIC, LINEAR }
|
||||
|
||||
class FilamentController {
|
||||
late MethodChannel _channel = MethodChannel("app.polyvox.filament/event");
|
||||
|
||||
@@ -358,6 +360,12 @@ class FilamentController {
|
||||
}
|
||||
}
|
||||
|
||||
void setToneMapping(ToneMapper mapper) async {
|
||||
if (!await _channel.invokeMethod("setToneMapping", mapper.index)) {
|
||||
throw Exception("Failed to set tone mapper");
|
||||
}
|
||||
}
|
||||
|
||||
void setCameraFocalLength(double focalLength) async {
|
||||
await _channel.invokeMethod("setCameraFocalLength", focalLength);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user