|
@@ -5,7 +5,7 @@
|
|
<div v-if="!isLoaded" ref="loading" id="loading">正在加载模型中...</div>
|
|
<div v-if="!isLoaded" ref="loading" id="loading">正在加载模型中...</div>
|
|
<div v-if="reconnect" class="reconnect">网络连接中断,正在进行重连...</div>
|
|
<div v-if="reconnect" class="reconnect">网络连接中断,正在进行重连...</div>
|
|
<video ref="EngineContent" autoplay muted style="width: 1920px;height:1080px;">浏览器不支持</video>
|
|
<video ref="EngineContent" autoplay muted style="width: 1920px;height:1080px;">浏览器不支持</video>
|
|
- <Fac v-if="currentTargetType=='FAC'" user-role="index" :fac-model-load-state="isLoaded" @markerLClick="facMarkerLClick" @OpenIframeWin="OpenIframeWin"></Fac>
|
|
|
|
|
|
+ <Fac v-if="currentTargetType=='FAC'" user-role="index" :fac-model-load-state="facModelLoadState" @markerLClick="facMarkerLClick" @OpenIframeWin="OpenIframeWin"></Fac>
|
|
<In02 ref="In02Ele" v-if="currentTargetType=='IN02'" user-role="index" :click-event="In02ClickEvent" :in02-model-load-state="in02modelloadstate" :user-timeout="AutoPlayer" @OpenIframeWin="OpenIframeWin"></In02>
|
|
<In02 ref="In02Ele" v-if="currentTargetType=='IN02'" user-role="index" :click-event="In02ClickEvent" :in02-model-load-state="in02modelloadstate" :user-timeout="AutoPlayer" @OpenIframeWin="OpenIframeWin"></In02>
|
|
<In03 ref="In03Ele" v-if="currentTargetType=='IN03'" user-role="index" :click-event="In03ClickEvent" :in03-model-load-state="in03modelloadstate" :user-timeout="AutoPlayer" @OpenIframeWin="OpenIframeWin"></In03>
|
|
<In03 ref="In03Ele" v-if="currentTargetType=='IN03'" user-role="index" :click-event="In03ClickEvent" :in03-model-load-state="in03modelloadstate" :user-timeout="AutoPlayer" @OpenIframeWin="OpenIframeWin"></In03>
|
|
<!--
|
|
<!--
|
|
@@ -255,7 +255,7 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
//调整视角,使其达到最佳初始效果
|
|
//调整视角,使其达到最佳初始效果
|
|
- backMasterView();
|
|
|
|
|
|
+ //backMasterView();
|
|
//player.Native.Camera.moveToItem(lastPtr,1);
|
|
//player.Native.Camera.moveToItem(lastPtr,1);
|
|
|
|
|
|
Native.ModelTree.EventBrowseLClick.connect((event) => {
|
|
Native.ModelTree.EventBrowseLClick.connect((event) => {
|
|
@@ -337,6 +337,7 @@ export default {
|
|
}
|
|
}
|
|
async function loadFacModel(Native){
|
|
async function loadFacModel(Native){
|
|
if(currentTargetType.value=="FAC") return;
|
|
if(currentTargetType.value=="FAC") return;
|
|
|
|
+ isLoaded.value=false;
|
|
currentTargetType.value="FAC";
|
|
currentTargetType.value="FAC";
|
|
await player.Native.Model.setModelVisible("IN02",false);
|
|
await player.Native.Model.setModelVisible("IN02",false);
|
|
await player.Native.Model.setModelVisible("IN03",false);
|
|
await player.Native.Model.setModelVisible("IN03",false);
|
|
@@ -346,15 +347,14 @@ export default {
|
|
var cf = "data://models/T_ALL.pr";
|
|
var cf = "data://models/T_ALL.pr";
|
|
var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType.value, cf);
|
|
var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType.value, cf);
|
|
modelLoadState[currentTargetType.value] = true;
|
|
modelLoadState[currentTargetType.value] = true;
|
|
- }
|
|
|
|
- facModelLoadState.value=true;//全厂模型加载完成
|
|
|
|
|
|
+ }
|
|
await player.Native.Settings.set('ambientIndenty', 'float', 0.39);//初始化环境光补偿
|
|
await player.Native.Settings.set('ambientIndenty', 'float', 0.39);//初始化环境光补偿
|
|
await player.Native.Settings.set('diffuseIntensity', 'float', 1.2);//初始化光线强度
|
|
await player.Native.Settings.set('diffuseIntensity', 'float', 1.2);//初始化光线强度
|
|
await player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
await player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
await player.Native.Model.setModelVisible(currentTargetType.value,true);
|
|
await player.Native.Model.setModelVisible(currentTargetType.value,true);
|
|
- await player.Native.CameraAnimation.clearKeyFrame();
|
|
|
|
- isLoaded.value=true;
|
|
|
|
- setTimeout(async() => {
|
|
|
|
|
|
+ facModelLoadState.value=true;//全厂模型加载完成
|
|
|
|
+ await player.Native.CameraAnimation.clearKeyFrame();
|
|
|
|
+ setTimeout(async() => {
|
|
var cf = "data://models/T_02.pr";
|
|
var cf = "data://models/T_02.pr";
|
|
await PlayerUtils.call(Native.Model.loadModel, 'IN02', cf);
|
|
await PlayerUtils.call(Native.Model.loadModel, 'IN02', cf);
|
|
modelLoadState['IN02']=true;
|
|
modelLoadState['IN02']=true;
|
|
@@ -362,8 +362,9 @@ export default {
|
|
var cf = "data://models/T_03.pr";
|
|
var cf = "data://models/T_03.pr";
|
|
await PlayerUtils.call(Native.Model.loadModel, 'IN03', cf);
|
|
await PlayerUtils.call(Native.Model.loadModel, 'IN03', cf);
|
|
modelLoadState['IN03']=true;
|
|
modelLoadState['IN03']=true;
|
|
- await player.Native.Model.setModelVisible('IN03',false);
|
|
|
|
- }, 500);
|
|
|
|
|
|
+ await player.Native.Model.setModelVisible('IN03',false);
|
|
|
|
+ isLoaded.value=true;//所有模型加载,通知导航菜单可以进行切换操作了
|
|
|
|
+ }, 100);
|
|
}
|
|
}
|
|
//后整
|
|
//后整
|
|
async function loadIn05Model(Native){
|
|
async function loadIn05Model(Native){
|
|
@@ -413,6 +414,7 @@ export default {
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 2.5);//初始化光线强度
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 2.5);//初始化光线强度
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.6);//初始化高光强度
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.6);//初始化高光强度
|
|
if(currentTargetType.value=="IN03") return;
|
|
if(currentTargetType.value=="IN03") return;
|
|
|
|
+ isLoaded.value=false;
|
|
currentTargetType.value="IN03";
|
|
currentTargetType.value="IN03";
|
|
await player.Native.Model.setModelVisible("FAC",false);
|
|
await player.Native.Model.setModelVisible("FAC",false);
|
|
await player.Native.Model.setModelVisible("IN02",false);
|
|
await player.Native.Model.setModelVisible("IN02",false);
|
|
@@ -437,6 +439,7 @@ export default {
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 0.8);//初始化光线强度
|
|
player.Native.Settings.set('diffuseIntensity', 'float', 0.8);//初始化光线强度
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
|
|
if(currentTargetType.value=="IN02") return;
|
|
if(currentTargetType.value=="IN02") return;
|
|
|
|
+ isLoaded.value=false;
|
|
currentTargetType.value="IN02";
|
|
currentTargetType.value="IN02";
|
|
await player.Native.Model.setModelVisible("FAC",false);
|
|
await player.Native.Model.setModelVisible("FAC",false);
|
|
await player.Native.Model.setModelVisible("IN03",false);
|
|
await player.Native.Model.setModelVisible("IN03",false);
|