This commit is contained in:
jdescottes 2013-10-04 23:55:45 +02:00
parent 5502d75ca5
commit 17a147c880

View File

@ -37,7 +37,7 @@
piskel.addLayer(layer); piskel.addLayer(layer);
}); });
} else { } else {
piskel = pskl.utils.Serializer.__backwardDeserializer(data); piskel = pskl.utils.Serializer.backwardDeserializer_(data);
} }
return piskel; return piskel;
@ -63,7 +63,7 @@
/** /**
* Deserialize old piskel framesheets. Initially piskels were stored as arrays of frames : "[[pixelGrid],[pixelGrid],[pixelGrid]]". * Deserialize old piskel framesheets. Initially piskels were stored as arrays of frames : "[[pixelGrid],[pixelGrid],[pixelGrid]]".
*/ */
__backwardDeserializer : function (frames) { backwardDeserializer_ : function (frames) {
var layer = new pskl.model.Layer('Layer 1'); var layer = new pskl.model.Layer('Layer 1');
frames.forEach(function (frame) { frames.forEach(function (frame) {
layer.addFrame(pskl.model.Frame.fromPixelGrid(frame)); layer.addFrame(pskl.model.Frame.fromPixelGrid(frame));