Animation pauses when FPS slider at 0FPS + slight perf improvement

This commit is contained in:
jdescottes
2014-12-18 23:57:34 +01:00
parent e1ba57c92f
commit 1402394d07
7 changed files with 72 additions and 31 deletions

View File

@@ -164,13 +164,6 @@
}
};
ns.FrameRenderer.prototype.renderPixel_ = function (color, x, y, context) {
if(color != Constants.TRANSPARENT_COLOR) {
context.fillStyle = color;
context.fillRect(x, y, 1, 1);
}
};
/**
* Transform a screen pixel-based coordinate (relative to the top-left corner of the rendered
* frame) into a sprite coordinate in column and row.
@@ -264,4 +257,11 @@
}
displayContext.restore();
};
ns.FrameRenderer.prototype.renderPixel_ = function (color, x, y, context) {
if(color != Constants.TRANSPARENT_COLOR) {
context.fillStyle = color;
context.fillRect(x, y, 1, 1);
}
};
})();