added some performance tweaks and polished up code here and there

This commit is contained in:
Eric Rowell
2012-07-26 22:58:38 -07:00
parent c26a1ae5d5
commit ce3b98ee9c
15 changed files with 489 additions and 167 deletions

View File

@@ -61,8 +61,7 @@ Kinetic.Layer = Kinetic.Container.extend({
*/
draw: function(canvas) {
var throttle = this.attrs.throttle;
var date = new Date();
var time = date.getTime();
var time = new Date().getTime();
var timeDiff = time - this.lastDrawTime;
var tt = 1000 / throttle;
@@ -173,8 +172,7 @@ Kinetic.Layer = Kinetic.Container.extend({
canvas = this.getCanvas();
}
var date = new Date();
var time = date.getTime();
var time = new Date().getTime();
this.lastDrawTime = time;
// before draw handler