text: var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () {
            Browser.mainLoop.scheduler = null;
            Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return.
          },resume:function () {
            Browser.mainLoop.currentlyRunningMainloop++;
            var timingMode = Browser.mainLoop.timingMode;
            var timingValue = Browser.mainLoop.timingValue;
            var func = Browser.mainLoop.func;
            Browser.mainLoop.func = null;
            _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */);
            _emscripten_set_main_loop_timing(timingMode, timingValue);
            Browser.mainLoop.scheduler();
          },updateStatus:function () {
            if (Module['setStatus']) {
              var message = Module['statusMessage'] || 'Please wait...';
              var remaining = Browser.mainLoop.remainingBlockers;
              var expected = Browser.mainLoop.expectedBlockers;
              if (remaining) {
                if (remaining < expected) {
                  Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')');
                } else {
                  Module['setStatus'](message);
                }
              } else {
                Module['setStatus']('');
              }
            }
          },runIter:function (func) {
            if (ABORT) return;
            if (Module['preMainLoop']) {
              var preRet = Module['preMainLoop']();
              if (preRet === false) {
                return; // |return false| skips a frame
              }
            }
            try {
              func();
            } catch (e) {
              if (e instanceof ExitStatus) {
                return;
              } else {
                if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
                throw e;
              }
            }
            if (Module['postMainLoop']) Module['postMainLoop']();
          }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () {
          if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers
    
          if (Browser.initted) return;
          Browser.initted = true;
    
          try {
            new Blob();
            Browser.hasBlobConstructor = true;
          } catch(e) {
            Browser.hasBlobConstructor = false;
            console.log("warning: no blob constructor, cannot create blobs with mimetypes");
          }
          Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null));
          Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined;
          if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') {
            console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");
            Module.noImageDecoding = true;
          }
    
          // Support for plugins that can process preloaded files. You can add more of these to
          // your app by creating and appending to Module.preloadPlugins.
          //
          // Each plugin is asked if it can handle a file based on the file's name. If it can,
          // it is given the file's raw data. When it is done, it calls a callback with the file's
          // (possibly modified) data. For example, a plugin might decompress a file, or it
          // might create some side data structure for use later (like an Image element, etc.).
    
          var imagePlugin = {};
          imagePlugin['canHandle'] = function imagePlugin_canHandle(name) {
            return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name);
          };
          imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) {
            var b = null;
            if (Browser.hasBlobConstructor) {
              try {
                b = new Blob([byteArray], { type: Browser.getMimetype(name) });
                if (b.size !== byteArray.length) { // Safari bug #118630
                  // Safari's Blob can only take an ArrayBuffer
                  b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) });
                }
              } catch(e) {
                Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder');
              }
            }
            if (!b) {
              var bb = new Browser.BlobBuilder();
              bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range
              b = bb.getBlob();
            }
            var url = Browser.URLObject.createObjectURL(b);
            assert(typeof url == 'string', 'createObjectURL must return a url as a string');
            var img = new Image();
            img.onload = function img_onload() {
              assert(img.complete, 'Image ' + name + ' could not be decoded');
              var canvas = document.createElement('canvas');
              canvas.width = img.width;
              canvas.height = img.height;
              var ctx = canvas.getContext('2d');
              ctx.drawImage(img, 0, 0);
              Module["preloadedImages"][name] = canvas;
              Browser.URLObject.revokeObjectURL(url);
              if (onload) onload(byteArray);
            };
            img.onerror = function img_onerror(event) {
              console.log('Image ' + url + ' could not be decoded');
              if (onerror) onerror();
            };
            img.src = url;
          };
          Module['preloadPlugins'].push(imagePlugin);
    
          var audioPlugin = {};
          audioPlugin['canHandle'] = function audioPlugin_canHandle(name) {
            return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 };
          };
          audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) {
            var done = false;
            function finish(audio) {
              if (done) return;
              done = true;
              Module["preloadedAudios"][name] = audio;
              if (onload) onload(byteArray);
            }
            function fail() {
              if (done) return;
              done = true;
              Module["preloadedAudios"][name] = new Audio(); // empty shim
              if (onerror) onerror();
            }
            if (Browser.hasBlobConstructor) {
              try {
                var b = new Blob([byteArray], { type: Browser.getMimetype(name) });
              } catch(e) {
                return fail();
              }
              var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this!
              assert(typeof url == 'string', 'createObjectURL must return a url as a string');
              var audio = new Audio();
              audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926
              audio.onerror = function audio_onerror(event) {
                if (done) return;
                console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach');
                function encode64(data) {
                  var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
                  var PAD = '=';
                  var ret = '';
                  var leftchar = 0;
                  var leftbits = 0;
                  for (var i = 0; i < data.length; i++) {
                    leftchar = (leftchar << 8) | data[i];
                    leftbits += 8;
                    while (leftbits >= 6) {
                      var curr = (leftchar >> (leftbits-6)) & 0x3f;
                      leftbits -= 6;
                      ret += BASE[curr];
                    }
                  }
                  if (leftbits == 2) {
                    ret += BASE[(leftchar&3) << 4];
                    ret += PAD + PAD;
                  } else if (leftbits == 4) {
                    ret += BASE[(leftchar&0xf) << 2];
                    ret += PAD;
                  }
                  return ret;
                }
                audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray);
                finish(audio); // we don't wait for confirmation this worked - but it's worth trying
              };
              audio.src = url;
              // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror
              Browser.safeSetTimeout(function() {
                finish(audio); // try to use it even though it is not necessarily ready to play
              }, 10000);
            } else {
              return fail();
            }
          };
          Module['preloadPlugins'].push(audioPlugin);
    
          // Canvas event setup
    
          function pointerLockChange() {
            Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] ||
                                  document['mozPointerLockElement'] === Module['canvas'] ||
                                  document['webkitPointerLockElement'] === Module['canvas'] ||
                                  document['msPointerLockElement'] === Module['canvas'];
          }
          var canvas = Module['canvas'];
          if (canvas) {
            // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module
            // Module['forcedAspectRatio'] = 4 / 3;
            
            canvas.requestPointerLock = canvas['requestPointerLock'] ||
                                        canvas['mozRequestPointerLock'] ||
                                        canvas['webkitRequestPointerLock'] ||
                                        canvas['msRequestPointerLock'] ||
                                        function(){};
            canvas.exitPointerLock = document['exitPointerLock'] ||
                                     document['mozExitPointerLock'] ||
                                     document['webkitExitPointerLock'] ||
                                     document['msExitPointerLock'] ||
                                     function(){}; // no-op if function does not exist
            canvas.exitPointerLock = canvas.exitPointerLock.bind(document);
    
            document.addEventListener('pointerlockchange', pointerLockChange, false);
            document.addEventListener('mozpointerlockchange', pointerLockChange, false);
            document.addEventListener('webkitpointerlockchange', pointerLockChange, false);
            document.addEventListener('mspointerlockchange', pointerLockChange, false);
    
            if (Module['elementPointerLock']) {
              canvas.addEventListener("click", function(ev) {
                if (!Browser.pointerLock && Module['canvas'].requestPointerLock) {
                  Module['canvas'].requestPointerLock();
                  ev.preventDefault();
                }
              }, false);
            }
          }
        },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) {
          if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas.
    
          var ctx;
          var contextHandle;
          if (useWebGL) {
            // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults.
            var contextAttributes = {
              antialias: false,
              alpha: false
            };
    
            if (webGLContextAttributes) {
              for (var attribute in webGLContextAttributes) {
                contextAttributes[attribute] = webGLContextAttributes[attribute];
              }
            }
    
            contextHandle = GL.createContext(canvas, contextAttributes);
            if (contextHandle) {
              ctx = GL.getContext(contextHandle).GLctx;
            }
          } else {
            ctx = canvas.getContext('2d');
          }
    
          if (!ctx) return null;
    
          if (setInModule) {
            if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it');
    
            Module.ctx = ctx;
            if (useWebGL) GL.makeContextCurrent(contextHandle);
            Module.useWebGL = useWebGL;
            Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() });
            Browser.init();
          }
          return ctx;
        },destroyContext:function (canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function (lockPointer, resizeCanvas, vrDevice) {
          Browser.lockPointer = lockPointer;
          Browser.resizeCanvas = resizeCanvas;
          Browser.vrDevice = vrDevice;
          if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true;
          if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false;
          if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null;
    
          var canvas = Module['canvas'];
          function fullscreenChange() {
            Browser.isFullscreen = false;
            var canvasContainer = canvas.parentNode;
            if ((document['fullscreenElement'] || document['mozFullScreenElement'] ||
                 document['msFullscreenElement'] || document['webkitFullscreenElement'] ||
                 document['webkitCurrentFullScreenElement']) === canvasContainer) {
              canvas.exitFullscreen = document['exitFullscreen'] ||
                                      document['cancelFullScreen'] ||
                                      document['mozCancelFullScreen'] ||
                                      document['msExitFullscreen'] ||
                                      document['webkitCancelFullScreen'] ||
                                      function() {};
              canvas.exitFullscreen = canvas.exitFullscreen.bind(document);
              if (Browser.lockPointer) canvas.requestPointerLock();
              Browser.isFullscreen = true;
              if (Browser.resizeCanvas) Browser.setFullscreenCanvasSize();
            } else {
              
              // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen
              canvasContainer.parentNode.insertBefore(canvas, canvasContainer);
              canvasContainer.parentNode.removeChild(canvasContainer);
              
              if (Browser.resizeCanvas) Browser.setWindowedCanvasSize();
            }
            if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen);
            if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen);
            Browser.updateCanvasDimensions(canvas);
          }
    
          if (!Browser.fullscreenHandlersInstalled) {
            Browser.fullscreenHandlersInstalled = true;
            document.addEventListener('fullscreenchange', fullscreenChange, false);
            document.addEventListener('mozfullscreenchange', fullscreenChange, false);
            document.addEventListener('webkitfullscreenchange', fullscreenChange, false);
            document.addEventListener('MSFullscreenChange', fullscreenChange, false);
          }
    
          // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root
          var canvasContainer = document.createElement("div");
          canvas.parentNode.insertBefore(canvasContainer, canvas);
          canvasContainer.appendChild(canvas);
    
          // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size)
          canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] ||
                                              canvasContainer['mozRequestFullScreen'] ||
                                              canvasContainer['msRequestFullscreen'] ||
                                             (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) ||
                                             (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null);
    
          if (vrDevice) {
            canvasContainer.requestFullscreen({ vrDisplay: vrDevice });
          } else {
            canvasContainer.requestFullscreen();
          }
        },requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) {
            Module.printErr('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.');
            Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) {
              return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice);
            }
            return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice);
        },nextRAF:0,fakeRequestAnimationFrame:function (func) {
          // try to keep 60fps between calls to here
          var now = Date.now();
          if (Browser.nextRAF === 0) {
            Browser.nextRAF = now + 1000/60;
          } else {
            while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0
              Browser.nextRAF += 1000/60;
            }
          }
          var delay = Math.max(Browser.nextRAF - now, 0);
          setTimeout(func, delay);
        },requestAnimationFrame:function requestAnimationFrame(func) {
          if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js)
            Browser.fakeRequestAnimationFrame(func);
          } else {
            if (!window.requestAnimationFrame) {
              window.requestAnimationFrame = window['requestAnimationFrame'] ||
                                             window['mozRequestAnimationFrame'] ||
                                             window['webkitRequestAnimationFrame'] ||
                                             window['msRequestAnimationFrame'] ||
                                             window['oRequestAnimationFrame'] ||
                                             Browser.fakeRequestAnimationFrame;
            }
            window.requestAnimationFrame(func);
          }
        },safeCallback:function (func) {
          return function() {
            if (!ABORT) return func.apply(null, arguments);
          };
        },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () {
          Browser.allowAsyncCallbacks = false;
        },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now
          Browser.allowAsyncCallbacks = true;
          if (Browser.queuedAsyncCallbacks.length > 0) {
            var callbacks = Browser.queuedAsyncCallbacks;
            Browser.queuedAsyncCallbacks = [];
            callbacks.forEach(function(func) {
              func();
            });
          }
        },safeRequestAnimationFrame:function (func) {
          return Browser.requestAnimationFrame(function() {
            if (ABORT) return;
            if (Browser.allowAsyncCallbacks) {
              func();
            } else {
              Browser.queuedAsyncCallbacks.push(func);
            }
          });
        },safeSetTimeout:function (func, timeout) {
          Module['noExitRuntime'] = true;
          return setTimeout(function() {
            if (ABORT) return;
            if (Browser.allowAsyncCallbacks) {
              func();
            } else {
              Browser.queuedAsyncCallbacks.push(func);
            }
          }, timeout);
        },safeSetInterval:function (func, timeout) {
          Module['noExitRuntime'] = true;
          return setInterval(function() {
            if (ABORT) return;
            if (Browser.allowAsyncCallbacks) {
              func();
            } // drop it on the floor otherwise, next interval will kick in
          }, timeout);
        },getMimetype:function (name) {
          return {
            'jpg': 'image/jpeg',
            'jpeg': 'image/jpeg',
            'png': 'image/png',
            'bmp': 'image/bmp',
            'ogg': 'audio/ogg',
            'wav': 'audio/wav',
            'mp3': 'audio/mpeg'
          }[name.substr(name.lastIndexOf('.')+1)];
        },getUserMedia:function (func) {
          if(!window.getUserMedia) {
            window.getUserMedia = navigator['getUserMedia'] ||
                                  navigator['mozGetUserMedia'];
          }
          window.getUserMedia(func);
        },getMovementX:function (event) {
          return event['movementX'] ||
                 event['mozMovementX'] ||
                 event['webkitMovementX'] ||
                 0;
        },getMovementY:function (event) {
          return event['movementY'] ||
                 event['mozMovementY'] ||
                 event['webkitMovementY'] ||
                 0;
        },getMouseWheelDelta:function (event) {
          var delta = 0;
          switch (event.type) {
            case 'DOMMouseScroll': 
              delta = event.detail;
              break;
            case 'mousewheel': 
              delta = event.wheelDelta;
              break;
            case 'wheel': 
              delta = event['deltaY'];
              break;
            default:
              throw 'unrecognized mouse wheel event: ' + event.type;
          }
          return delta;
        },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup
          if (Browser.pointerLock) {
            // When the pointer is locked, calculate the coordinates
            // based on the movement of the mouse.
            // Workaround for Firefox bug 764498
            if (event.type != 'mousemove' &&
                ('mozMovementX' in event)) {
              Browser.mouseMovementX = Browser.mouseMovementY = 0;
            } else {
              Browser.mouseMovementX = Browser.getMovementX(event);
              Browser.mouseMovementY = Browser.getMovementY(event);
            }
            
            // check if SDL is available
            if (typeof SDL != "undefined") {
            	Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;
            	Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;
            } else {
            	// just add the mouse delta to the current absolut mouse position
            	// FIXME: ideally this should be clamped against the canvas size and zero
            	Browser.mouseX += Browser.mouseMovementX;
            	Browser.mouseY += Browser.mouseMovementY;
            }        
          } else {
            // Otherwise, calculate the movement based on the changes
            // in the coordinates.
            var rect = Module["canvas"].getBoundingClientRect();
            var cw = Module["canvas"].width;
            var ch = Module["canvas"].height;
    
            // Neither .scrollX or .pageXOffset are defined in a spec, but
            // we prefer .scrollX because it is currently in a spec draft.
            // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
            var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset);
            var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset);
            // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset
            // and we have no viable fallback.
            assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.');
    
            if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') {
              var touch = event.touch;
              if (touch === undefined) {
                return; // the "touch" property is only defined in SDL
    
              }
              var adjustedX = touch.pageX - (scrollX + rect.left);
              var adjustedY = touch.pageY - (scrollY + rect.top);
    
              adjustedX = adjustedX * (cw / rect.width);
              adjustedY = adjustedY * (ch / rect.height);
    
              var coords = { x: adjustedX, y: adjustedY };
              
              if (event.type === 'touchstart') {
                Browser.lastTouches[touch.identifier] = coords;
                Browser.touches[touch.identifier] = coords;
              } else if (event.type === 'touchend' || event.type === 'touchmove') {
                var last = Browser.touches[touch.identifier];
                if (!last) last = coords;
                Browser.lastTouches[touch.identifier] = last;
                Browser.touches[touch.identifier] = coords;
              } 
              return;
            }
    
            var x = event.pageX - (scrollX + rect.left);
            var y = event.pageY - (scrollY + rect.top);
    
            // the canvas might be CSS-scaled compared to its backbuffer;
            // SDL-using content will want mouse coordinates in terms
            // of backbuffer units.
            x = x * (cw / rect.width);
            y = y * (ch / rect.height);
    
            Browser.mouseMovementX = x - Browser.mouseX;
            Browser.mouseMovementY = y - Browser.mouseY;
            Browser.mouseX = x;
            Browser.mouseY = y;
          }
        },asyncLoad:function (url, onload, onerror, noRunDep) {
          var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : '';
          Module['readAsync'](url, function(arrayBuffer) {
            assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).');
            onload(new Uint8Array(arrayBuffer));
            if (dep) removeRunDependency(dep);
          }, function(event) {
            if (onerror) {
              onerror();
            } else {
              throw 'Loading data file "' + url + '" failed.';
            }
          });
          if (dep) addRunDependency(dep);
        },resizeListeners:[],updateResizeListeners:function () {
          var canvas = Module['canvas'];
          Browser.resizeListeners.forEach(function(listener) {
            listener(canvas.width, canvas.height);
          });
        },setCanvasSize:function (width, height, noUpdates) {
          var canvas = Module['canvas'];
          Browser.updateCanvasDimensions(canvas, width, height);
          if (!noUpdates) Browser.updateResizeListeners();
        },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function () {
          // check if SDL is available   
          if (typeof SDL != "undefined") {
          	var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];
          	flags = flags | 0x00800000; // set SDL_FULLSCREEN flag
          	HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
          }
          Browser.updateResizeListeners();
        },setWindowedCanvasSize:function () {
          // check if SDL is available       
          if (typeof SDL != "undefined") {
          	var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];
          	flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag
          	HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
          }
          Browser.updateResizeListeners();
        },updateCanvasDimensions:function (canvas, wNative, hNative) {
          if (wNative && hNative) {
            canvas.widthNative = wNative;
            canvas.heightNative = hNative;
          } else {
            wNative = canvas.widthNative;
            hNative = canvas.heightNative;
          }
          var w = wNative;
          var h = hNative;
          if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) {
            if (w/h < Module['forcedAspectRatio']) {
              w = Math.round(h * Module['forcedAspectRatio']);
            } else {
              h = Math.round(w / Module['forcedAspectRatio']);
            }
          }
          if (((document['fullscreenElement'] || document['mozFullScreenElement'] ||
               document['msFullscreenElement'] || document['webkitFullscreenElement'] ||
               document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) {
             var factor = Math.min(screen.width / w, screen.height / h);
             w = Math.round(w * factor);
             h = Math.round(h * factor);
          }
          if (Browser.resizeCanvas) {
            if (canvas.width  != w) canvas.width  = w;
            if (canvas.height != h) canvas.height = h;
            if (typeof canvas.style != 'undefined') {
              canvas.style.removeProperty( "width");
              canvas.style.removeProperty("height");
            }
          } else {
            if (canvas.width  != wNative) canvas.width  = wNative;
            if (canvas.height != hNative) canvas.height = hNative;
            if (typeof canvas.style != 'undefined') {
              if (w != wNative || h != hNative) {
                canvas.style.setProperty( "width", w + "px", "important");
                canvas.style.setProperty("height", h + "px", "important");
              } else {
                canvas.style.removeProperty( "width");
                canvas.style.removeProperty("height");
              }
            }
          }
        },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () {
          var handle = Browser.nextWgetRequestHandle;
          Browser.nextWgetRequestHandle++;
          return handle;
        }};
  
  if (typeof module === "object" && module.exports) {
    module['exports'] = Browser;
  };
  