123456789101112131415161718192021222324252627 |
- ( function () {
- class WebGPU {
- static isAvailable() {
- return navigator.gpu !== undefined;
- }
- static getErrorMessage() {
- const message = 'Your browser does not support <a href="https://gpuweb.github.io/gpuweb/" style="color:blue">WebGPU</a>';
- const element = document.createElement('div');
- element.id = 'webgpumessage';
- element.style.fontFamily = 'monospace';
- element.style.fontSize = '13px';
- element.style.fontWeight = 'normal';
- element.style.textAlign = 'center';
- element.style.background = '#fff';
- element.style.color = '#000';
- element.style.padding = '1.5em';
- element.style.width = '400px';
- element.style.margin = '5em auto 0';
- element.innerHTML = message;
- return element;
- }
- }
- THREE.WebGPU as default = WebGPU as default;
- } )();
|