VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/emscripten/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/emscripten/tests/hello_world_gles_shell.html
<html>
  <head>
    <title>Emscripten-Generated Code</title>
  <body>
    <center>
      <canvas id='canvas' width='256' height='256'></canvas>
    </center>
    <hr>
    <div id='output'></div>
    <hr>
    <script type='text/javascript'>
      /**
       * TODO: Encapsulate this part in a reusable token such as
       *       EMSCRIPTEN_ENVIRONMENT so that we can share code
       *       between the default shell and custom ones.
       */
      // connect to canvas
      var Module = {
        print: (function() {
          var element = document.getElementById('output');
          return function(text) {
            element.innerHTML += text.replace('\n', '<br>', 'g') + '<br>';
          };
        })(),
        canvas: document.getElementById('canvas')
      };

      // Test code
      function simulateKeyEvent(keyCode) {
        var event = document.createEvent("KeyboardEvent");
        event.initKeyEvent("keydown", true, true, window,
                           0, 0, 0, 0, keyCode, 0);
        document.body.dispatchEvent(event);
      }
      function reportResult(result) {
        var xhr = new XMLHttpRequest();
        xhr.open('GET', 'http://localhost:8888/report_gl_result?' + result, true);
        xhr.send();
        setTimeout(function() { window.close() }, 1000);
      }
      function doTest() {
        var firstImage = Module.canvas.toDataURL();
        simulateKeyEvent(0x25 /* DOM_VK_LEFT */);
        setTimeout(function() {
          var secondImage = Module.canvas.toDataURL();
          reportResult(firstImage != secondImage);
        }, 0);
      }
      Module.postRun = doTest;

    </script>
    {{{ SCRIPT }}}
  </body>
</html>


VaKeR 2022