diff --git a/registration-system/view/signups/game1/js/camera.js b/registration-system/view/signups/game1/js/camera.js index 35af7defa323ab262a0788febfc12ce274c4fbf7..21b4c62fa64b1b8defa3cb8bf5d1b3b07566c782 100644 --- a/registration-system/view/signups/game1/js/camera.js +++ b/registration-system/view/signups/game1/js/camera.js @@ -51,8 +51,9 @@ Camera.prototype.updatePosition = function() { var translation = Vec.add(Vec.flipSign(this.translation), Vec.mul(Game.config.size, 0.5)); // move subject to center if(translation[0] > 0) translation[0] = 0; if(translation[1] > 0) translation[1] = 0; - if(translation[0] < (Game.config.size[0] - svg.clientWidth)) translation[0] = Game.config.size[0] - svg.clientWidth; - if(translation[1] < (Game.config.size[1] - svg.clientHeight)) translation[1] = Game.config.size[1] - svg.clientHeight; + // @TODO: rework for firefox + //if(translation[0] < (Game.config.size[0] - svg.clientWidth)) translation[0] = Game.config.size[0] - svg.clientWidth; + //if(translation[1] < (Game.config.size[1] - svg.clientHeight)) translation[1] = Game.config.size[1] - svg.clientHeight; root.style.left = translation[0]+'px'; root.style.top = translation[1]+'px'; }; diff --git a/registration-system/view/signups/game1/js/game.js b/registration-system/view/signups/game1/js/game.js index 01bf81fe5f88621652d0f0ddc1f1c48df6af22f1..cab3cf2d2c28d946b7fc34a450d53b3ace902368 100644 --- a/registration-system/view/signups/game1/js/game.js +++ b/registration-system/view/signups/game1/js/game.js @@ -77,12 +77,12 @@ Game.prototype.loadMap = function(map) { // test animation - var ship = svg.select("#shipGroup"); + /*var ship = svg.select("#shipGroup"); ship .attr("transform", function(d,i) { return "translate(200,000)"; }); ship.transition() .duration(3000) - .attr("transform", function(d,i) { return "translate(0,0)"; }); + .attr("transform", function(d,i) { return "translate(0,0)"; });*/ done(); }); @@ -113,7 +113,7 @@ Game.prototype.loadMap = function(map) { function startMainLoop(){ Game.mainLoop = setInterval(function() { - if (Game.char.loaded) { + if (Game.char && Game.char.loaded) { // move player Game.char.physics(); Game.char.animate();