Comparing version 0.0.114 to 0.0.115
{ | ||
"name": "ogl", | ||
"version": "0.0.114", | ||
"version": "0.0.115", | ||
"description": "WebGL Library", | ||
@@ -5,0 +5,0 @@ "exports": "./src/index.mjs", |
@@ -5,4 +5,4 @@ let supportedFormat; | ||
export class BasisManager { | ||
constructor(workerSrc, canvas) { | ||
if (!supportedFormat) supportedFormat = this.getSupportedFormat(canvas); | ||
constructor(workerSrc, gl) { | ||
if (!supportedFormat) supportedFormat = this.getSupportedFormat(gl); | ||
this.onMessage = this.onMessage.bind(this); | ||
@@ -13,4 +13,3 @@ this.queue = new Map(); | ||
getSupportedFormat(canvas = document.createElement('canvas')) { | ||
const gl = canvas.getContext('webgl'); | ||
getSupportedFormat(gl = document.createElement('canvas').getContext('webgl')) { | ||
/* if (!!gl.getExtension('WEBGL_compressed_texture_etc')) { | ||
@@ -17,0 +16,0 @@ return 'etc2'; |
335502
9195