From bdaae5c00e831e7ed6d7085e7dc41ff4d4eeb3cc Mon Sep 17 00:00:00 2001 From: Robin Hawkes Date: Sat, 15 Feb 2014 16:01:38 +0000 Subject: [PATCH] Disabled debug in example and added debug flags to grid output --- examples/index.html | 6 +++--- src/client/City.js | 9 ++++++--- src/client/Grid.js | 9 +++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/index.html b/examples/index.html index 4092ed4..4a9c00d 100644 --- a/examples/index.html +++ b/examples/index.html @@ -24,14 +24,14 @@ diff --git a/src/client/City.js b/src/client/City.js index 365d0a3..8acf3fa 100644 --- a/src/client/City.js +++ b/src/client/City.js @@ -8,7 +8,7 @@ _.extend(this, VIZI.Mediator); // Debug tools - this.dat = new VIZI.Dat(); + this.dat = undefined; this.fps = undefined; this.rendererInfo = undefined; @@ -148,8 +148,11 @@ var startTime = Date.now(); - this.fps = new VIZI.FPS(); - this.rendererInfo = new VIZI.RendererInfo(); + if (VIZI.DEBUG) { + this.dat = new VIZI.Dat(); + this.fps = new VIZI.FPS(); + this.rendererInfo = new VIZI.RendererInfo(); + } VIZI.Log("Finished intialising debug tools in " + (Date.now() - startTime) + "ms"); diff --git a/src/client/Grid.js b/src/client/Grid.js index 50eb91a..0843f7b 100644 --- a/src/client/Grid.js +++ b/src/client/Grid.js @@ -58,10 +58,11 @@ this.boundsHighLonLat = this.getBoundsLonLat(this.boundsHigh); this.boundsLowLonLat = this.getBoundsLonLat(this.boundsLow); - // Create debug model for grid - this.createDebug(); - - this.publish("addToScene", this.gridModel); + if (VIZI.DEBUG) { + // Create debug model for grid + this.createDebug(); + this.publish("addToScene", this.gridModel); + } return Q.fcall(function() {}); };