|
|
@@ -5,6 +5,7 @@ import mainWindRect from './mainWind.threejs';
|
|
|
import mainXjWindRect from './mainWind.xj.threejs';
|
|
|
import mainLjWindRect from './mainWind.lj.threejs';
|
|
|
import mainWindLj3 from './mainWind.li3.threejs';
|
|
|
+import mainWindLjDt from './mainWind.lidt.threejs';
|
|
|
import useEvent from '../../../../utils/threejs/useEvent';
|
|
|
import { getDictItemsByCode } from '/@/utils/dict';
|
|
|
|
|
|
@@ -20,6 +21,7 @@ let model: UseThree | undefined, //
|
|
|
mainXjWindObj: mainXjWindRect | undefined,
|
|
|
mainLjWindObj: mainLjWindRect | undefined,
|
|
|
mainLj3WindObj: mainWindLj3 | undefined,
|
|
|
+ mainFanLjDtObj: mainWindLjDt | undefined,
|
|
|
modalType = 'mainWindRect',
|
|
|
explosionVentClose = -1,
|
|
|
explosionVentOpen = -1;
|
|
|
@@ -78,6 +80,8 @@ const mouseEvent = (event) => {
|
|
|
mainXjWindObj?.mousedownModel.call(mainXjWindObj, intersects);
|
|
|
} else if (modalType === 'mainWindRect3' && mainLj3WindObj) {
|
|
|
mainLj3WindObj?.mousedownModel.call(mainLj3WindObj, intersects);
|
|
|
+ } else if (modalType === 'mainLjDtWindRect' && mainFanLjDtObj) {
|
|
|
+ mainFanLjDtObj?.mousedownModel.call(mainFanLjDtObj, intersects);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -104,6 +108,8 @@ export const addText = () => {
|
|
|
return mainLjWindObj.addCssText.call(mainLjWindObj);
|
|
|
} else if (modalType === 'mainWindRect3' && mainLj3WindObj) {
|
|
|
return mainLj3WindObj.addCssText.call(mainLj3WindObj);
|
|
|
+ } else if (modalType === 'mainLjDtWindRect' && mainFanLjDtObj) {
|
|
|
+ return mainFanLjDtObj.addCssText.call(mainFanLjDtObj);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -140,6 +146,8 @@ export const play = (controlType, deviceType, frequencyVal?, state?, smokeDirect
|
|
|
return mainLjWindObj.playSmoke.call(mainLjWindObj, controlType, deviceType, frequencyVal, state, smokeDirection);
|
|
|
} else if (modalType === 'mainWindRect3' && mainLj3WindObj) {
|
|
|
return mainLj3WindObj.playSmoke.call(mainLj3WindObj, controlType, deviceType, frequencyVal, state, smokeDirection);
|
|
|
+ } else if (modalType === 'mainLjDtWindRect' && mainFanLjDtObj) {
|
|
|
+ return mainFanLjDtObj.playSmoke.call(mainFanLjDtObj, controlType, deviceType, frequencyVal, state, smokeDirection);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -155,6 +163,8 @@ export const playAnimate1 = async (selectData, duration?) => {
|
|
|
mainObj = mainLjWindObj;
|
|
|
} else if (modalType === 'mainWindRect3') {
|
|
|
mainObj = mainLj3WindObj;
|
|
|
+ } else if (modalType === 'mainLjDtWindRect') {
|
|
|
+ mainObj = mainFanLjDtObj;
|
|
|
}
|
|
|
if (selectData && mainObj) {
|
|
|
if (selectData.Fan1WindowOpen !== undefined) {
|
|
|
@@ -237,7 +247,7 @@ export const playAnimate = async (selectData, duration?) => {
|
|
|
// if (Number(selectData.Fan2FreqHz) < 0) selectData.Fan2FreqHz = Math.abs(Number(selectData.Fan2FreqHz));
|
|
|
if (!mainWindObj) return;
|
|
|
|
|
|
- let mainObj: mainWindRect | mainXjWindRect | mainWindLj3 | undefined;
|
|
|
+ let mainObj: mainWindRect | mainXjWindRect | mainWindLj3 | mainWindLjDt | undefined;
|
|
|
|
|
|
if (modalType === 'mainWindRect') {
|
|
|
mainObj = mainWindObj;
|
|
|
@@ -247,6 +257,8 @@ export const playAnimate = async (selectData, duration?) => {
|
|
|
mainObj = mainLjWindObj;
|
|
|
} else if (modalType === 'mainWindRect3') {
|
|
|
mainObj = mainLj3WindObj;
|
|
|
+ } else if (modalType === 'mainLjDtWindRect') {
|
|
|
+ mainObj = mainFanLjDtObj;
|
|
|
}
|
|
|
if (selectData && mainObj) {
|
|
|
if (selectData['Fan1FreqHz'] == undefined || selectData['Fan1FreqHz'] == null || selectData['Fan1FreqHz'] == '') selectData['Fan1FreqHz'] = 50;
|
|
|
@@ -331,6 +343,8 @@ export const playAnimate = async (selectData, duration?) => {
|
|
|
// 主风机停止
|
|
|
mainObj.closeDevice('back');
|
|
|
}
|
|
|
+ } else if (modalType === 'mainLjDtWindRect') {
|
|
|
+ (mainObj as mainWindLjDt).playSmoke(selectData.Fan1StartStatus == 1, selectData.Fan2FreqForwardRun == 1, selectData.Fan2FreqReverseRun == 1);
|
|
|
} else {
|
|
|
mainObj.resetSmokeParam('front', selectData.Fan2FreqHz, duration);
|
|
|
mainObj.resetSmokeParam('back', selectData.Fan1FreqHz, duration);
|
|
|
@@ -456,6 +470,7 @@ export const setModelType = (type) => {
|
|
|
mainWindObj?.stopSmoke();
|
|
|
mainXjWindObj?.stopSmoke();
|
|
|
mainLj3WindObj?.stopSmoke();
|
|
|
+ mainFanLjDtObj?.stopSmoke();
|
|
|
mainLjWindObj?.stopSmoke();
|
|
|
if (group) model?.scene?.remove(group);
|
|
|
if (modalType === 'mainWindRect' && mainWindObj && mainWindObj.group) {
|
|
|
@@ -529,6 +544,23 @@ export const setModelType = (type) => {
|
|
|
);
|
|
|
if (group) model?.scene?.add(group);
|
|
|
}, 300);
|
|
|
+ } else if (modalType === 'mainLjDtWindRect' && mainFanLjDtObj && mainFanLjDtObj.group) {
|
|
|
+ (<UseThree>model).startAnimation = mainFanLjDtObj.render.bind(mainFanLjDtObj);
|
|
|
+ group = mainFanLjDtObj.group;
|
|
|
+ setTimeout(async () => {
|
|
|
+ resolve(null);
|
|
|
+ const position = new THREE.Vector3(2.815, -7.014, -5.985);
|
|
|
+ const oldCameraPosition = { x: -332.39, y: 283.47, z: 438.61 };
|
|
|
+ await animateCamera(
|
|
|
+ oldCameraPosition,
|
|
|
+ { x: -3.41, y: -29.01, z: 8.84 },
|
|
|
+ { x: 5.128, y: 72.363, z: 93.655 },
|
|
|
+ { x: position.x, y: position.y, z: position.z },
|
|
|
+ model,
|
|
|
+ 0.8
|
|
|
+ );
|
|
|
+ if (group) model?.scene?.add(group);
|
|
|
+ }, 300);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
@@ -576,6 +608,11 @@ export const mountedThree = (playerVal1) => {
|
|
|
mainLj3WindObj = new mainWindLj3(model, playerVal1);
|
|
|
await mainLj3WindObj.mountedThree();
|
|
|
break;
|
|
|
+ case 'lijing_1':
|
|
|
+ modalType = 'mainLjDtWindRect';
|
|
|
+ mainFanLjDtObj = new mainWindLjDt(model);
|
|
|
+ await mainFanLjDtObj.mountedThree();
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -609,6 +646,12 @@ export const mountedThree = (playerVal1) => {
|
|
|
if (mainLj3WindObj.airJin2) mainLj3WindObj.airJin2.visible = false;
|
|
|
if (mainLj3WindObj.airChu1) mainLj3WindObj.airChu1.visible = false;
|
|
|
}
|
|
|
+ if (mainFanLjDtObj) {
|
|
|
+ // if (mainFanLjDtObj.airChu2) mainFanLjDtObj.airChu2.visible = false;
|
|
|
+ // if (mainFanLjDtObj.airJin1) mainFanLjDtObj.airJin1.visible = false;
|
|
|
+ // if (mainFanLjDtObj.airJin2) mainFanLjDtObj.airJin2.visible = false;
|
|
|
+ // if (mainFanLjDtObj.airChu1) mainFanLjDtObj.airChu1.visible = false;
|
|
|
+ }
|
|
|
});
|
|
|
startAnimation();
|
|
|
});
|