mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user