'
+ '
'
@@ -24,16 +24,16 @@ var UIControlCompass = function(ui, visible) {
+ '
', visible);
- var compass = this.control.getElement("vts-compass");
+ var compass = this.control.getElement('vts-compass');
compass.setDraggableState(true);
- compass.on("drag", this.onDrag.bind(this));
- compass.on("dblclick", this.onDoubleClick.bind(this));
+ compass.on('drag', this.onDrag.bind(this));
+ compass.on('dblclick', this.onDoubleClick.bind(this));
- this.image = this.control.getElement("vts-compass-compass");
- this.image2 = this.control.getElement("vts-compass-compass2");
- this.image3 = this.control.getElement("vts-compass-compass3");
+ this.image = this.control.getElement('vts-compass-compass');
+ this.image2 = this.control.getElement('vts-compass-compass2');
+ this.image3 = this.control.getElement('vts-compass-compass3');
- this.lastStyle = "";
+ this.lastStyle = '';
};
@@ -45,7 +45,7 @@ UIControlCompass.prototype.update = function() {
var pos = map.getPosition();
var orientation = pos.getOrientation();
- var value = "rotateX("+(Math.round(orientation[1]+90)*0.7)+"deg) " + "rotateZ("+Math.round(-orientation[0]-45)+"deg)";
+ var value = 'rotateX('+(Math.round(orientation[1]+90)*0.7)+'deg) ' + 'rotateZ('+Math.round(-orientation[0]-45)+'deg)';
if (value != this.lastStyle) {
this.lastStyle = value;
@@ -69,7 +69,7 @@ UIControlCompass.prototype.onDrag = function(event) {
if (controller.orientationDeltas) {
controller.orientationDeltas.push([delta[0] * sensitivity,
- -delta[1] * sensitivity, 0]);
+ -delta[1] * sensitivity, 0]);
}
};
diff --git a/src/browser/ui/control/credits.js b/src/browser/ui/control/credits.js
index aea848cf..41c4d0d2 100755
--- a/src/browser/ui/control/credits.js
+++ b/src/browser/ui/control/credits.js
@@ -2,31 +2,31 @@
var UIControlCredits = function(ui, visible) {
this.ui = ui;
this.browser = ui.browser;
- this.control = this.ui.addControl("credits",
+ this.control = this.ui.addControl('credits',
'
'
+ '
', visible);
- this.lastHTML = "";
- this.lastHTML2 = "";
- this.lastHTML3 = "";
- this.credits = this.control.getElement("vts-credits");
+ this.lastHTML = '';
+ this.lastHTML2 = '';
+ this.lastHTML3 = '';
+ this.credits = this.control.getElement('vts-credits');
};
UIControlCredits.prototype.getCreditsString = function(array, separator, full) {
var map = this.browser.getMap();
- var html = "";
- var copyright = "©" + (new Date().getFullYear());
+ var html = '';
+ var copyright = '©' + (new Date().getFullYear());
var li = array.length;
- var plain = "";
+ var plain = '';
var more = false;
for (var i = 0; i < li; i++) {
var creditInfo = map.getCreditInfo(array[i]);
- if (creditInfo["plain"]) {
- plain += creditInfo["plain"];
+ if (creditInfo['plain']) {
+ plain += creditInfo['plain'];
}
}
@@ -38,8 +38,8 @@ UIControlCredits.prototype.getCreditsString = function(array, separator, full) {
for (var i = 0; i < li; i++) {
var creditInfo = map.getCreditInfo(array[i]);
- if (creditInfo["html"]) {
- html += creditInfo["html"];
+ if (creditInfo['html']) {
+ html += creditInfo['html'];
}
if (i + 1 < li) {
@@ -57,50 +57,50 @@ UIControlCredits.prototype.update = function() {
return;
}
- var html = "";
- var html2 = "";
- var html3 = "";
+ var html = '';
+ var html2 = '';
+ var html3 = '';
var credits = map.getCurrentCredits();
- if (credits["imagery"].length > 0) {
- var res = this.getCreditsString(credits["imagery"], ", ");
- html += "
";
- html += "
Imagery: " + res[0] + "
";
- html += res[1] ? "
and others
" : "";
- html += "
";
- html += "
";
- var html2 = "
";
- html2 += this.getCreditsString(credits["imagery"], "
", true)[0] + "
";
+ if (credits['imagery'].length > 0) {
+ var res = this.getCreditsString(credits['imagery'], ', ');
+ html += '
';
+ html += '
Imagery: ' + res[0] + '
';
+ html += res[1] ? '
and others
' : '';
+ html += '
';
+ html += '
';
+ var html2 = '
';
+ html2 += this.getCreditsString(credits['imagery'], '
', true)[0] + '
';
}
- if (credits["mapdata"].length > 0) {
- var res = this.getCreditsString(credits["mapdata"], ", ");
- html += "
";
- html += "
Map Data: " + res[0] + "
";
- html += res[1] ? "
and others
" : "";
- html += "
";
- html += "
";
- var html3 = "
";
- html3 += this.getCreditsString(credits["mapdata"], "
", true)[0] + "
";
+ if (credits['mapdata'].length > 0) {
+ var res = this.getCreditsString(credits['mapdata'], ', ');
+ html += '
';
+ html += '
Map Data: ' + res[0] + '
';
+ html += res[1] ? '
and others
' : '';
+ html += '
';
+ html += '
';
+ var html3 = '
';
+ html3 += this.getCreditsString(credits['mapdata'], '
', true)[0] + '
';
}
- html += "
";
- html += "
";
- html += "
";
- html += "
";
+ html += '
';
+ html += '
';
+ html += '
';
+ html += '
';
if (this.lastHTML != html) {
this.lastHTML = html;
this.credits.setHtml(html);
- var butt = this.control.getElement("vts-credits-imagery-more");
+ var butt = this.control.getElement('vts-credits-imagery-more');
if (butt) {
- butt.on("click", this.onMoreButton.bind(this, butt, "2"));
+ butt.on('click', this.onMoreButton.bind(this, butt, '2'));
}
- butt = this.control.getElement("vts-credits-mapdata-more");
+ butt = this.control.getElement('vts-credits-mapdata-more');
if (butt) {
- butt.on("click", this.onMoreButton.bind(this, butt, "3"));
+ butt.on('click', this.onMoreButton.bind(this, butt, '3'));
}
}
@@ -127,14 +127,14 @@ UIControlCredits.prototype.update = function() {
UIControlCredits.prototype.onMoreButton = function(butt, html) {
var rect = butt.getRect();
- if (html == "2") {
+ if (html == '2') {
html = this.lastHTML2;
} else {
html = this.lastHTML3;
}
- this.ui.popup.show({"right" : Math.max(0,(rect["fromRight"]-rect["width"])) + "px",
- "bottom" : (rect["fromBottom"]+7) + "px"}, html);
+ this.ui.popup.show({'right' : Math.max(0,(rect['fromRight']-rect['width'])) + 'px',
+ 'bottom' : (rect['fromBottom']+7) + 'px'}, html);
};
diff --git a/src/browser/ui/control/fallback.js b/src/browser/ui/control/fallback.js
index f6690922..3f98ba29 100755
--- a/src/browser/ui/control/fallback.js
+++ b/src/browser/ui/control/fallback.js
@@ -2,7 +2,7 @@
var UIControlFallback = function(ui, visible) {
this.ui = ui;
- this.control = this.ui.addControl("fallback",
+ this.control = this.ui.addControl('fallback',
'
'
+ '
'
diff --git a/src/browser/ui/control/fullscreen.js b/src/browser/ui/control/fullscreen.js
index b1c9dc45..4e17857e 100755
--- a/src/browser/ui/control/fullscreen.js
+++ b/src/browser/ui/control/fullscreen.js
@@ -7,13 +7,13 @@ var dom = Dom_;
var UIControlFullscreen = function(ui, visible) {
this.ui = ui;
- this.control = this.ui.addControl("fullscreen",
+ this.control = this.ui.addControl('fullscreen',
'
'
, visible);
- var img = this.control.getElement("vts-fullscreen");
- img.on("click", this.onClick.bind(this));
- img.on("dblclick", this.onDoNothing.bind(this));
+ var img = this.control.getElement('vts-fullscreen');
+ img.on('click', this.onClick.bind(this));
+ img.on('dblclick', this.onDoNothing.bind(this));
this.enabled = false;
};
diff --git a/src/browser/ui/control/holder.js b/src/browser/ui/control/holder.js
index bab8d73e..781eafc4 100755
--- a/src/browser/ui/control/holder.js
+++ b/src/browser/ui/control/holder.js
@@ -12,7 +12,7 @@ var UIControlHolder = function(ui, html, visible, parentElement) {
this.visible = (visible != null) ? visible : true;
//create holder element
- this.element = document.createElement("div");
+ this.element = document.createElement('div');
this.setVisible(this.visible);
//set element content
@@ -34,7 +34,7 @@ UIControlHolder.prototype.setHtml = function(html) {
//store all elements with id attribute to the table
for (var i = 0, li = allElements.length; i < li; i++) {
- var id = allElements[i].getAttribute("id");
+ var id = allElements[i].getAttribute('id');
if (id !== null) {
//store element to the table
@@ -50,7 +50,7 @@ UIControlHolder.prototype.getElement = function(id) {
UIControlHolder.prototype.setVisible = function(state) {
- this.element.style.display = state ? "block" : "none";
+ this.element.style.display = state ? 'block' : 'none';
this.visible = state;
};
diff --git a/src/browser/ui/control/layers.js b/src/browser/ui/control/layers.js
index 33488ab2..f9bb0aeb 100755
--- a/src/browser/ui/control/layers.js
+++ b/src/browser/ui/control/layers.js
@@ -1,7 +1,7 @@
var UIControlLayers = function(ui, visible) {
this.ui = ui;
- this.control = this.ui.addControl("layers",
+ this.control = this.ui.addControl('layers',
'
', visible);
};
diff --git a/src/browser/ui/control/link.js b/src/browser/ui/control/link.js
index bdc5702f..b8080ae4 100755
--- a/src/browser/ui/control/link.js
+++ b/src/browser/ui/control/link.js
@@ -8,7 +8,7 @@ var dom = Dom_;
var UIControlLink = function(ui, visible) {
this.ui = ui;
this.browser = ui.browser;
- this.control = this.ui.addControl("link",
+ this.control = this.ui.addControl('link',
'
'
+ '
'
@@ -23,14 +23,14 @@ var UIControlLink = function(ui, visible) {
+ '
', visible);
- this.div = this.control.getElement("vts-link");
+ this.div = this.control.getElement('vts-link');
- var button = this.control.getElement("vts-link-button");
- button.on("click", this.onSwitch.bind(this));
- button.on("dblclick", this.onDoNothing.bind(this));
+ var button = this.control.getElement('vts-link-button');
+ button.on('click', this.onSwitch.bind(this));
+ button.on('dblclick', this.onDoNothing.bind(this));
- this.linkPanel = this.control.getElement("vts-link-text-holder");
- this.link = this.control.getElement("vts-link-text-input");
+ this.linkPanel = this.control.getElement('vts-link-text-holder');
+ this.link = this.control.getElement('vts-link-text-input');
this.linkVisible = false;
this.update();
@@ -50,13 +50,13 @@ UIControlLink.prototype.onSwitch = function() {
UIControlLink.prototype.update = function() {
- var button = this.control.getElement("vts-link-button");
+ var button = this.control.getElement('vts-link-button');
var left = 10 + (this.ui.config.controlZoom ? 70 : 0) +
(this.ui.config.controlSpace ? 35 : 0);
- this.div.setStyle("left", left + "px");
- this.linkPanel.setStyle("display", this.linkVisible ? "block" : "none");
+ this.div.setStyle('left', left + 'px');
+ this.linkPanel.setStyle('display', this.linkVisible ? 'block' : 'none');
};
diff --git a/src/browser/ui/control/loading.js b/src/browser/ui/control/loading.js
index 4c7a38d5..499aa5b5 100755
--- a/src/browser/ui/control/loading.js
+++ b/src/browser/ui/control/loading.js
@@ -1,7 +1,7 @@
var UIControlLoading = function(ui, visible) {
this.ui = ui;
- this.control = this.ui.addControl("loading",
+ this.control = this.ui.addControl('loading',
'
'
+ '
'
@@ -14,13 +14,13 @@ var UIControlLoading = function(ui, visible) {
+ '
', visible);
- this.loading = this.control.getElement("vts-loading");
+ this.loading = this.control.getElement('vts-loading');
this.dots = [
- this.control.getElement("vts-loading-dot1"),
- this.control.getElement("vts-loading-dot2"),
- this.control.getElement("vts-loading-dot3"),
- this.control.getElement("vts-loading-dot4"),
- this.control.getElement("vts-loading-dot5")
+ this.control.getElement('vts-loading-dot1'),
+ this.control.getElement('vts-loading-dot2'),
+ this.control.getElement('vts-loading-dot3'),
+ this.control.getElement('vts-loading-dot4'),
+ this.control.getElement('vts-loading-dot5')
];
this.time = Date.now();
@@ -32,14 +32,14 @@ var UIControlLoading = function(ui, visible) {
UIControlLoading.prototype.show = function() {
this.hiding = null;
- this.ui.setControlVisible("compass", false);
- this.ui.setControlVisible("zoom", false);
- this.ui.setControlVisible("space", false);
- this.ui.setControlVisible("search", false);
- this.ui.setControlVisible("link", false);
- this.ui.setControlVisible("fullscreen", false);
- this.ui.setControlVisible("credits", false);
- this.ui.setControlVisible("loading", true);
+ this.ui.setControlVisible('compass', false);
+ this.ui.setControlVisible('zoom', false);
+ this.ui.setControlVisible('space', false);
+ this.ui.setControlVisible('search', false);
+ this.ui.setControlVisible('link', false);
+ this.ui.setControlVisible('fullscreen', false);
+ this.ui.setControlVisible('credits', false);
+ this.ui.setControlVisible('loading', true);
};
@@ -52,7 +52,7 @@ UIControlLoading.prototype.hide = function() {
if (map) {
//search = (map.getReferenceFrame()["id"] == "melown2015");
- var radius = map.getSrsInfo(map.getReferenceFrame()["physicalSrs"])["a"];
+ var radius = map.getSrsInfo(map.getReferenceFrame()['physicalSrs'])['a'];
if (radius < (6378137 + 50000) && radius > (6378137 - 50000)) { //is it earth
search = true;
@@ -63,14 +63,14 @@ UIControlLoading.prototype.hide = function() {
}
}
- this.ui.setControlVisible("compass", this.ui.config.controlCompass);
- this.ui.setControlVisible("zoom", this.ui.config.controlZoom);
- this.ui.setControlVisible("space", this.ui.config.controlSpace);
- this.ui.setControlVisible("search", search);
- this.ui.setControlVisible("link", this.ui.config.controlLink);
- this.ui.setControlVisible("fullscreen", this.ui.config.controlFullscreen);
- this.ui.setControlVisible("credits", this.ui.config.controlCredits);
- this.ui.setControlVisible("loading", false);
+ this.ui.setControlVisible('compass', this.ui.config.controlCompass);
+ this.ui.setControlVisible('zoom', this.ui.config.controlZoom);
+ this.ui.setControlVisible('space', this.ui.config.controlSpace);
+ this.ui.setControlVisible('search', search);
+ this.ui.setControlVisible('link', this.ui.config.controlLink);
+ this.ui.setControlVisible('fullscreen', this.ui.config.controlFullscreen);
+ this.ui.setControlVisible('credits', this.ui.config.controlCredits);
+ this.ui.setControlVisible('loading', false);
};
@@ -79,7 +79,7 @@ UIControlLoading.prototype.update = function() {
if (this.hiding) {
var timeDelta = (timer - this.hiding) * 0.001;
- this.loading.setStyle("opacity", (1-Math.min(1.0, timeDelta*2)) + "" );
+ this.loading.setStyle('opacity', (1-Math.min(1.0, timeDelta*2)) + '' );
if (timeDelta > 0.5) {
this.control.setVisible(false);
@@ -98,7 +98,7 @@ UIControlLoading.prototype.update = function() {
//opacity
for (var i = 0; i < 5; i++) {
//this.dots[i].setStyle("opacity", (Math.sin(((Math.PI*1.5)/5)*i+timeDelta*Math.PI*2)*60+20)+"%");
- this.dots[i].setStyle("opacity", (Math.sin(((Math.PI*1.5)/5)*i-timeDelta*Math.PI*2)*0.6+0.2));
+ this.dots[i].setStyle('opacity', (Math.sin(((Math.PI*1.5)/5)*i-timeDelta*Math.PI*2)*0.6+0.2));
}
var map = this.ui.browser.getMap();
@@ -112,10 +112,10 @@ UIControlLoading.prototype.update = function() {
//"bestGeodataTexelSize" : this.map.bestGeodataTexelSize,
//console.log("drawnTiles: " + stats["drawnTiles"] + " geodata: " + stats["drawnGeodataTiles"]);
- if ((stats["surfaces"] == 0 && stats["freeLayers"] == 0) || //nothing to load
- (stats["downloading"] == 0 && stats["lastDownload"] > 0 && (timer - stats["lastDownload"]) > 1000) || //or everything loaded
- (stats["bestMeshTexelSize"] != 0 && stats["bestMeshTexelSize"] <= (stats["texelSizeFit"] * 3) || //or resolution is good enough
- (stats["loadMode"] == "fit" || stats["loadMode"] == "fitonly") && (stats["drawnTiles"] - stats["drawnGeodataTiles"]) > 1) ) { //or at leas some tiles are loaded
+ if ((stats['surfaces'] == 0 && stats['freeLayers'] == 0) || //nothing to load
+ (stats['downloading'] == 0 && stats['lastDownload'] > 0 && (timer - stats['lastDownload']) > 1000) || //or everything loaded
+ (stats['bestMeshTexelSize'] != 0 && stats['bestMeshTexelSize'] <= (stats['texelSizeFit'] * 3) || //or resolution is good enough
+ (stats['loadMode'] == 'fit' || stats['loadMode'] == 'fitonly') && (stats['drawnTiles'] - stats['drawnGeodataTiles']) > 1) ) { //or at leas some tiles are loaded
this.hide();
}
};
diff --git a/src/browser/ui/control/map.js b/src/browser/ui/control/map.js
index 797745d0..c4abe44a 100755
--- a/src/browser/ui/control/map.js
+++ b/src/browser/ui/control/map.js
@@ -2,7 +2,7 @@
var UIControlMap = function(ui, visible) {
this.ui = ui;
this.browser = ui.browser;
- this.control = this.ui.addControl("map",
+ this.control = this.ui.addControl('map',
'
'
+ '
');
@@ -13,7 +13,7 @@ var UIControlMap = function(ui, visible) {
UIControlMap.prototype.getMapElement = function() {
- return this.control.getElement("vts-map");
+ return this.control.getElement('vts-map');
};
diff --git a/src/browser/ui/control/popup.js b/src/browser/ui/control/popup.js
index 58dc6b6a..60d8b363 100755
--- a/src/browser/ui/control/popup.js
+++ b/src/browser/ui/control/popup.js
@@ -2,15 +2,15 @@
var UIControlPopup = function(ui, visible) {
this.ui = ui;
this.browser = ui.browser;
- this.control = this.ui.addControl("popup",
+ this.control = this.ui.addControl('popup',
'';
}
- document.getElementById("vts-graphs-info").innerHTML = str;
+ document.getElementById('vts-graphs-info').innerHTML = str;
var width = this.canvasCache.width;
var height = this.canvasCache.height;
@@ -378,7 +378,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
ctx.clearRect(0, 0, width, height);
switch (this.graph) {
- case "Cache":
+ case 'Cache':
{
var factorY = height / ((map.gpuCache.maxCost+map.resourcesCache.maxCost+map.metatileCache.maxCost));
@@ -410,63 +410,63 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
index %= samples;
var value = valuesMetatiles[index] + valuesMeshes[index] + valuesTextures[index] + valuesGeodata[index] + valuesResources[index];
- ctx.fillStyle="#000000";
+ ctx.fillStyle='#000000';
ctx.fillRect(i*factorX, height, 1, -(value)*factorY);
value -= valuesResources[index];
- ctx.fillStyle="#0000ff";
+ ctx.fillStyle='#0000ff';
ctx.fillRect(i*factorX, height, 1, -(value)*factorY);
value -= valuesTextures[index];
- ctx.fillStyle="#009999";
+ ctx.fillStyle='#009999';
ctx.fillRect(i*factorX, height, 1, -(value)*factorY);
value -= valuesGeodata[index];
- ctx.fillStyle="#007700";
+ ctx.fillStyle='#007700';
ctx.fillRect(i*factorX, height, 1, -(value)*factorY);
value -= valuesMeshes[index];
- ctx.fillStyle="#ff0000";
+ ctx.fillStyle='#ff0000';
ctx.fillRect(i*factorX, height, 1, -(value)*factorY);
value = valuesGpu[index];
- ctx.fillStyle="#ffff00";
+ ctx.fillStyle='#ffff00';
ctx.fillRect(i*factorX, height -(value)*factorY, 1, 1);
}
if (this.showCursor == true) {
var index = (this.cursorIndex + samplesIndex) % samples;
- var str = '
◼ Total: ' + Math.ceil((valuesMetatiles[index] + valuesResources[index] + valuesTextures[index] + valuesMeshes[index])/(1024*1024)) + "MB" +
- '  
◼ CPU: ' + Math.ceil(valuesResources[index]/(1024*1024)) + "MB" +
- '  
◼ GPU: ' + Math.ceil((valuesTextures[index] + valuesMeshes[index])/(1024*1024)) + "MB" +
- '  
◼ Te: ' + Math.ceil(valuesTextures[index]/(1024*1024)) + "MB" +
- '  
◼ Me: ' + Math.ceil(valuesMeshes[index]/(1024*1024)) + "MB" +
- '  
◼ Ge: ' + Math.ceil(valuesGeodata[index]/(1024*1024)) + "MB" +
- '  
◼ Met: ' + Math.ceil(valuesMetatiles[index]/(1024*1024)) + "MB" +
- '  
◼ Render: ' + Math.ceil(valuesGpu[index]/(1024*1024)) + "MB" +'
';
+ var str = '
◼ Total: ' + Math.ceil((valuesMetatiles[index] + valuesResources[index] + valuesTextures[index] + valuesMeshes[index])/(1024*1024)) + 'MB' +
+ '  
◼ CPU: ' + Math.ceil(valuesResources[index]/(1024*1024)) + 'MB' +
+ '  
◼ GPU: ' + Math.ceil((valuesTextures[index] + valuesMeshes[index])/(1024*1024)) + 'MB' +
+ '  
◼ Te: ' + Math.ceil(valuesTextures[index]/(1024*1024)) + 'MB' +
+ '  
◼ Me: ' + Math.ceil(valuesMeshes[index]/(1024*1024)) + 'MB' +
+ '  
◼ Ge: ' + Math.ceil(valuesGeodata[index]/(1024*1024)) + 'MB' +
+ '  
◼ Met: ' + Math.ceil(valuesMetatiles[index]/(1024*1024)) + 'MB' +
+ '  
◼ Render: ' + Math.ceil(valuesGpu[index]/(1024*1024)) + 'MB' +'
';
} else {
- var str = '
◼ Total: ' + Math.round((maxMetatiles + maxResources + maxTextures + maxMeshes)/(1024*1024)) + "MB" +
- '  
◼ CPU: ' + Math.ceil(maxResources/(1024*1024)) + "MB" +
- '  
◼ GPU: ' + Math.ceil((maxTextures + maxMeshes)/(1024*1024)) + "MB" +
- '  
◼ Te ' + Math.ceil(maxTextures/(1024*1024)) + "MB" +
- '  
◼ Me: ' + Math.ceil(maxMeshes/(1024*1024)) + "MB" +
- '  
◼ Ge: ' + Math.ceil(maxGeodata/(1024*1024)) + "MB" +
- '  
◼ Met: ' + Math.ceil(maxMetatiles/(1024*1024)) + "MB" +
- '  
◼ Render: ' + Math.ceil(maxGpu/(1024*1024)) + "MB" +'
';
+ var str = '
◼ Total: ' + Math.round((maxMetatiles + maxResources + maxTextures + maxMeshes)/(1024*1024)) + 'MB' +
+ '  
◼ CPU: ' + Math.ceil(maxResources/(1024*1024)) + 'MB' +
+ '  
◼ GPU: ' + Math.ceil((maxTextures + maxMeshes)/(1024*1024)) + 'MB' +
+ '  
◼ Te ' + Math.ceil(maxTextures/(1024*1024)) + 'MB' +
+ '  
◼ Me: ' + Math.ceil(maxMeshes/(1024*1024)) + 'MB' +
+ '  
◼ Ge: ' + Math.ceil(maxGeodata/(1024*1024)) + 'MB' +
+ '  
◼ Met: ' + Math.ceil(maxMetatiles/(1024*1024)) + 'MB' +
+ '  
◼ Render: ' + Math.ceil(maxGpu/(1024*1024)) + 'MB' +'
';
}
}
break;
- case "Polygons":
- case "Processing":
+ case 'Polygons':
+ case 'Processing':
{
var max = 0;
var min = 99999999999;
var total = 0;
var realCount = 0;
- var values = (this.graph == "Polygons") ? stats.graphsPolygons : stats.graphsBuild;
+ var values = (this.graph == 'Polygons') ? stats.graphsPolygons : stats.graphsBuild;
for (var i = 0; i < samples; i++) {
max = values[i] > max ? values[i] : max;
@@ -484,7 +484,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
var index = samplesIndex + i;
index %= samples;
- ctx.fillStyle="#007700";
+ ctx.fillStyle='#007700';
ctx.fillRect(i*factorX, height, 1, -(values[index])*factorY);
}
@@ -500,7 +500,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
break;
- case "LODs":
+ case 'LODs':
{
var max = 0;
var values = stats.graphsLODs;
@@ -511,7 +511,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
var factorY = height / max;
- ctx.fillStyle="#000000";
+ ctx.fillStyle='#000000';
ctx.fillRect(0, 0, width, height);
for (var i = 0; i < samples; i++) {
@@ -527,7 +527,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
for (var j = 0, lj = lods.length; j < lj; j++) {
if (lods[j]) {
- ctx.fillStyle="hsl("+((j*23)%360)+",100%,50%)";
+ ctx.fillStyle='hsl('+((j*23)%360)+',100%,50%)';
var value = Math.round((lods[j])*factorY);
ctx.fillRect(i*factorX, y, 1, -value);
y -= value;
@@ -539,7 +539,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
if (this.showCursor) {
var index = (this.cursorIndex + samplesIndex) % samples;
- var str = "LODs:" + values[index][0];
+ var str = 'LODs:' + values[index][0];
var lods = values[index][1];
for (var j = 0, lj = lods.length; j < lj; j++) {
@@ -549,14 +549,14 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
}
} else {
- var str = "LODs:" + values[index][0];
+ var str = 'LODs:' + values[index][0];
}
str += '
';
}
break;
- case "Flux":
+ case 'Flux':
{
var maxCount = 0;
var maxSize = 0;
@@ -622,7 +622,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
var y2Up = base2;
var y2Down = base2+1;
- ctx.fillStyle="#0000aa";
+ ctx.fillStyle='#0000aa';
ctx.fillRect(i*factorX, y1Up, 1, -(valuesTextures[index][0][0])*factorY);
ctx.fillRect(i*factorX, y1Down, 1, (valuesTextures[index][1][0])*factorY);
@@ -634,7 +634,7 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
y2Up -= (valuesTextures[index][0][1])*factorY2;
y2Down += (valuesTextures[index][1][1])*factorY2;
- ctx.fillStyle="#007700";
+ ctx.fillStyle='#007700';
ctx.fillRect(i*factorX, y1Up, 1, -(valuesMeshes[index][0][0])*factorY);
ctx.fillRect(i*factorX, y1Down, 1, (valuesMeshes[index][1][0])*factorY);
@@ -646,16 +646,16 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
y2Up -= (valuesMeshes[index][0][1])*factorY2;
y2Down += (valuesMeshes[index][1][1])*factorY2;
- ctx.fillStyle="#009999";
+ ctx.fillStyle='#009999';
ctx.fillRect(i*factorX, y1Up, 1, -(valuesGeodata[index][0][0])*factorY);
ctx.fillRect(i*factorX, y1Down, 1, (valuesGeodata[index][1][0])*factorY);
ctx.fillRect(i*factorX, y2Up, 1, -(valuesGeodata[index][0][1])*factorY2);
ctx.fillRect(i*factorX, y2Down, 1, (valuesGeodata[index][1][1])*factorY2);
- ctx.fillStyle="#aaaaaa";
+ ctx.fillStyle='#aaaaaa';
ctx.fillRect(0, Math.floor(height*0.5), width, 1);
- ctx.fillStyle="#dddddd";
+ ctx.fillStyle='#dddddd';
ctx.fillRect(0, base, width, 1);
ctx.fillRect(0, base2, width, 1);
}
@@ -663,20 +663,20 @@ InspectorGraphs.prototype.updateGraphs = function(stats, ignoreRefresh) {
if (this.showCursor) {
var index = (this.cursorIndex + samplesIndex) % samples;
- var str = '
◼ Textures Count +/-: ' + valuesTextures[index][0][0] + "/" + valuesTextures[index][1][0];
- str += '   Size +/-: ' + (valuesTextures[index][0][1]/1024/1024).toFixed(2) + "/" + (valuesTextures[index][1][1]/1024/1024).toFixed(2);
- str += '  
◼ Meshes Count +/-: ' + valuesMeshes[index][0][0] + "/" + valuesMeshes[index][1][0];
- str += '   Size +/-: ' + (valuesMeshes[index][0][1]/1024/1024).toFixed(2) + "/" + (valuesMeshes[index][1][1]/1024/1024).toFixed(2);
- str += '  
◼ Geodata Count +/-: ' + valuesGeodata[index][0][0] + "/" + valuesGeodata[index][1][0];
- str += '   Size +/-: ' + (valuesGeodata[index][0][1]/1024/1024).toFixed(2) + "/" + (valuesGeodata[index][1][1]/1024/1024).toFixed(2);
+ var str = '
◼ Textures Count +/-: ' + valuesTextures[index][0][0] + '/' + valuesTextures[index][1][0];
+ str += '   Size +/-: ' + (valuesTextures[index][0][1]/1024/1024).toFixed(2) + '/' + (valuesTextures[index][1][1]/1024/1024).toFixed(2);
+ str += '  
◼ Meshes Count +/-: ' + valuesMeshes[index][0][0] + '/' + valuesMeshes[index][1][0];
+ str += '   Size +/-: ' + (valuesMeshes[index][0][1]/1024/1024).toFixed(2) + '/' + (valuesMeshes[index][1][1]/1024/1024).toFixed(2);
+ str += '  
◼ Geodata Count +/-: ' + valuesGeodata[index][0][0] + '/' + valuesGeodata[index][1][0];
+ str += '   Size +/-: ' + (valuesGeodata[index][0][1]/1024/1024).toFixed(2) + '/' + (valuesGeodata[index][1][1]/1024/1024).toFixed(2);
str += '
';
} else {
- var str = '