Corrected stuff

This commit is contained in:
Thomas FORGIONE 2015-07-17 11:39:42 +02:00
parent b397a18bea
commit f32ffe9b01
2 changed files with 16 additions and 3 deletions

View File

@ -170,4 +170,4 @@ module.exports.clicker = function(req, res, next) {
res.send(result);
});
}
};

View File

@ -19,14 +19,27 @@ var previousTime;
var pointer;
var startCanvas;
function sceneName() {
switch (initMainScene) {
case L3D.initPeach:
return 'L3D.initPeach';
case L3D.initWhomp:
return 'L3D.initWhomp';
case L3D.initBobomb:
return 'L3D.initBobomb';
case L3D.initMountain:
return 'L3D.initMountain';
}
}
saveCoins = function() {
var result = '[';
var result = '{scene: "' + sceneName() + '", coins: [';
for (var i = 0; i < coins.length - 1; i++) {
result += JSON.stringify(coins[i].mesh.position) + ',';
}
result += JSON.stringify(coins[coins.length-1].mesh.position) + ']';
result += JSON.stringify(coins[coins.length-1].mesh.position) + ']}';
var blob = new Blob([result], {type: "text/plain;charset=utf-8"});
saveAs(blob, "coins.js");