Skip to content

Commit

Permalink
switch to version 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bjost2s committed Sep 23, 2015
2 parents e020151 + 42c1b33 commit 4571d22
Showing 1 changed file with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,16 @@ var SIM = (function() {
output.right = right * MAXPOWER || 0;

robot.led.mode = output.ledMode = LIGHT.getMode() || "OFF";
<<<<<<< HEAD
if (LIGHT.getMode() && LIGHT.getMode() == "OFF") {
robot.led.color = output.led = "#dddddd"; // = led off
} else {
robot.led.color = output.led = LIGHT.getColor();
}
=======
if (LIGHT.getMode() && LIGHT.getMode() == "OFF"){robot.led.color = output.led = "#dddddd"; // = led off
} else {robot.led.color = output.led = LIGHT.getColor();}
>>>>>>> 42c1b33c2760dfd6350113939dffefa669b4ce48
}

function setObstacle() {
Expand Down Expand Up @@ -359,6 +364,10 @@ var SIM = (function() {
scene.playground.h = $(window).height() - offsetY;
var oldScale = scale;
scale = 1;
<<<<<<< HEAD
=======
//LOG.info($(window).width());
>>>>>>> 42c1b33c2760dfd6350113939dffefa669b4ce48
if ($(window).width() < 768) {// extra small devices
scale = 0.5
} else if ($(window).width() < 1024) {// medium and large devices
Expand All @@ -371,10 +380,10 @@ var SIM = (function() {
ground.w = scene.playground.w / scale;
ground.h = scene.playground.h / scale;
// MAXDIAG = Math.sqrt(SIMATH.sqr(ground.w) + SIMATH.sqr(ground.h));
if (oldScale != scale) {
scene.updateBackgrounds();
scene.drawObjects();
}
// if (oldScale != scale) {
scene.updateBackgrounds();
scene.drawObjects();
// }
}
}

Expand Down Expand Up @@ -513,6 +522,7 @@ var SIM = (function() {
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
}

<<<<<<< HEAD
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
Expand All @@ -530,4 +540,19 @@ var SIM = (function() {
clearTimeout(id);
};
}
=======
if (!window.requestAnimationFrame){window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
};}

if (!window.cancelAnimationFrame){window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};}
>>>>>>> 42c1b33c2760dfd6350113939dffefa669b4ce48
}());

0 comments on commit 4571d22

Please sign in to comment.