| <html lang="en-us"><script src="https://pygame-web.github.io/cdn/0.9.3/pythons.js" type=module id="site" data-python="python3.12" data-LINES=42 data-COLUMNS=132 data-os="vtx,snd,gui" async defer># |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </script><head> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="application/javascript"> |
| |
| |
| |
| |
| |
| |
| config = { |
| xtermjs : "1" , |
| _sdl2 : "canvas", |
| user_canvas : 0, |
| user_canvas_managed : 0, |
| gui_divider : 2, |
| ume_block : 1, |
| can_close : 0, |
| archive : "engineroot", |
| gui_debug : 2, |
| cdn : "https://pygame-web.github.io/cdn/0.9.3/", |
| autorun : 0, |
| PYBUILD : "3.12", |
| fb_ar : 1.77, |
| fb_width : "1280", |
| fb_height : "720" |
| } |
| |
| function show_infobox() { |
| infobox.style.display = "block"; |
| |
| |
| const w = infobox.offsetWidth; |
| const h = infobox.offsetHeight; |
| |
| |
| const left = (window.innerWidth - w) / 2; |
| const top = (window.innerHeight - h) / 2; |
| |
| infobox.style.left = left + "px"; |
| infobox.style.top = top + "px"; |
| } |
| |
| </script> |
|
|
| <title>engineroot</title> |
| <meta charset="UTF-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta name="viewport" content="height=device-height, initial-scale=1.0"> |
| <meta name="mobile-web-app-capable" content="yes"> |
| <meta name="apple-mobile-web-app-capable" content="yes"/> |
|
|
|
|
| <link rel="icon" type="image/png" href="favicon.png" sizes="16x16"> |
|
|
| <style> |
| #status { |
| display: inline-block; |
| vertical-align: top; |
| margin-top: 20px; |
| margin-left: 30px; |
| font-weight: bold; |
| color: rgb(120, 120, 120); |
| } |
| |
| #progress { |
| height: 20px; |
| width: 300px; |
| } |
| |
| #infobox { |
| position: fixed; |
| background: green; |
| color: blue; |
| font-weight: bold; |
| padding: 12px 24px; |
| |
| z-index: 999999; |
| } |
| div.emscripten { text-align: center; } |
| div.emscripten_border { border: 1px solid black; } |
| div.thick_border { border: 4px solid black; } |
| |
| |
| |
| canvas.emscripten { |
| border: 0px none; |
| background-color: transparent; |
| width: 100%; |
| height: 100%; |
| z-index: 5; |
| |
| padding: 0; |
| margin: 0 auto; |
| |
| position: absolute; |
| top: 0; |
| bottom: 0; |
| left: 0; |
| right: 0; |
| } |
| |
| body { |
| font-family: arial; |
| margin: 0; |
| padding: none; |
| background-color:powderblue; |
| } |
| |
| .topright{ |
| position:absolute; |
| top:0px; |
| right:0px; |
| } |
| |
| .bottomright { |
| position:absolute; |
| top: 40%; |
| right: 0px; |
| } |
| |
| .center { |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| } |
| |
| .trinfo{ |
| position: relative; |
| right: 0px; |
| border: 1px solid black; |
| } |
| |
| .framed{ |
| position: relative; |
| top: 150px; |
| right: 10px; |
| border: 1px solid black; |
| } |
| </style> |
|
|
| <script> |
| |
| |
| |
| |
| |
| |
| </script> |
|
|
| <script src="https://pygame-web.github.io/cdn/0.9.3//browserfs.min.js"></script> |
|
|
| </head> |
|
|
| <body> |
|
|
| <div id="transfer" align=center> |
| |
| <div class="emscripten" id="status">Downloading...</div> |
| <div class="emscripten"> |
| <progress value="0" max="100" id="progress"></progress> |
| </div> |
| </div> |
|
|
|
|
|
|
| <canvas class="emscripten" id="canvas" |
| width="1px" |
| height="1px" |
| oncontextmenu="event.preventDefault()" tabindex=1> |
| </canvas> |
|
|
| <canvas class="emscripten" id="canvas3d" |
| width="1280px" |
| height="720px" |
| oncontextmenu="event.preventDefault()" tabindex=1 hidden> |
| </canvas> |
|
|
| <div id="infobox">Loading, please wait ...</div> |
|
|
| <div id=html></div> |
|
|
| <div id=crt class=bottomright > |
|
|
| <div id="system" hidden> |
| <div class="button-container"> |
| <button id="aiostop" disabled>AIO ⏏︎</button> |
| <button id="aiopaused_true" disabled>AIO ■</button> |
| <button id="aiopaused_false" disabled>AIO ▶</button> |
| <button id="pygame_mixer_music_pause" disabled>Music ■</button> |
| </div> |
|
|
| <div class="button-container"> |
| <div id=load_min>min</div> |
| <div id=load_avg>avg</div> |
| <div id=load_max>max</div> |
| <button id="load_rst" disabled>RESET</button> |
| </div> |
|
|
| <div id="level">(battery level unknown)</div> |
| <div id="stateBattery">(charging state unknown)</div> |
|
|
| </div> |
|
|
| <div id=box class="emscripten_border" hidden=true> |
|
|
| <div id="info" class="trinfo"></div> |
|
|
| <iframe id="iframe" class="framed" name="iframe" |
| width="470px" height="90%" |
| allowtransparency="true" |
| style="z-index: 10;" |
| style="background: #FFFFFF;" |
| frameborder="1" |
| allowfullscreen="true" |
| webkitallowfullscreen="true" |
| msallowfullscreen="true" |
| mozallowfullscreen="true" |
| sandbox="allow-same-origin allow-top-navigation allow-scripts allow-pointer-lock" |
| allow="autoplay; fullscreen *; geolocation; microphone; camera; midi; monetization; xr-spatial-tracking; gamepad; gyroscope; accelerometer; xr; cross-origin-isolated" |
| src="https://pygame-web.github.io/cdn/0.9.3/empty.html" |
| scrolling="yes"> |
| </iframe> |
| </div> |
|
|
| </div> |
|
|
|
|
| <div id="dlg" hidden> |
| <input type="file" id="dlg_multifile" multiple accept="image/*"> |
| <label for="dlg_multifile">Select files</label> |
| </div> |
|
|
| <div id="pyconsole"> |
| <div id="terminal" tabIndex=1 align="left"></div> |
| </div> |
|
|
| <script type="application/javascript"> |
| |
| globalThis.__canvas_resized = (self, ecw, ech) => { |
| console.warn("TODO: panda3d canvas monitor", self, ecw, ech) |
| } |
| |
| async function custom_onload(debug_hidden) { |
| |
| |
| console.log(__FILE__, "custom_onload") |
| |
| pyconsole.hidden = debug_hidden |
| system.hidden = debug_hidden |
| transfer.hidden = debug_hidden |
| info.hidden = debug_hidden |
| box.hidden = debug_hidden |
| |
| show_infobox() |
| } |
| |
| function custom_prerun(){ |
| |
| console.log(__FILE__, "custom_prerun") |
| |
| } |
| |
| function custom_postrun(){ |
| |
| console.log(__FILE__, "custom_postrun") |
| |
| } |
| |
| function debug() { |
| |
| |
| python.config.debug = true |
| custom_onload(false) |
| Module.PyRun_SimpleString("shell.uptime()") |
| window_resize() |
| } |
| |
| function info_inline(data){ |
| document.getElementById("info").innerHTML = data |
| } |
| |
| function info_online(url) { |
| |
| fetch( url ) |
| .then((response) => response.text()) |
| .then((html) => { |
| info_inline(html); |
| }) |
| .catch((error) => { |
| console.warn(error); |
| }); |
| } |
| |
| function frame_online(url) { |
| window.frames["iframe"].location = url; |
| } |
| |
| </script> |
|
|
| </body> |
| </html> |
|
|