mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
ongoing : web workers for current colors service
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
5
src/js/worker/HashBuilder.js
Normal file
5
src/js/worker/HashBuilder.js
Normal file
@@ -0,0 +1,5 @@
|
||||
(function () {
|
||||
var ns = $.namespace('pskl.worker');
|
||||
|
||||
ns.HashBuilder = function () {};
|
||||
})();
|
||||
Reference in New Issue
Block a user