()
| 39 | } |
| 40 | |
| 41 | static setupFeatureChecks() { |
| 42 | if (typeof document !== 'undefined') { |
| 43 | testCanvas = document.createElement('canvas'); |
| 44 | } else if (typeof OffscreenCanvas !== 'undefined') { |
| 45 | testCanvas = new OffscreenCanvas(0, 0); |
| 46 | } |
| 47 | if (!testCanvas) return; |
| 48 | testContext = testCanvas.getContext('webgl2'); |
| 49 | if (!testContext || !testContext.getExtension) return; |
| 50 | testExtensions = { |
| 51 | EXT_color_buffer_float: testContext.getExtension('EXT_color_buffer_float'), |
| 52 | OES_texture_float_linear: testContext.getExtension('OES_texture_float_linear'), |
| 53 | }; |
| 54 | features = this.getFeatures(); |
| 55 | } |
| 56 | |
| 57 | static isContextMatch(context) { |
| 58 | // from global |
no test coverage detected