Finished first step of refactor.

This commit is contained in:
juliandescottes
2012-09-05 00:09:42 +02:00
parent a567992a1d
commit 1de9ee41b2
6 changed files with 200 additions and 139 deletions

View File

@ -1,5 +1,6 @@
(function () {
var ns = $.namespace("pskl.model");
ns.Frame = function (pixels) {
this.pixels = pixels;
};
@ -30,6 +31,10 @@
return clone;
};
ns.Frame.prototype.serialize = function () {
return JSON.stringify(this.pixels);
};
ns.Frame.prototype.setPixel = function (col, row, color) {
this.pixels[col][row] = color;
};