iswebasm () {
var useWasm = false;
if(typeof WebAssembly == ‘undefined’) {
console.error(‘未找到WebAssembly NameSpace’);
return useWasm;
}
var webAsmObj = window[“WebAssembly”];
if (typeof webAsmObj === “object”) {
if (typeof webAsmObj[“Memory”] === “function”)
{
if ((typeof webAsmObj[“instantiateStreaming”] === “function”) || (typeof webAsmObj[“instantiate”] === “function”))
useWasm = true;
}
}
return useWasm;
}