You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import'dart:js_interop';
import'package:web/web.dart'hide WEBGL_compressed_texture_astc;
// Proper type for WEBGL_debug_renderer_info extension// Note that the getters are not marked as `static`, because there is no global `WebGLDebugRendererInfo` object,// nor is there one named `WEBGL_debug_renderer_info`.extension typeWebGLDebugRendererInfo._(JSObject _) implementsJSObject {
externalintgetUNMASKED_RENDERER_WEBGL;
externalintgetUNMASKED_VENDOR_WEBGL;
}
voidmain() {
final canvas =HTMLCanvasElement();
final renderingContext = canvas.getContext('webgl')!asWebGLRenderingContext;
final ext = renderingContext.getExtension('WEBGL_debug_renderer_info') asWebGLDebugRendererInfo?;
print(ext?.UNMASKED_RENDERER_WEBGL); // prints 37446 (0x9246)print(WEBGL_debug_renderer_info.UNMASKED_RENDERER_WEBGL); // throws JavaScript TypeError
}
The text was updated successfully, but these errors were encountered:
As the title states. Example:
The text was updated successfully, but these errors were encountered: