|
@@ -46,7 +46,7 @@
|
|
|
navPaddingBg:'transparent',
|
|
|
navBarColor: 'transparent',
|
|
|
navBackColor: 'transparent',
|
|
|
- haveCallback: false, // 如果是 true 会接手 navbarBackClk
|
|
|
+ haveCallback: true, // 如果是 true 会接手 navbarBackClk
|
|
|
fromShare: false,
|
|
|
fromProject: 0,
|
|
|
shareToken: "",
|
|
@@ -71,7 +71,6 @@
|
|
|
controlLastPosition: null, //观察点上一次移动到的位置
|
|
|
canvasHeight:408, //canvas视图的高度-计算得出
|
|
|
chooseMesh:null,//标记鼠标拾取到的mesh
|
|
|
- isManyou: false, //当前是否处在漫游状态
|
|
|
shottingImg: [],
|
|
|
progress:1, //进度条
|
|
|
myLoadingStatus:false,
|
|
@@ -83,8 +82,9 @@
|
|
|
actors:[],
|
|
|
showDownView:true,//默认显示下载按钮
|
|
|
currentActor:null,
|
|
|
- circleGroup:null,
|
|
|
+ circleGroup:null,//圆形地标
|
|
|
isIOS:false,
|
|
|
+ defaulIndex:null, //默认视角的序号
|
|
|
// aiImagesList:[
|
|
|
// // "https://dm.static.elab-plus.com/miniProgram/plus_IM01.png",
|
|
|
// // "https://dm.static.elab-plus.com/miniProgram/plus_IM02.png",
|
|
@@ -146,7 +146,6 @@
|
|
|
// this.meshRoam = meshRoam;
|
|
|
this.tweenCameraAnmaChange = tweenCameraAnmaChange;
|
|
|
this.switchActor = switchActor;
|
|
|
- this.hideOrShowActor = hideOrShowActor;
|
|
|
this.starRender = starRender;//对外暴露启动渲染的方法
|
|
|
this.positionCamer = positionCamer;
|
|
|
if(this.curHouseObj && this.curHouseObj.id){
|
|
@@ -345,16 +344,8 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //显示当前选中的视角或者隐藏所有视角-因为截图时不能保留视角
|
|
|
- function hideOrShowActor (type) {
|
|
|
- console.warn("***hideOrShowActor***",type)
|
|
|
- if(!that.currentActor){
|
|
|
- this.$message.warning("没有视角!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
//自动切换视角
|
|
|
- function switchActor () {
|
|
|
+ function switchActor (toIndex=null) {
|
|
|
if(!that.currentActor){
|
|
|
this.$message.warning("没有当前视角!");
|
|
|
return false;
|
|
@@ -363,10 +354,14 @@
|
|
|
this.$message.warning("没有视角!");
|
|
|
return false;
|
|
|
}
|
|
|
- let index = that.currentActor.userIndex;//当前视角的序号
|
|
|
- let nextIndex = (index + 1) % that.actors.length;
|
|
|
- //移动到对应的视角去
|
|
|
- moveActor(that.actors[nextIndex]);
|
|
|
+ if(toIndex!=null){//存在要去往的视角
|
|
|
+ moveActor(that.actors[toIndex]);
|
|
|
+ }else{
|
|
|
+ let index = that.currentActor.userIndex;//当前视角的序号
|
|
|
+ let nextIndex = (index + 1) % that.actors.length;
|
|
|
+ //移动到对应的视角去
|
|
|
+ moveActor(that.actors[nextIndex]);
|
|
|
+ }
|
|
|
}
|
|
|
//移动到选中的位置-地板
|
|
|
function moveCarmer (point) {
|
|
@@ -455,6 +450,7 @@
|
|
|
if(defaulIndex == -1){
|
|
|
defaulIndex = 0;
|
|
|
}
|
|
|
+ that.defaulIndex = defaulIndex;//记录下默认视角
|
|
|
that.actors = [];
|
|
|
spaceObj.actors.forEach((actor,index)=>{
|
|
|
// let model = gltf.scene; // 获取模型
|
|
@@ -500,7 +496,7 @@
|
|
|
cube.actorEum = index;
|
|
|
cube.targetNewPosition = targetNewPosition;
|
|
|
// cube.visible = false;
|
|
|
- console.warn("*actors*",cube)
|
|
|
+ console.warn("*actors*",cube,defaulIndex)
|
|
|
that.actors.push(cube);//添加视角
|
|
|
if(index == defaulIndex){//隐藏当前视角
|
|
|
// cube.visible = false;
|
|
@@ -751,19 +747,25 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- hideOrShowActor(){
|
|
|
-
|
|
|
- },
|
|
|
- switchActor(){
|
|
|
-
|
|
|
+ navbarBackClk() {
|
|
|
+ if(!this.$refs.viewMask){
|
|
|
+ this.$router.go(-1);
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.$refs.viewMask.showAIImage) {
|
|
|
+ this.$refs.viewMask.showOrHideWebGl();//隐藏显示的AI生图
|
|
|
+ if(this.currentActor.userIndex!=this.defaulIndex){//当前不是默认视角了
|
|
|
+ this.switchActor(this.defaulIndex);//切换到默认视角
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$router.go(-1);
|
|
|
+ }
|
|
|
},
|
|
|
+ switchActor(){},
|
|
|
positionCamer(){},
|
|
|
clearHandle(){
|
|
|
this.clearEvent();
|
|
|
},
|
|
|
- showOrHideWebGl(){
|
|
|
- this.$refs.viewMask.showOrHideWebGl();//显示或者隐藏AI
|
|
|
- },
|
|
|
save(){
|
|
|
this.$refs.viewMask.save();//下载
|
|
|
},
|