|
@@ -14,6 +14,8 @@ class mainXjWindRect {
|
|
|
airJin2: THREE.Mesh | null = null; //风向箭头
|
|
|
airChu1: THREE.Mesh | null = null; //风向箭头
|
|
|
airChu2: THREE.Mesh | null = null; //风向箭头
|
|
|
+ frontPlane: THREE.Mesh | null = null;
|
|
|
+ backPlane: THREE.Mesh | null = null;
|
|
|
gearFront = {
|
|
|
gear1: null, //扇叶
|
|
|
gear2: null, //扇叶
|
|
@@ -497,7 +499,7 @@ class mainXjWindRect {
|
|
|
lookMotor(deviceType, flag, duration = 5) {
|
|
|
return new Promise((resolve) => {
|
|
|
const ztfjGroup = this.group?.getObjectByName('ztfj');
|
|
|
- let fengJiWaiKeGoup1, fengJiWaiKeGoup2, mesh, mesh1, mesh2, motorGroup;
|
|
|
+ let fengJiWaiKeGoup1, fengJiWaiKeGoup2, mesh, mesh1, mesh2, motorGroup, plane;
|
|
|
|
|
|
fengJiWaiKeGoup1 = ztfjGroup?.getObjectByName('FengJiWaiKe_1'); //前
|
|
|
fengJiWaiKeGoup2 = ztfjGroup?.getObjectByName('FengJiWaiKe_2'); //前
|
|
@@ -507,9 +509,11 @@ class mainXjWindRect {
|
|
|
if (deviceType == 'front') {
|
|
|
mesh = mesh1;
|
|
|
motorGroup = this.motorGroup2;
|
|
|
+ plane = this.frontPlane;
|
|
|
} else {
|
|
|
mesh = mesh2;
|
|
|
motorGroup = this.motorGroup1;
|
|
|
+ plane = this.backPlane;
|
|
|
}
|
|
|
if (mesh && motorGroup) {
|
|
|
if (flag == 'open') {
|
|
@@ -541,6 +545,28 @@ class mainXjWindRect {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ // 插板
|
|
|
+ if (plane) {
|
|
|
+ if (flag == 'open') {
|
|
|
+ gsap.to(plane.position, {
|
|
|
+ z: -70,
|
|
|
+ duration: duration / 2,
|
|
|
+ overwrite: true,
|
|
|
+ onComplete: function () {
|
|
|
+ resolve(null);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ gsap.to(plane.position, {
|
|
|
+ z: 30,
|
|
|
+ duration: duration / 2,
|
|
|
+ overwrite: true,
|
|
|
+ onComplete: function () {
|
|
|
+ resolve(null);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -737,18 +763,20 @@ class mainXjWindRect {
|
|
|
this.group = new THREE.Group();
|
|
|
return new Promise(async (resolve) => {
|
|
|
this.model.setGLTFModel('ztfj-xj').then(async (gltf) => {
|
|
|
+ debugger;
|
|
|
const ztfjModal = gltf[0].children[0];
|
|
|
ztfjModal.name = 'ztfj';
|
|
|
- gltf[0].children.forEach((item) => {
|
|
|
- item.position.set(4.64, 4.11, 1.52);
|
|
|
- });
|
|
|
+ // gltf[0].children.forEach((item) => {
|
|
|
+ // item.position.set(4.64, 4.11, 1.52);
|
|
|
+ // });
|
|
|
+ gltf[0].position.set(4.64, 4.11, 1.52);
|
|
|
this.group?.add(gltf[0]);
|
|
|
// this.group?.position.set(4.77, 3.63, 0.63);
|
|
|
this.group?.position.set(-0.44, 47.32, 22.37);
|
|
|
this.initSmokeMass();
|
|
|
await this.setSmokePosition();
|
|
|
|
|
|
- const ztfjGroup = this.group?.getObjectByName('ztfj');
|
|
|
+ const ztfjGroup = gltf[0]?.getObjectByName('ztfj');
|
|
|
const fengJiWaiKeGoup1 = ztfjGroup?.getObjectByName('FengJiWaiKe_1'); //前
|
|
|
const mesh = fengJiWaiKeGoup1?.getObjectByName('transparent_shell02'); //前
|
|
|
if (mesh && mesh.material) this.oldMaterial = mesh.material as THREE.MeshStandardMaterial;
|
|
@@ -761,8 +789,15 @@ class mainXjWindRect {
|
|
|
this.airJin2 = airJinGroup.getObjectByName('pasted__Jin_2') as THREE.Mesh;
|
|
|
this.airChu1 = airChuGroup.getObjectByName('pasted__Chu_1') as THREE.Mesh;
|
|
|
this.airChu2 = airChuGroup.getObjectByName('pasted__Chu_2') as THREE.Mesh;
|
|
|
- const loader = new THREE.TextureLoader();
|
|
|
|
|
|
+ debugger;
|
|
|
+ //挡板
|
|
|
+ this.frontPlane = gltf[0]?.getObjectByName('ChaBan')?.getObjectByName('ChaBan_ban_pCube8') as THREE.Mesh;
|
|
|
+ this.backPlane = gltf[0]?.getObjectByName('ChaBan1')?.getObjectByName('ChaBan1_ban_pCube8') as THREE.Mesh;
|
|
|
+ if (this.frontPlane) this.frontPlane.position.setZ(30);
|
|
|
+ if (this.backPlane) this.backPlane.position.setZ(30);
|
|
|
+
|
|
|
+ const loader = new THREE.TextureLoader();
|
|
|
this.airTexture = loader.load('/model/img/air.png');
|
|
|
this.airTexture.wrapS = THREE.RepeatWrapping;
|
|
|
this.airTexture.repeat.set(1, 1.2);
|