|
@@ -26309,8 +26309,8 @@
|
|
|
|
|
|
if (tile.map instanceof TiledMapOpenStreetMap) {
|
|
|
tile.map.maxLoading = browser.isMobile() ? 5 : 10;
|
|
|
- tile.map.mapLayer.viewer.dispatchEvent('content_changed');
|
|
|
}
|
|
|
+ tile.map.mapLayer.dispatchEvent('tileLoaded');
|
|
|
} else {
|
|
|
//tile.texURL && tile.texURL.includes('testdata') && console.log('loadDone and dispose', tile.texURL.split('map_tiles/')[1] )
|
|
|
tex.dispose();
|
|
@@ -82239,6 +82239,7 @@
|
|
|
if (obj.clipState != clipState) {
|
|
|
//动作是否改变
|
|
|
obj.traverse(e => e.isSkinnedMesh && (e.boundingSphere = null)); //动画会导致bound改变,清空,raycast时重新计算bound,否则hover不到模型
|
|
|
+ obj.clipChanged = true;
|
|
|
}
|
|
|
obj.clipState = clipState;
|
|
|
});
|
|
@@ -87368,6 +87369,11 @@
|
|
|
this.map3d.addEventListener('loadDone', () => {
|
|
|
this.dispatchEvent('content_changed');
|
|
|
});
|
|
|
+ this.map3d.addEventListener('tileLoaded', () => {
|
|
|
+ Potree.Common.intervalTool.isWaiting('mapUpdateTile', () => {
|
|
|
+ this.dispatchEvent('content_changed'); //渲染 尤其vpn访问google网速慢需要
|
|
|
+ }, 1000);
|
|
|
+ });
|
|
|
this.map3d.sceneGroup.position.z = -20;
|
|
|
this.addEventListener('setLonlat', e => {
|
|
|
this.map3d.disabled = false;
|
|
@@ -91562,9 +91568,12 @@
|
|
|
window.pauseAni || this.objs.children.forEach(model => {
|
|
|
//model.traverse(object=>object.isSkinnedMesh && object.computeBoundingSphere())
|
|
|
|
|
|
- if (model.mixer && model.mixer._nActiveActions) {
|
|
|
+ if (model.mixer && (model.clipChanged || model.actions.some(a => a._mixer._isActiveAction(a) && !a.paused))) {
|
|
|
+ //播放中或者动作状态改变
|
|
|
hasAnimation = true;
|
|
|
+ model.clipChanged = false;
|
|
|
model.mixer.update(deltaTime);
|
|
|
+ //console.log('mixer update', model.name)
|
|
|
}
|
|
|
}); //以后有空的话用frust判断是否在画面内,不在的话即使有动画也不要 update 和 render, 如果paused的话是不是也可以不update
|
|
|
hasAnimation && this.dispatchEvent('content_changed');
|