Fix missing name and description from v2

This commit is contained in:
Dávid Szabó 2016-08-26 02:00:15 +02:00 committed by Julian Descottes
parent 218c0b511b
commit 502eb1aac4

View File

@ -12,9 +12,10 @@
ns.Deserializer_v2.prototype.deserialize = function (name) {
var data = this.data_;
var piskelData = data.piskel;
name = name || 'Deserialized piskel';
name = piskelData.name || 'Deserialized piskel';
description = piskelData.description || '';
var descriptor = new pskl.model.piskel.Descriptor(name, '');
var descriptor = new pskl.model.piskel.Descriptor(name, description);
this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, descriptor);
this.layersToLoad_ = piskelData.layers.length;