mirror of
https://gitlab.com/raylibtemplates/rt.git
synced 2026-06-06 02:30:53 -04:00
1 line
471 KiB
HTML
1 line
471 KiB
HTML
<!doctypehtml><html lang=en-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><style>body{margin:0;overflow:hidden;background-color:#000}canvas.emscripten{border:0 none;background-color:#000;padding-left:0;padding-right:0;margin-left:auto;margin-right:auto;display:block}</style><script src=https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js></script><script>function saveFileFromMEMFSToDisk(e,a){var i,o=FS.readFile(e);i=new Blob([o.buffer],{type:"application/octet-binary"}),saveAs(i,a)}</script></head><body><canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas><p id=output><script>var Module={print:function(){var e=document.getElementById("output");return e&&(e.value=""),function(n){arguments.length>1&&(n=Array.prototype.slice.call(arguments).join(" ")),console.log(n),e&&(e.value+=n+"\n",e.scrollTop=e.scrollHeight)}}(),canvas:document.getElementById("canvas")}</script><script id=mainScript>!function(){function A(A){for(var e=(A=A.split("-")[0]).split(".").slice(0,3);e.length<3;)e.push("00");return(e=e.map(((A,e,r)=>A.padStart(2,"0")))).join("")}var e=A=>[A/1e4|0,(A/100|0)%100,A%100].join("."),r=2147483647,t="undefined"!=typeof process&&process?.versions?.node?A(process.versions.node):r;if(t<16e4)throw new Error(`This emscripten-generated code requires node v${e(16e4)} (detected v${e(t)})`);var v="undefined"!=typeof navigator&&navigator?.userAgent?.includes("Safari/")&&navigator.userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)?A(navigator.userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)[1]):r;if(v<15e4)throw new Error(`This emscripten-generated code requires Safari v${e(15e4)} (detected v${v})`);var n="undefined"!=typeof navigator&&navigator?.userAgent?.match(/Firefox\/(\d+(?:\.\d+)?)/)?parseFloat(navigator.userAgent.match(/Firefox\/(\d+(?:\.\d+)?)/)[1]):r;if(n<79)throw new Error(`This emscripten-generated code requires Firefox v79 (detected v${n})`);var i="undefined"!=typeof navigator&&navigator?.userAgent?.match(/Chrome\/(\d+(?:\.\d+)?)/)?parseFloat(navigator.userAgent.match(/Chrome\/(\d+(?:\.\d+)?)/)[1]):r;if(i<85)throw new Error(`This emscripten-generated code requires Chrome v85 (detected v${i})`)}();var Module=void 0!==Module?Module:{},ENVIRONMENT_IS_WEB=!!globalThis.window,ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope,ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,arguments_=[],thisProgram="./this.program",quit_=(A,e)=>{throw e},_scriptName=globalThis.document?URL.createObjectURL(new Blob([document.getElementById("mainScript").textContent],{type:"text/javascript"})):void 0;"undefined"!=typeof __filename?_scriptName=__filename:ENVIRONMENT_IS_WORKER&&(_scriptName=self.location.href);var readAsync,readBinary,scriptDirectory="";if(ENVIRONMENT_IS_NODE){if(!(globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var fs=require("fs");scriptDirectory=__dirname+"/",readBinary=A=>{A=isFileURI(A)?new URL(A):A;var e=fs.readFileSync(A);return assert(Buffer.isBuffer(e)),e},readAsync=async(A,e=!0)=>{A=isFileURI(A)?new URL(A):A;var r=fs.readFileSync(A,e?void 0:"utf8");return assert(e?Buffer.isBuffer(r):"string"==typeof r),r},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),quit_=(A,e)=>{throw process.exitCode=A,e}}else if(ENVIRONMENT_IS_SHELL);else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw new Error("environment detection error");try{scriptDirectory=new URL(".",_scriptName).href}catch{}if(!globalThis.window&&!globalThis.WorkerGlobalScope)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");ENVIRONMENT_IS_WORKER&&(readBinary=A=>{var e=new XMLHttpRequest;return e.open("GET",A,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),readAsync=async A=>{if(isFileURI(A))return new Promise(((e,r)=>{var t=new XMLHttpRequest;t.open("GET",A,!0),t.responseType="arraybuffer",t.onload=()=>{200==t.status||0==t.status&&t.response?e(t.response):r(t.status)},t.onerror=r,t.send(null)}));var e=await fetch(A,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var wasmBinary,out=console.log.bind(console),err=console.error.bind(console);assert(!ENVIRONMENT_IS_SHELL,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),globalThis.WebAssembly||err("no native wasm support detected");var EXITSTATUS,ABORT=!1;function assert(A,e){A||abort("Assertion failed"+(e?": "+e:""))}var isFileURI=A=>A.startsWith("file://");function writeStackCookie(){var A=_emscripten_stack_get_end();assert(!(3&A)),0==A&&(A+=4),HEAPU32[A>>2]=34821223,HEAPU32[A+4>>2]=2310721022,HEAPU32[0]=1668509029}function checkStackCookie(){if(!ABORT){var A=_emscripten_stack_get_end();0==A&&(A+=4);var e=HEAPU32[A>>2],r=HEAPU32[A+4>>2];34821223==e&&2310721022==r||abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(A)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(r)} ${ptrToString(e)}`),1668509029!=HEAPU32[0]&&abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,runtimeDebug=!0;function consumedModuleProp(A){Object.getOwnPropertyDescriptor(Module,A)||Object.defineProperty(Module,A,{configurable:!0,set(){abort(`Attempt to set \`Module.${A}\` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}function makeInvalidEarlyAccess(A){return()=>assert(!1,`call to '${A}' via reference taken before Wasm module initialization`)}function ignoredModuleProp(A){Object.getOwnPropertyDescriptor(Module,A)&&abort(`\`Module.${A}\` was supplied but \`${A}\` not included in INCOMING_MODULE_JS_API`)}function isExportedByForceFilesystem(A){return"FS_createPath"===A||"FS_createDataFile"===A||"FS_createPreloadedFile"===A||"FS_preloadFile"===A||"FS_unlink"===A||"addRunDependency"===A||"FS_createLazyFile"===A||"FS_createDevice"===A||"removeRunDependency"===A}function hookGlobalSymbolAccess(A,e){Object.getOwnPropertyDescriptor(globalThis,A)||Object.defineProperty(globalThis,A,{configurable:!0,get(){e()}})}function missingGlobal(A,e){hookGlobalSymbolAccess(A,(()=>{warnOnce(`\`${A}\` is no longer defined by emscripten. ${e}`)}))}function missingLibrarySymbol(A){hookGlobalSymbolAccess(A,(()=>{var e=`\`${A}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,r=A;r.startsWith("_")||(r="$"+A),e+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${r}')`,isExportedByForceFilesystem(A)&&(e+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),warnOnce(e)})),unexportedRuntimeSymbol(A)}function unexportedRuntimeSymbol(A){Object.getOwnPropertyDescriptor(Module,A)||Object.defineProperty(Module,A,{configurable:!0,get(){var e=`'${A}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;isExportedByForceFilesystem(A)&&(e+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),abort(e)}})}function binaryDecode(A){for(var e,r=0,t=A.length,v=new Uint8Array(t);r<t;++r)e=A.charCodeAt(r),v[r]=~e>>8&e;return v}(()=>{var A=new Int16Array(1),e=new Int8Array(A.buffer);A[0]=25459,115===e[0]&&99===e[1]||abort("Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)")})(),missingGlobal("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),missingGlobal("asm","Please use wasmExports instead");var wasmBinaryFile,runtimeInitialized=!1;function updateMemoryViews(){var A=wasmMemory.buffer;HEAP8=new Int8Array(A),HEAP16=new Int16Array(A),HEAPU8=new Uint8Array(A),HEAPU16=new Uint16Array(A),HEAP32=new Int32Array(A),HEAPU32=new Uint32Array(A),HEAPF32=new Float32Array(A),HEAPF64=new Float64Array(A),HEAP64=new BigInt64Array(A),HEAPU64=new BigUint64Array(A)}function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());consumedModuleProp("preRun"),callRuntimeCallbacks(onPreRuns)}function initRuntime(){assert(!runtimeInitialized),runtimeInitialized=!0,checkStackCookie(),Module.noFSInit||FS.initialized||FS.init(),TTY.init(),wasmExports.__wasm_call_ctors(),FS.ignorePermissions=!1}function preMain(){checkStackCookie()}function postRun(){if(checkStackCookie(),Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());consumedModuleProp("postRun"),callRuntimeCallbacks(onPostRuns)}function abort(A){throw Module.onAbort?.(A),err(A="Aborted("+A+")"),ABORT=!0,A.indexOf("RuntimeError: unreachable")>=0&&(A+='. "unreachable" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)'),new WebAssembly.RuntimeError(A)}function createExportWrapper(A,e){return(...r)=>{assert(runtimeInitialized,`native function \`${A}\` called before runtime initialization`);var t=wasmExports[A];return assert(t,`exported native function \`${A}\` not found`),assert(r.length<=e,`native function \`${A}\` called with ${r.length} args but expects ${e}`),t(...r)}}function findWasmBinary(){return binaryDecode(' |