Update preview/js/frameSheetModel.js

This commit is contained in:
Julian Descottes 2012-08-28 15:36:51 +03:00
parent 051bbff20f
commit c1828a1a70

View File

@ -1,4 +1,3 @@
var FrameSheetModel = (function() { var FrameSheetModel = (function() {
var inst; var inst;
@ -16,8 +15,8 @@ var FrameSheetModel = (function() {
var serializeFrame_ = function (frame) { var serializeFrame_ = function (frame) {
var buffer = []; var buffer = [];
var serializedLine = "";
for (var i = 0 ; i < frame.length ; i++) { for (var i = 0 ; i < frame.length ; i++) {
var serializedLine = "";
for(var j = 0 ; j < frame[i].length ; j++) { for(var j = 0 ; j < frame[i].length ; j++) {
if (typeof frame[i][j] == 'undefined' || frame[i][j] == 'tc') { if (typeof frame[i][j] == 'undefined' || frame[i][j] == 'tc') {
serializedLine += "0" serializedLine += "0"
@ -25,11 +24,7 @@ var FrameSheetModel = (function() {
serializedLine += "1" serializedLine += "1"
} }
} }
if (i%2 == 1) {
console.log(i);
buffer.push(parseInt(serializedLine, 2).toString(36)); buffer.push(parseInt(serializedLine, 2).toString(36));
serializedLine = "";
}
} }
return buffer.join(","); return buffer.join(",");