|
@@ -4711,8 +4711,10 @@ var VisiSet = {
|
|
|
this.showFootIcons(null, true);
|
|
|
|
|
|
for (let i in player.model.hots) {
|
|
|
- player.model.hots[i].visi_ = player.model.hots[i].visible;
|
|
|
- player.model.hots[i].visible = false;
|
|
|
+ // player.model.hots[i].visi_ = player.model.hots[i].visible;
|
|
|
+ // player.model.hots[i].visible = false;
|
|
|
+ player.model.hots[i].visi_ = player.model.hots[i].mesh.visible;
|
|
|
+ player.model.hots[i].mesh.visible = false
|
|
|
}
|
|
|
|
|
|
player.model.panos.forEach((e) => {
|
|
@@ -4720,13 +4722,35 @@ var VisiSet = {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ changePanoVisi:function(state){
|
|
|
+ var floor = player.model.allFloorsVisible ? 'all' : player.model.currentFloor
|
|
|
+ if(this.setPanoVisible){
|
|
|
+ if(floor != 'all' && this.panoVsetting && floor != this.panoVsetting.floor){//如果切换到其他楼,取消选中该pano
|
|
|
+ this.pauseSetPanoVisible('unsaved')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ player.model.panos.forEach(e=>{
|
|
|
+ if(!e.footIcon)return
|
|
|
+
|
|
|
+ if(state && !e.footIcon.visible && (floor == 'all' || floor == e.floor)){
|
|
|
+ e.footIcon.visible = true
|
|
|
+ if (this.setPanoLog)e.addTextSprite(e.id, $('#panoIdColorTex').val(), e.footIcon)
|
|
|
+ }else if(!state || floor != 'all' && floor != e.floor){
|
|
|
+ e.footIcon.visible = false
|
|
|
+ if (this.setPanoLog)e.removeTextSprite()
|
|
|
+ }
|
|
|
+ })
|
|
|
+},
|
|
|
+
|
|
|
finishSetPanoLog: function () {
|
|
|
//结束 退出这个设置
|
|
|
if (!this.setPanoLog) return;
|
|
|
//否则会加多个侦听
|
|
|
+ this.changePanoVisi(false)
|
|
|
+
|
|
|
this.setPanoLog = false;
|
|
|
|
|
|
- this.hideFootIcons();
|
|
|
+ // this.hideFootIcons();
|
|
|
|
|
|
this.recoverAllState2();
|
|
|
this.panosSelect = null;
|
|
@@ -4735,14 +4759,15 @@ var VisiSet = {
|
|
|
permitTranMode(true);
|
|
|
|
|
|
for (let i in player.model.hots) {
|
|
|
- player.model.hots[i].visible = player.model.hots[i].visi_;
|
|
|
+ // player.model.hots[i].visible = player.model.hots[i].visi_;
|
|
|
+ player.model.hots[i].mesh.visible = player.model.hots[i].visi_
|
|
|
}
|
|
|
|
|
|
$("#panosIdShow").val("");
|
|
|
|
|
|
- player.model.panos.forEach((e) => {
|
|
|
- e.removeTextSprite();
|
|
|
- });
|
|
|
+ // player.model.panos.forEach((e) => {
|
|
|
+ // e.removeTextSprite();
|
|
|
+ // });
|
|
|
},
|
|
|
dealPanoLogClick: function (object) {
|
|
|
var id = object.name == "" ? object.parent.name : object.name;
|
|
@@ -4909,7 +4934,7 @@ var VisiSet = {
|
|
|
//否则会加多个侦听
|
|
|
this.setPanoVisible = false;
|
|
|
|
|
|
- this.hideFootIcons();
|
|
|
+ // this.hideFootIcons();
|
|
|
this.delVisibleLines();
|
|
|
|
|
|
//objects.tagManager.showAllTags();
|
|
@@ -5104,35 +5129,36 @@ var VisiSet = {
|
|
|
return array;
|
|
|
},
|
|
|
|
|
|
- setDisplay: function (state) {
|
|
|
+ setDisplay: function(state) {
|
|
|
var panos = player.model.panos;
|
|
|
if (state) {
|
|
|
- this.$confirmSnap.text("保存当前设置");
|
|
|
- this.$confirmSnap.removeClass("hide");
|
|
|
+ this.$confirmSnap.text('保存当前设置');
|
|
|
+ this.$confirmSnap.removeClass('hide');
|
|
|
} else {
|
|
|
- this.$confirmSnap.addClass("hide");
|
|
|
- this.changeBtn.addClass("hide");
|
|
|
+ this.$confirmSnap.addClass('hide');
|
|
|
+ this.changeBtn.addClass('hide')
|
|
|
}
|
|
|
|
|
|
- player.path.currentPanoMarker.mesh.visible = !state;
|
|
|
+ player.path.currentPanoMarker.mesh.visible = !state;
|
|
|
player.reticule.visible = !state;
|
|
|
- },
|
|
|
+ this.changePanoVisi(state)
|
|
|
+},
|
|
|
|
|
|
- delVisibleLines: function () {
|
|
|
+ delVisibleLines: function() {
|
|
|
//xzw add 所有线都删除
|
|
|
for (var i in this.tagsVLines) {
|
|
|
- this.tagsVLines[i].geometry.dispose();
|
|
|
- this.tagsVLines[i].material.dispose();
|
|
|
- this.meshGroup.remove(this.tagsVLines[i]);
|
|
|
- delete this.tagsVLines[i];
|
|
|
+ this.tagsVLines[i].geometry.dispose();
|
|
|
+ this.tagsVLines[i].material.dispose();
|
|
|
+ this.meshGroup.remove(this.tagsVLines[i]);
|
|
|
+ delete this.tagsVLines[i];
|
|
|
}
|
|
|
for (var i in this.panoVLines) {
|
|
|
- this.panoVLines[i].geometry.dispose();
|
|
|
- this.panoVLines[i].material.dispose();
|
|
|
- this.meshGroup.remove(this.panoVLines[i]);
|
|
|
- delete this.panoVLines[i];
|
|
|
+ this.panoVLines[i].geometry.dispose();
|
|
|
+ this.panoVLines[i].material.dispose();
|
|
|
+ this.meshGroup.remove(this.panoVLines[i]);
|
|
|
+ delete this.panoVLines[i];
|
|
|
}
|
|
|
- },
|
|
|
+},
|
|
|
//--------panoVisible
|
|
|
createPanoVisiLines: function (pano) {
|
|
|
// pano可见性线条
|
|
@@ -5358,48 +5384,51 @@ var VisiSet = {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- resetPanosVisiByModel: function () {
|
|
|
- //一键计算所有漫游可行 (计算后自动连接,但不保存)
|
|
|
-
|
|
|
- $(".waiting").addClass("showloading");
|
|
|
-
|
|
|
- let begin = () => {
|
|
|
- this.pauseSetPanoVisible("unsaved");
|
|
|
-
|
|
|
- var ifBlock = function (panoA, panoB) {
|
|
|
- var A = panoA.position.clone();
|
|
|
- var B = panoB.position.clone();
|
|
|
- return !!convertTool.ifIntersectChunks(A, B, {});
|
|
|
- };
|
|
|
-
|
|
|
- player.model.panos.list.forEach((pano1) => {
|
|
|
- this.SetOnePanoVisible(pano1); //开始设置pano1
|
|
|
-
|
|
|
- player.model.panos.list.forEach((pano2) => {
|
|
|
- if (pano1 == pano2) return;
|
|
|
- if (pano1.id == "9" && pano2.id == "0") {
|
|
|
- console.log(1);
|
|
|
- }
|
|
|
- var visiNew = !ifBlock(pano1, pano2);
|
|
|
- var visiOld = !!(this.panoVLines[pano2.id] && this.panoVLines[pano2.id].visible);
|
|
|
- if (visiNew != visiOld) {
|
|
|
- //console.log('修改 '+pano1.id+'-'+pano2.id)
|
|
|
- this.dealPanoVisible(pano2.id); //修改
|
|
|
- }
|
|
|
- });
|
|
|
- this.pauseSetPanoVisible("unsaved"); //修改pano1结束
|
|
|
- });
|
|
|
-
|
|
|
- $(".waiting").removeClass("showloading");
|
|
|
- manage.showInfo("修改成功,可以点击漫游点查看。点击保存当前设置后生效。");
|
|
|
- };
|
|
|
+ resetPanosVisiByModel: function() {//一键计算所有漫游可行 (计算后自动连接,但不保存) 多楼层还没试过
|
|
|
+
|
|
|
+ $('.waiting').addClass('showloading');
|
|
|
+ $('.pinBottom .allFloorBtn').click()//全部楼层显示
|
|
|
+ let begin = ()=>{
|
|
|
+ this.pauseSetPanoVisible("unsaved")
|
|
|
+
|
|
|
+
|
|
|
+ var ifBlock = function(panoA, panoB ){
|
|
|
+ var A = panoA.position.clone();
|
|
|
+ var B = panoB.position.clone();
|
|
|
+ return !!convertTool.ifIntersectChunks(A, B, {})
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ player.model.panos.list.forEach(pano1=>{
|
|
|
+ this.SetOnePanoVisible(pano1)//开始设置pano1
|
|
|
+
|
|
|
+ player.model.panos.list.forEach(pano2=>{
|
|
|
+ if(pano1 == pano2)return
|
|
|
+ if(pano1.id == '9'&& pano2.id == '0'){
|
|
|
+ console.log(1)
|
|
|
+ }
|
|
|
+ var visiNew = !ifBlock(pano1,pano2)
|
|
|
+ var visiOld = !!(this.panoVLines[pano2.id] && this.panoVLines[pano2.id].visible)
|
|
|
+ if(visiNew != visiOld){
|
|
|
+ //console.log('修改 '+pano1.id+'-'+pano2.id)
|
|
|
+ this.dealPanoVisible(pano2.id)//修改
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ this.pauseSetPanoVisible('unsaved')//修改pano1结束
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.waiting').removeClass('showloading');
|
|
|
+ manage.showInfo("修改成功,可以点击漫游点查看。点击保存当前设置后生效。")
|
|
|
+ }
|
|
|
+
|
|
|
+ setTimeout(()=>{
|
|
|
+ if(this.setPanoVisible){
|
|
|
+ begin()
|
|
|
+ }
|
|
|
+ },100)
|
|
|
+},
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- if (this.setPanoVisible) {
|
|
|
- begin();
|
|
|
- }
|
|
|
- }, 100);
|
|
|
- },
|
|
|
|
|
|
//========热点可见性==============
|
|
|
|
|
@@ -5440,6 +5469,7 @@ var VisiSet = {
|
|
|
this.delVisibleLines();
|
|
|
//删除线
|
|
|
this.showFootIcons(player.currentPano);
|
|
|
+ this.changePanoVisi(true)
|
|
|
this.createTagVisiLines(tag);
|
|
|
//创线
|
|
|
|