kopia lustrzana https://github.com/robhawkes/vizicities
				
				
				
			Disabled debug in example and added debug flags to grid output
							rodzic
							
								
									5bb53eb4c3
								
							
						
					
					
						commit
						bdaae5c00e
					
				| 
						 | 
				
			
			@ -24,14 +24,14 @@
 | 
			
		|||
	<script src="../build/vizi.js"></script>
 | 
			
		||||
 | 
			
		||||
	<script>
 | 
			
		||||
		// Enable debug output
 | 
			
		||||
		VIZI.DEBUG = true;
 | 
			
		||||
		// Debug output
 | 
			
		||||
		VIZI.DEBUG = false;
 | 
			
		||||
 | 
			
		||||
		var city = new VIZI.City();
 | 
			
		||||
		city.init({
 | 
			
		||||
			coords: [-0.01924, 51.50358] // Canary Wharf
 | 
			
		||||
			// coords: [-0.1159894466, 51.5045487479] // London Eye
 | 
			
		||||
			// coords: [-73.984762, 40.7516199] // NYC
 | 
			
		||||
			// coords: [-73.984762, 40.7516199] // NYC (performance-heavy)
 | 
			
		||||
		});
 | 
			
		||||
	</script>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() {});
 | 
			
		||||
		};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue