XWWitPark/witpark_jzzs/xw_jzzs_web/public/lib/ammo/ammo.js

2 lines
1.6 MiB
JavaScript
Raw Normal View History

2024-09-12 00:10:00 +00:00
/* 2020-9-22 15:23:19 | 版权所有 军懋国兴 */
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ammo=function(e){var A;e=e||{},A=A||(void 0!==e?e:{});var t,i={};for(t in A)A.hasOwnProperty(t)&&(i[t]=A[t]);var n,_,r=!1,o=!1,s=!1,a=!1;if(A.ENVIRONMENT)if("WEB"===A.ENVIRONMENT)r=!0;else if("WORKER"===A.ENVIRONMENT)o=!0;else if("NODE"===A.ENVIRONMENT)s=!0;else{if("SHELL"!==A.ENVIRONMENT)throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");a=!0}else r="object"===("undefined"==typeof window?"undefined":_typeof(window)),o="function"==typeof importScripts,s="object"===("undefined"==typeof process?"undefined":_typeof(process))&&"function"==typeof require&&!r&&!o,a=!r&&!s&&!o;if(s)A.print||(A.print=console.log),A.printErr||(A.printErr=console.warn),A.read=function(e,t){var i=ue(e);return i||(n=n||require("fs"),e=(_=_||require("path")).normalize(e),i=n.readFileSync(e)),t?i:i.toString()},A.readBinary=function(e){return(e=A.read(e,!0)).buffer||(e=new Uint8Array(e)),l(e.buffer),e},A.thisProgram||(A.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program"),A.arguments=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof xC))throw e}),process.on("unhandledRejection",function(){process.exit(1)}),A.inspect=function(){return"[Emscripten Module object]"};else if(a)A.print||(A.print=print),"undefined"!=typeof printErr&&(A.printErr=printErr),A.read="undefined"!=typeof read?function(e){var t=ue(e);return t?pe(t):read(e)}:function(){throw"no read() available"},A.readBinary=function(e){var t;return(t=ue(e))?t:"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(l("object"===_typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?A.arguments=scriptArgs:void 0!==arguments&&(A.arguments=arguments),"function"==typeof quit&&(A.quit=function(e){quit(e)});else{if(!r&&!o)throw Error("Unknown runtime environment. Where are we?");A.read=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText}catch(e){if(t=ue(t))return pe(t);throw e}},o&&(A.readBinary=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}catch(e){if(t=ue(t))return t;throw e}}),A.readAsync=function(t,i,n){var _=new XMLHttpRequest;_.open("GET",t,!0),_.responseType="arraybuffer",_.onload=function(){var e;200==_.status||0==_.status&&_.response?i(_.response):(e=ue(t))?i(e.buffer):n()},_.onerror=n,_.send(null)},void 0!==arguments&&(A.arguments=arguments),"undefined"!=typeof console?(A.print||(A.print=function(e){console.log(e)}),A.printErr||(A.printErr=function(e){console.warn(e)})):A.print||(A.print=function(){}),void 0===A.setWindowTitle&&(A.setWindowTitle=function(e){document.title=e})}for(t in A.print||(A.print=function(){}),A.printErr||(A.printErr=A.print),A.arguments||(A.arguments=[]),A.thisProgram||(A.thisProgram="./this.program"),A.quit||(A.quit=function(e,t){throw t}),A.print=A.print,A.printErr=A.printErr,A.preRun=[],A.postRun=[],i)i.hasOwnProperty(t)&&(A[t]=i[t]);function c(e){l(!w);var t=U;return U=U+e+15&-16,t}function f(e){var t=t||16;return Math.ceil(e/t)*t}i=void 0;var b=0;function l(e,t){e||OC("Assertion failed: "+t)}var p,d,u,m,h,y,g,C,v,w,S,k,R,j,B,I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function W(){OC("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+T+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le"),U=0,w=!1;var D=A.TOTAL_STACK||5242880,T=A.TOTAL_MEMORY||67108864;if(T<D&&A.printErr(