This commit is contained in:
yiwenxue 2023-08-22 20:37:48 +08:00
parent ccb4109fa8
commit d64919f249
1 changed files with 2 additions and 3 deletions

View File

@ -4,17 +4,16 @@ var MeshoptDecoder = (function() {
"use strict"; "use strict";
var instance; var instance;
var supported; var supported = false;
var ready = (instantiateWasm = {}) => { var ready = (instantiateWasm = {}) => {
if (typeof instantiateWasm !== 'function') { if (typeof instantiateWasm !== 'function') {
supported = false;
return Promise.reject(new Error('No wasm support detected')); return Promise.reject(new Error('No wasm support detected'));
} }
return instantiateWasm().then(function(result) { return instantiateWasm().then(function(result) {
supported = true;
instance = result.instance; instance = result.instance;
instance.exports.__wasm_call_ctors(); instance.exports.__wasm_call_ctors();
}); });