diff --git a/geo/MeshContainer.js b/geo/MeshContainer.js index 29f1afa..5e32ece 100644 --- a/geo/MeshContainer.js +++ b/geo/MeshContainer.js @@ -178,13 +178,17 @@ for (var i = 1; i < 26; i++) { geo.availableMeshes = {}; -for (var name in availableMeshNames) { +function pushMesh(name) { - (function(name) { - geo.availableMeshes[name] = new geo.MeshContainer(name.substring(1, name.length), function() { - availableMeshNames[name] = true; - trySetLoaded(); - }); - })(name); + geo.availableMeshes[name] = new geo.MeshContainer(name.substring(1, name.length), function() { + availableMeshNames[name] = true; + trySetLoaded(); + }); + +} + +for (var name in availableMeshNames) { + + pushMesh(name); } diff --git a/js/l3d/src/utils/List.js b/js/l3d/src/utils/List.js index c1aef1c..2e0cebb 100644 --- a/js/l3d/src/utils/List.js +++ b/js/l3d/src/utils/List.js @@ -349,6 +349,4 @@ utils.Iterator = Iterator; return utils; -console.log("Hello"); - })(); diff --git a/lib/NodeLog.js b/lib/NodeLog.js index 56c288e..09ea208 100644 --- a/lib/NodeLog.js +++ b/lib/NodeLog.js @@ -18,16 +18,16 @@ var log; if (isDev) { log = function(elt, color) { console.log(color + elt + Colors.DEFAULT); - } + }; } else { log = function(elt, color) { console.log(elt); - } + }; } Log.ready = function(msg) { log('[RDY] ' + new Date() + ' ' + msg, Colors.GREEN); -} +}; Log.request = function(req, res) { if (req.headers['x-forwarded-for'] !== undefined || isDev) { @@ -38,7 +38,7 @@ Log.request = function(req, res) { Colors.CYAN ); } -} +}; Log.socket = {}; Log.socket.connection = function(socket) { @@ -47,7 +47,7 @@ Log.socket.connection = function(socket) { socket.handshake.address + ' connection', Colors.YELLOW ); -} +}; Log.socket.disconnect = function(socket) { log( @@ -55,13 +55,13 @@ Log.socket.disconnect = function(socket) { socket.handshake.address + ' disconnect', Colors.YELLOW ); -} +}; Log.dberror = function(error) { log( '[DBE] ' + new Date() + ' ' + error, Colors.RED ); -} +}; module.exports = Log;