fix : reduce piskel model size : ImportController

+ ImportController is no longer relying on the deserializer to build a
  piskel instance
+ Static builders have been added to Piskel and Layer to help easily
  create new instances from existing elements
This commit is contained in:
jdescottes
2013-11-14 23:03:29 +01:00
parent e9a2ccfd1d
commit 4a1a7b6c2b
7 changed files with 228 additions and 59 deletions

View File

@@ -41,9 +41,7 @@
var frames = pskl.utils.LayerUtils.createFromImage(image, layerData.frameCount);
// 6 - add each image to the layer
frames.forEach(function (frame) {
layer.addFrame(pskl.model.Frame.fromPixelGrid(frame));
});
frames.forEach(layer.addFrame.bind(layer));
this.onLayerLoaded_();
}.bind(this);