Currently, calling FlutterAngleTexture.resize() to resize the texture does not work on the web, apparantly because the surfaceID is not recognized as a HTMLCanvasElement. Here is the current code in lib/webgl/angle.dart
Future resize(FlutterAngleTexture texture, AngleOptions options) async {
texture.surfaceId?.width = (options.width * options.dpr).toInt();
texture.surfaceId?.height = (options.height * options.dpr).toInt();
}
Something like this seems to work:
Future resize(FlutterAngleTexture texture, AngleOptions options) async{
final element = surfaceID as html.HTMLCanvasElement;
element.width = (options.width * options.dpr).toInt();
element.height = (options.height * options.dpr).toInt();
}
Currently, calling FlutterAngleTexture.resize() to resize the texture does not work on the web, apparantly because the surfaceID is not recognized as a HTMLCanvasElement. Here is the current code in lib/webgl/angle.dart
Future resize(FlutterAngleTexture texture, AngleOptions options) async {
texture.surfaceId?.width = (options.width * options.dpr).toInt();
texture.surfaceId?.height = (options.height * options.dpr).toInt();
}
Something like this seems to work:
Future resize(FlutterAngleTexture texture, AngleOptions options) async{
final element = surfaceID as html.HTMLCanvasElement;
element.width = (options.width * options.dpr).toInt();
element.height = (options.height * options.dpr).toInt();
}