Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_setupPainter() {
const attributes = extend({}, isSupported.webGLContextAttributes, {
failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat,
preserveDrawingBuffer: this._preserveDrawingBuffer,
antialias: this._antialias || false
});
const gl = this._canvas.getContext('webgl', attributes) ||
this._canvas.getContext('experimental-webgl', attributes);
if (!gl) {
this.fire(new ErrorEvent(new Error('Failed to initialize WebGL')));
return;
}
this.painter = new Painter(gl, this.transform);
webpSupported.testSupport(gl);
_setupPainter() {
const attributes = extend({}, isSupported.webGLContextAttributes, {
failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat,
preserveDrawingBuffer: this._preserveDrawingBuffer,
antialias: this._antialias || false
});
const gl = this._canvas.getContext('webgl', attributes) ||
this._canvas.getContext('experimental-webgl', attributes);
if (!gl) {
this.fire(new ErrorEvent(new Error('Failed to initialize WebGL')));
return;
}
this.painter = new Painter(gl, this.transform);
webpSupported.testSupport(gl);