mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
initial
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
* @constructor
|
||||
* @param {Number} width
|
||||
* @param {Number} height
|
||||
* @param {String} name
|
||||
* @param {String} description
|
||||
*/
|
||||
ns.Piskel = function (width, height) {
|
||||
if (width && height) {
|
||||
@ -16,6 +18,8 @@
|
||||
|
||||
/** @type {Number} */
|
||||
this.height = height;
|
||||
|
||||
this.descriptor = null;
|
||||
} else {
|
||||
throw 'Missing arguments in Piskel constructor : ' + Array.prototype.join.call(arguments, ",");
|
||||
}
|
||||
@ -96,4 +100,15 @@
|
||||
this.layers.splice(index, 1);
|
||||
};
|
||||
|
||||
ns.Piskel.prototype.getDescriptor = function () {
|
||||
return this.descriptor;
|
||||
};
|
||||
|
||||
ns.Piskel.prototype.setDescriptor = function (name, desc) {
|
||||
this.descriptor = {
|
||||
name : name,
|
||||
description : desc
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
0
js/model/PiskelDescriptor.js
Normal file
0
js/model/PiskelDescriptor.js
Normal file
Reference in New Issue
Block a user