ongoing : web workers for current colors service

This commit is contained in:
jdescottes
2015-03-11 18:51:49 +01:00
parent 6254490a23
commit 5cbb9b8664
3 changed files with 9 additions and 3 deletions

View File

@@ -65,7 +65,8 @@
if (cache[cacheKey]) {
processedFrame = cache[cacheKey];
} else {
var frameAsString = pskl.utils.hashCode(JSON.stringify(frame.getPixels()));
var framePixels = JSON.stringify(frame.getPixels());
var frameAsString = pskl.utils.hashCode(framePixels);
if (cache[frameAsString]) {
processedFrame = this.outputCloner(cache[frameAsString], frame);
} else {

View File

@@ -15,8 +15,8 @@
'GRID_WIDTH' : 0,
'MAX_FPS' : 24,
'DEFAULT_SIZE' : {
width : 32,
height : 32
width : Constants.DEFAULT.WIDTH,
height : Constants.DEFAULT.HEIGHT
},
'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background',
'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID,

View File

@@ -0,0 +1,5 @@
(function () {
var ns = $.namespace('pskl.worker');
ns.HashBuilder = function () {};
})();