Playfield

Console</pre> </div> <!-- Code for Emscripten Base --> <script type='text/javascript'> var Module = { preRun: [], postRun: [], print: (function(text) { var element = document.getElementById('console'); return function(text) { element.textContent += text + "\n"; element.scrollTop = element.scrollHeight; }; })(), printErr: (function(text) { var element = document.getElementById('console'); return function(text) { element.textContent += text + "\n"; element.scrollTop = element.scrollHeight; }; })(), canvas: (function() { var canvas = document.getElementById('canvas'); canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); return canvas; })(), totalDependencies: 0, monitorRunDependencies: function(left) { this.totalDependencies = Math.max(this.totalDependencies, left); } }; window.onerror = function() { window.alert('Exception thrown, see JavaScript console'); }; </script> <!-- Code for Playfield Editor --> <script type="text/javascript"> // File System API var dirHandle = null; // btnOpenProject handler. document.getElementById('btnOpenProject').onclick = async () => { // Show a directory picker. try { dirHandle = await window.showDirectoryPicker({mode: "readwrite"}); if (typeof dirHandle === 'undefined') { alert('Cannot open a directory.'); return; } } catch (e) { alert('The operation is not allowed.'); return; } // Hide the button. document.getElementById('btnOpenProject').style.display = 'none'; // Start running. Module.ccall('onLoadProject', null, null, null); }; </script> <!-- Placeholder for Emscripten generated code--> {{{ SCRIPT }}} </body> </html>