Skip to content

Commit 44ef13e

Browse files
author
David
committed
lib update
1 parent 0cf9a76 commit 44ef13e

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

libs2/vts-browser.js

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20144,7 +20144,7 @@ string getCoreVersion()
2014420144
*/
2014520145

2014620146
function getCoreVersion(full) {
20147-
return (full ? 'Core: ' : '') + '2.30.5';
20147+
return (full ? 'Core: ' : '') + '2.30.6';
2014820148
}
2014920149

2015020150

@@ -23794,7 +23794,14 @@ InspectorStats.prototype.updateStatsPanel = function(stats) {
2379423794
text2 += stats.debugStr + '<br/>';
2379523795
}
2379623796

23797-
let text3 = 'PixelRatio: ' + (window.devicePixelRatio || 1).toFixed(3) +'<br/>'+
23797+
let device = "WebGL"
23798+
23799+
if (renderer.device == 2) {
23800+
device = "Three"
23801+
}
23802+
23803+
let text3 = 'Device: ' + device +'<br/>'+
23804+
'PixelRatio: ' + (window.devicePixelRatio || 1).toFixed(3) +'<br/>'+
2379823805
'BFRate: ' + Math.round(1000 / (stats.frameTime+0.00001)) +'<br/><br/>';
2379923806

2380023807
const map = this.core.getMap();
@@ -27459,7 +27466,7 @@ MapDraw.prototype.getDrawCommandsGpuSize = function(commands) {
2745927466
gpuNeeded += mesh.gpuSize;
2746027467
}
2746127468

27462-
if (texture) {
27469+
if (texture && !(this.config.mapNoTextures || this.debug.drawWireframe)) {
2746327470
gpuNeeded += texture.getGpuSize();
2746427471
}
2746527472
}
@@ -27515,7 +27522,7 @@ MapDraw.prototype.areDrawCommandsReady = function(commands, priority, doNotLoad,
2751527522
const texture = command.texture;
2751627523

2751727524
const meshReady = (mesh && mesh.isReady(doNotLoad, priority, checkGpu));
27518-
const textureReady = this.config.mapNoTextures ? true : (!texture || (texture && texture.isReady(doNotLoad, priority, checkGpu)));
27525+
const textureReady = (this.config.mapNoTextures || this.debug.drawWireframe) ? true : (!texture || (texture && texture.isReady(doNotLoad, priority, checkGpu)));
2751927526

2752027527
if (!(meshReady && textureReady) ) {
2752127528
ready = false;
@@ -48927,7 +48934,7 @@ ThreeDevice.prototype.drawTileSubmesh = function (cameraPos, index, texture, typ
4892748934
let drawWireframe = map.draw.debug.drawWireframe;
4892848935
let gpuTexture = null, t = null;
4892948936

48930-
if (texture) {
48937+
if (texture && !(map.draw.config.mapNoTextures || drawWireframe)) {
4893148938
gpuTexture = texture.getGpuTexture();
4893248939
t = texture.getTransform();
4893348940
}
@@ -101418,23 +101425,27 @@ WebGLDevice.prototype.drawTileSubmesh = function (cameraPos, index, texture, typ
101418101425
let gpuTexture;
101419101426

101420101427
if (texture) {
101421-
gpuTexture = texture.getGpuTexture();
101422101428

101423-
if (gpuTexture) {
101424-
if (texture.statsCoutner != stats.counter) {
101425-
texture.statsCoutner = stats.counter;
101426-
stats.gpuRenderUsed += gpuTexture.getSize();
101427-
}
101429+
if (!(draw.config.mapNoTextures || drawWireframe)) {
101430+
gpuTexture = texture.getGpuTexture();
101428101431

101429-
this.bindTexture(gpuTexture);
101432+
if (gpuTexture) {
101433+
if (texture.statsCoutner != stats.counter) {
101434+
texture.statsCoutner = stats.counter;
101435+
stats.gpuRenderUsed += gpuTexture.getSize();
101436+
}
101430101437

101431-
if (gpuMask) {
101432-
this.bindTexture(gpuMask, 1);
101433-
}
101438+
this.bindTexture(gpuTexture);
101434101439

101435-
} else {
101436-
return;
101440+
if (gpuMask) {
101441+
this.bindTexture(gpuMask, 1);
101442+
}
101443+
101444+
} else {
101445+
return;
101446+
}
101437101447
}
101448+
101438101449
} else if (type != 3 && type != 1 && type != 2) {
101439101450
return;
101440101451
}

0 commit comments

Comments
 (0)