mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added optimizer scripts and some code style improvements
This commit is contained in:
parent
6b472dc134
commit
5f5fec5b10
16 changed files with 397 additions and 36 deletions
|
|
@ -20,12 +20,6 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
|
|||
|
||||
"use strict";
|
||||
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}
|
||||
|
||||
function GameController (options) {
|
||||
|
||||
this.clientIsReady = false;
|
||||
|
|
@ -277,6 +271,12 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
|
|||
|
||||
GameController.prototype.destroy = function() {
|
||||
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}
|
||||
|
||||
cancelAnimationFrame(this.animationRequestId);
|
||||
|
||||
Parent.prototype.destroy.call(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue