Fix firefox. Use body.clientHeight, not document.

This commit is contained in:
Tyler Hallada 2017-08-07 22:26:04 -04:00
parent b949ce250f
commit 557d331071

View File

@ -515,8 +515,8 @@ function drawPolygon (polygon, points, counter, tweeningFns) {
/* MAIN LOOP */ /* MAIN LOOP */
function loop () { function loop () {
screenWidth = document.documentElement.clientWidth; screenWidth = document.body.clientWidth;
screenHeight = document.documentElement.clientHeight; screenHeight = document.body.clientHeight;
renderer.resize(screenWidth, screenHeight); renderer.resize(screenWidth, screenHeight);
polygon.clear(); polygon.clear();
@ -613,8 +613,8 @@ function loop () {
} }
function loopStart () { function loopStart () {
screenWidth = document.documentElement.clientWidth; screenWidth = document.body.clientWidth;
screenHeight = document.documentElement.clientHeight; screenHeight = document.body.clientHeight;
// Create the renderer // Create the renderer
renderer = window.PIXI.autoDetectRenderer(screenWidth, screenHeight, {antialias: true, resolution: resolution}); renderer = window.PIXI.autoDetectRenderer(screenWidth, screenHeight, {antialias: true, resolution: resolution});