|
@@ -59213,7 +59213,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
getBestCount : function(name, minCount=1,maxCount=6, durBound1 = 1.2, durBound2 = 10, ifLog){
|
|
|
|
|
@@ -146626,21 +146626,23 @@ ENDSEC
|
|
|
boxMap[tileset.root.id].applyMatrix4(lastRootTransform);
|
|
|
}
|
|
|
}
|
|
|
- if (lastCameraTransform == null) {
|
|
|
- lastCameraTransform = new Matrix4().copy(camera.matrixWorld);
|
|
|
+ if (this.lastCameraTransform == null) {
|
|
|
+ this.lastCameraTransform = new Matrix4().copy(camera.matrixWorld);
|
|
|
}
|
|
|
else {
|
|
|
- const cameraChanged = !camera.matrixWorld.equals(lastCameraTransform) ||
|
|
|
+ const cameraChanged = !camera.matrixWorld.equals(this.lastCameraTransform) ||
|
|
|
!(camera.aspect == lastCameraAspect);
|
|
|
if (cameraChanged) {
|
|
|
timer = 0;
|
|
|
tileset._frameNumber++;
|
|
|
camera.getWorldPosition(lastCameraPosition);
|
|
|
- lastCameraTransform.copy(camera.matrixWorld);
|
|
|
+ this.lastCameraTransform.copy(camera.matrixWorld);
|
|
|
tilesetUpdate(tileset, renderMap, renderer, camera);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }/* else{
|
|
|
+ console.log('11')
|
|
|
+ } */
|
|
|
},
|
|
|
dispose: function () {
|
|
|
disposeFlag = true;
|
|
@@ -153169,15 +153171,15 @@ ENDSEC
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- this.update(this.clock.getDelta(), timestamp);
|
|
|
+ let deltaTime = this.clock.getDelta();
|
|
|
+ this.update(deltaTime, timestamp);
|
|
|
this.magnifier.render();
|
|
|
this.render();
|
|
|
|
|
|
-
|
|
|
+
|
|
|
this.objs.children.forEach(e=>{
|
|
|
if(e.fileType == '3dTiles'){
|
|
|
- e.runtime.update(this.clock.getDelta(), this.renderer, this.mainViewport.camera);
|
|
|
+ e.runtime.update(deltaTime, this.renderer, this.mainViewport.camera);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -153696,9 +153698,10 @@ ENDSEC
|
|
|
options: {
|
|
|
//dracoDecoderPath: '../utils/loaders/DRACOLoader/draco',
|
|
|
//basisTranscoderPath: '../utils/loaders/KTX2Loader/basis',
|
|
|
- maximumScreenSpaceError: 48,
|
|
|
- maxDepth: 100,
|
|
|
+ maximumScreenSpaceError: 700,
|
|
|
+ maxDepth: 20,
|
|
|
showAllTile: true,
|
|
|
+ maximumMemoryUsage: 16, //缓存大小
|
|
|
},
|
|
|
});
|
|
|
console.log(result);
|