gate.threejs.two.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. import * as THREE from 'three';
  2. import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
  3. import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
  4. import UseThree from '../../../../utils/threejs/useThree';
  5. import { drawHot } from '/@/utils/threejs/util';
  6. import { useAppStore } from '/@/store/modules/app';
  7. // import * as dat from 'dat.gui';
  8. // const gui = new dat.GUI();
  9. // gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
  10. class Fm1 {
  11. modelName = 'fm1';
  12. model; //
  13. group;
  14. isLRAnimation = true; // 是否开启左右摇摆动画
  15. direction = 1; // 摇摆方向
  16. animationTimer: NodeJS.Timeout | null = null; // 摇摆开启定时器
  17. player1;
  18. player2;
  19. deviceDetailCSS3D;
  20. playerStartClickTime1 = new Date().getTime();
  21. playerStartClickTime2 = new Date().getTime();
  22. fmClock = new THREE.Clock();
  23. mixers: THREE.AnimationMixer | undefined;
  24. appStore = useAppStore();
  25. backDamperOpenMesh;
  26. backDamperClosedMesh;
  27. frontDamperOpenMesh;
  28. frontDamperClosedMesh;
  29. clipActionArr = {
  30. frontDoor: null as unknown as THREE.AnimationAction,
  31. backDoor: null as unknown as THREE.AnimationAction,
  32. };
  33. constructor(model) {
  34. this.model = model;
  35. }
  36. addLight() {
  37. const directionalLight = new THREE.DirectionalLight(0xffffff, 1.5);
  38. directionalLight.position.set(344, 690, 344);
  39. this.group?.add(directionalLight);
  40. directionalLight.target = this.group as THREE.Object3D;
  41. const pointLight2 = new THREE.PointLight(0xffeeee, 1, 300);
  42. pointLight2.position.set(-4, 10, 1.8);
  43. pointLight2.shadow.bias = 0.05;
  44. this.group?.add(pointLight2);
  45. const pointLight3 = new THREE.PointLight(0xffeeee, 1, 200);
  46. pointLight3.position.set(-0.5, -0.5, 0.75);
  47. pointLight3.shadow.bias = 0.05;
  48. this.group?.add(pointLight3);
  49. // const pointLight4 = new THREE.PointLight(0xffeeee, 1, 150);
  50. // pointLight4.position.set(4.3, 1, -0.9);
  51. // pointLight4.shadow.bias = 0.05;
  52. // this.group?.add(pointLight4);
  53. // const pointLight5 = new THREE.PointLight(0xffeeee, 1, 150);
  54. // pointLight5.position.set(4.3, 1, -0.9);
  55. // pointLight5.shadow.bias = 0.05;
  56. // this.group?.add(pointLight5);
  57. // const pointLight6 = new THREE.PointLight(0xffeeee, 1, 150);
  58. // pointLight6.position.set(-4.4, 1, -0.9);
  59. // pointLight6.shadow.bias = 0.05;
  60. // this.group?.add(pointLight6);
  61. // const pointLightHelper2 = new THREE.PointLightHelper(pointLight2, 1);
  62. // this.model.scene?.add(pointLightHelper2);
  63. // gui.add(pointLight2.position, 'x', -300, 300);
  64. // gui.add(pointLight2.position, 'y', -300, 300);
  65. // gui.add(pointLight2.position, 'z', -300, 300);
  66. // gui.add(pointLight3.position, 'x', -300, 300);
  67. // gui.add(pointLight3.position, 'y', -300, 300);
  68. // gui.add(pointLight3.position, 'z', -300, 300);
  69. }
  70. // 重置摄像头
  71. resetCamera() {
  72. this.model.camera.far = 274;
  73. this.model.orbitControls?.update();
  74. this.model.camera.updateProjectionMatrix();
  75. }
  76. // 设置模型位置
  77. setModalPosition() {
  78. this.group?.scale.set(22, 22, 22);
  79. this.group?.position.set(-20, 20, 9);
  80. }
  81. /* 添加监控数据 */
  82. addMonitorText(selectData) {
  83. if (!this.group) {
  84. return;
  85. }
  86. const screenDownText = VENT_PARAM['modalText']
  87. ? // @ts-ignore
  88. VENT_PARAM['modalText']
  89. : // @ts-ignore
  90. History_Type['type'] == 'remote'
  91. ? `国能神东煤炭集团监制`
  92. : '煤科通安(北京)智控科技有限公司研制';
  93. const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
  94. const textArr = [
  95. {
  96. text: `远程控制快速密闭门`,
  97. font: 'normal 30px Arial',
  98. color: '#00FF00',
  99. strokeStyle: '#007400',
  100. x: 120,
  101. y: 100,
  102. },
  103. {
  104. text: `压力(Pa):`,
  105. font: 'normal 30px Arial',
  106. color: '#00FF00',
  107. strokeStyle: '#007400',
  108. x: 0,
  109. y: 155,
  110. },
  111. {
  112. text: `${selectData.frontRearDP}`,
  113. font: 'normal 30px Arial',
  114. color: '#00FF00',
  115. strokeStyle: '#007400',
  116. x: 290,
  117. y: 155,
  118. },
  119. {
  120. text: `动力源压力(MPa): `,
  121. font: 'normal 30px Arial',
  122. color: '#00FF00',
  123. strokeStyle: '#007400',
  124. x: 0,
  125. y: 215,
  126. },
  127. {
  128. text: ` ${selectData.sourcePressure}`,
  129. font: 'normal 30px Arial',
  130. color: '#00FF00',
  131. strokeStyle: '#007400',
  132. x: 280,
  133. y: 215,
  134. },
  135. {
  136. text: `故障诊断:`,
  137. font: 'normal 30px Arial',
  138. color: '#00FF00',
  139. strokeStyle: '#007400',
  140. x: 0,
  141. y: 275,
  142. },
  143. {
  144. text: `${selectData.warnLevel_str ? selectData.warnLevel_str : '-'}`,
  145. font: 'normal 30px Arial',
  146. color: '#00FF00',
  147. strokeStyle: '#007400',
  148. x: 280,
  149. y: 275,
  150. },
  151. {
  152. text: screenDownText,
  153. font: 'normal 28px Arial',
  154. color: '#009900',
  155. strokeStyle: '#002200',
  156. x: screenDownTextX,
  157. y: 325,
  158. },
  159. ];
  160. //
  161. getTextCanvas(526, 346, textArr, '').then((canvas: HTMLCanvasElement) => {
  162. const textMap = new THREE.CanvasTexture(canvas); // 关键一步
  163. textMap.colorSpace = THREE.SRGBColorSpace;
  164. const textMaterial = new THREE.MeshBasicMaterial({
  165. // 关于材质并未讲解 实操即可熟悉 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
  166. map: textMap, // 设置纹理贴图
  167. transparent: true,
  168. side: THREE.FrontSide, // 这里是双面渲染的意思
  169. });
  170. textMaterial.blending = THREE.CustomBlending;
  171. const monitorPlane = this.group.getObjectByName('monitorText');
  172. if (monitorPlane) {
  173. monitorPlane.material = textMaterial;
  174. } else {
  175. const planeGeometry = new THREE.PlaneGeometry(526, 346); // 平面3维几何体PlaneGeometry
  176. const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
  177. planeMesh.name = 'monitorText';
  178. planeMesh.scale.set(0.002, 0.002, 0.002);
  179. planeMesh.position.set(-1.255, 0.09, -0.41);
  180. this.group.add(planeMesh);
  181. }
  182. textMap.dispose();
  183. });
  184. }
  185. /** 添加热点 */
  186. drawHots() {
  187. const hotPositions = [
  188. { x: -0.37, y: 0.26, z: -0.32 },
  189. { x: 0.28, y: -0.2, z: -0.43 },
  190. { x: 0.55, y: -0.22, z: -0.38 },
  191. ];
  192. for (let i = 0; i < 3; i++) {
  193. const hotPoint = drawHot(0.1);
  194. const position = hotPositions[i];
  195. hotPoint.scale.set(0.1, 0.1, 0.1);
  196. hotPoint.position.set(position.x, position.y, position.z);
  197. hotPoint.name = 'hotPoint' + i;
  198. this.group?.add(hotPoint);
  199. }
  200. }
  201. /* 风门动画 */
  202. render() {
  203. if (!this.model) {
  204. return;
  205. }
  206. if (this.mixers && this.fmClock.running) {
  207. this.mixers.update(2);
  208. }
  209. }
  210. /* 点击风窗,风窗全屏 */
  211. mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
  212. if (this.animationTimer) {
  213. clearTimeout(this.animationTimer);
  214. this.animationTimer = null;
  215. }
  216. // 判断是否点击到视频
  217. intersects.find((intersect) => {
  218. const mesh = intersect.object;
  219. // if (mesh.name === 'player1') {
  220. // if (new Date().getTime() - this.playerStartClickTime1 < 400) {
  221. // // 双击,视频放大
  222. // if (this.player1) {
  223. // this.player1.requestPictureInPicture();
  224. // }
  225. // }
  226. // this.playerStartClickTime1 = new Date().getTime();
  227. // return true;
  228. // } else if (mesh.name === 'player2') {
  229. // if (new Date().getTime() - this.playerStartClickTime2 < 400) {
  230. // // 双击,视频放大
  231. // if (this.player2) {
  232. // this.player2.requestPictureInPicture();
  233. // }
  234. // }
  235. // this.playerStartClickTime2 = new Date().getTime();
  236. // return true;
  237. // } else if (mesh.name.startsWith('hotPoint')) {
  238. // if (this.deviceDetailCSS3D) {
  239. // this.deviceDetailCSS3D.position.set(mesh.position.x + 0.035, mesh.position.y + 0.68, mesh.position.z + 0.02);
  240. // console.log('[ deviceDetailCSS3D.position ] >', this.deviceDetailCSS3D.position);
  241. // this.deviceDetailCSS3D.visible = true;
  242. // return true;
  243. // }
  244. // } else {
  245. // if (this.deviceDetailCSS3D) this.deviceDetailCSS3D.visible = false;
  246. // console.log('[ 点击事件 ] >');
  247. // }
  248. return false;
  249. });
  250. }
  251. mouseUpModel() {}
  252. /* 提取风门序列帧,初始化前后门动画 */
  253. initAnimation() {
  254. const fmGroup = this.group?.getObjectByName('quickObfurage-door');
  255. if (fmGroup) {
  256. const tracks = fmGroup.animations[0].tracks;
  257. const fontTracks: any[] = [],
  258. backTracks: any[] = [];
  259. for (let i = 0; i < tracks.length; i++) {
  260. const track = tracks[i];
  261. if (track.name.startsWith('qianmen')) {
  262. fontTracks.push(track);
  263. } else if (track.name.startsWith('houmen')) {
  264. backTracks.push(track);
  265. }
  266. }
  267. this.mixers = new THREE.AnimationMixer(fmGroup);
  268. const frontDoor = new THREE.AnimationClip('frontDoor', 4, fontTracks);
  269. const frontClipAction = this.mixers.clipAction(frontDoor, fmGroup);
  270. frontClipAction.clampWhenFinished = true;
  271. frontClipAction.loop = THREE.LoopOnce;
  272. this.clipActionArr.frontDoor = frontClipAction;
  273. const backDoor = new THREE.AnimationClip('backDoor', 4, backTracks);
  274. const backClipAction = this.mixers.clipAction(backDoor, fmGroup);
  275. backClipAction.clampWhenFinished = true;
  276. backClipAction.loop = THREE.LoopOnce;
  277. this.clipActionArr.backDoor = backClipAction;
  278. }
  279. }
  280. deviceDetailCard(position = { x: 0, y: 0, z: 0 }) {
  281. const element = document.getElementById('deviceCard') as HTMLElement;
  282. if (element) {
  283. this.deviceDetailCSS3D = new CSS2DObject(element);
  284. this.deviceDetailCSS3D.name = 'deviceCard';
  285. this.deviceDetailCSS3D.position.set(position.x, position.y, position.z);
  286. this.deviceDetailCSS3D.visible = false;
  287. // this.model.scene.add(this.deviceDetailCSS3D);
  288. this.group.add(this.deviceDetailCSS3D);
  289. }
  290. }
  291. // 播放动画
  292. play(handlerState, timeScale = 0.01) {
  293. let handler = () => {};
  294. switch (handlerState) {
  295. case 1: // 打开前门
  296. handler = () => {
  297. this.clipActionArr.frontDoor.paused = true;
  298. this.clipActionArr.frontDoor.reset();
  299. this.clipActionArr.frontDoor.time = 1.2;
  300. this.clipActionArr.frontDoor.timeScale = timeScale;
  301. // this.clipActionArr.frontDoor.clampWhenFinished = true;
  302. this.clipActionArr.frontDoor.play();
  303. this.fmClock.start();
  304. // 显示打开前门文字
  305. if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = true;
  306. if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = false;
  307. };
  308. break;
  309. case 2: // 关闭前门
  310. handler = () => {
  311. this.clipActionArr.frontDoor.paused = true;
  312. this.clipActionArr.frontDoor.reset(); //
  313. this.clipActionArr.frontDoor.time = 4;
  314. this.clipActionArr.frontDoor.timeScale = -timeScale;
  315. // this.clipActionArr.frontDoor.clampWhenFinished = true;
  316. this.clipActionArr.frontDoor.play();
  317. this.fmClock.start();
  318. if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = false;
  319. if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = true;
  320. };
  321. break;
  322. case 3: // 打开后门
  323. handler = () => {
  324. this.clipActionArr.backDoor.paused = true;
  325. this.clipActionArr.backDoor.reset();
  326. this.clipActionArr.backDoor.time = 1.2;
  327. this.clipActionArr.backDoor.timeScale = timeScale;
  328. // this.clipActionArr.backDoor.clampWhenFinished = true;
  329. this.clipActionArr.backDoor.play();
  330. this.fmClock.start();
  331. if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = true;
  332. if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = false;
  333. };
  334. break;
  335. case 4: // 关闭后门
  336. handler = () => {
  337. this.clipActionArr.backDoor.paused = true;
  338. this.clipActionArr.backDoor.reset();
  339. this.clipActionArr.backDoor.time = 4;
  340. this.clipActionArr.backDoor.timeScale = -timeScale;
  341. // this.clipActionArr.backDoor.clampWhenFinished = true;
  342. this.clipActionArr.backDoor.play();
  343. this.fmClock.start();
  344. if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = false;
  345. if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = true;
  346. };
  347. break;
  348. // case 5: // 打开前后门
  349. // handler = () => {
  350. // this.clipActionArr.backDoor.paused = true;
  351. // this.clipActionArr.frontDoor.paused = true;
  352. // this.clipActionArr.frontDoor.reset();
  353. // this.clipActionArr.frontDoor.time = 0;
  354. // this.clipActionArr.frontDoor.timeScale = 0.01;
  355. // this.clipActionArr.frontDoor.clampWhenFinished = true;
  356. // this.clipActionArr.frontDoor.play();
  357. // this.clipActionArr.backDoor.reset();
  358. // this.clipActionArr.backDoor.time = 0;
  359. // this.clipActionArr.backDoor.timeScale = 0.01;
  360. // this.clipActionArr.backDoor.clampWhenFinished = true;
  361. // this.clipActionArr.backDoor.play();
  362. // this.frontClock.start();
  363. // this.backClock.start();
  364. // };
  365. // break;
  366. // case 6: // 关闭前后门
  367. // handler = () => {
  368. // debugger;
  369. // this.clipActionArr.backDoor.paused = true;
  370. // this.clipActionArr.frontDoor.paused = true;
  371. // this.clipActionArr.frontDoor.reset();
  372. // this.clipActionArr.frontDoor.time = 4;
  373. // this.clipActionArr.frontDoor.timeScale = -0.01;
  374. // this.clipActionArr.frontDoor.clampWhenFinished = true;
  375. // this.clipActionArr.frontDoor.play();
  376. // this.clipActionArr.backDoor.reset();
  377. // this.clipActionArr.backDoor.time = 4;
  378. // this.clipActionArr.backDoor.timeScale = -0.01;
  379. // this.clipActionArr.backDoor.clampWhenFinished = true;
  380. // this.clipActionArr.backDoor.play();
  381. // this.frontClock.start();
  382. // this.backClock.start();
  383. // };
  384. // break;
  385. default:
  386. }
  387. handler();
  388. // model.clock.start();
  389. // const honglvdeng = group.getObjectByName('honglvdeng');
  390. // const material = honglvdeng.material;
  391. // setTimeout(() => {
  392. // if (handlerState === 2 || handlerState === 4 || handlerState === 6) {
  393. // material.color = new THREE.Color(0x00ff00);
  394. // } else {
  395. // material.color = new THREE.Color(0xff0000);
  396. // }
  397. // }, 1000);
  398. }
  399. async initCamera(dom1?, dom2?) {
  400. const videoPlayer1 = dom1;
  401. const videoPlayer2 = dom2;
  402. this.player1 = dom1;
  403. this.player2 = dom2;
  404. let monitorPlane: THREE.Mesh | null = null;
  405. if (!videoPlayer1 || !videoPlayer2) {
  406. const textArr = [
  407. {
  408. text: `无信号输入`,
  409. font: 'normal 40px Arial',
  410. color: '#009900',
  411. strokeStyle: '#002200',
  412. x: 170,
  413. y: 40,
  414. },
  415. ];
  416. const canvas = await getTextCanvas(320, 180, '', 'noSinge.png');
  417. let textMaterial: THREE.MeshBasicMaterial | null = null;
  418. if (canvas) {
  419. const textMap = new THREE.CanvasTexture(canvas); // 关键一步
  420. textMaterial = new THREE.MeshBasicMaterial({
  421. map: textMap, // 设置纹理贴图
  422. transparent: true,
  423. side: THREE.DoubleSide, // 这里是双面渲染的意思
  424. });
  425. textMaterial.blending = THREE.CustomBlending;
  426. const planeGeometry = new THREE.PlaneGeometry(100, 100); // 平面3维几何体PlaneGeometry
  427. monitorPlane = new THREE.Mesh(planeGeometry, textMaterial);
  428. textMaterial.dispose();
  429. planeGeometry.dispose();
  430. textMap.dispose();
  431. }
  432. }
  433. const player1 = this.group.getObjectByName('player1');
  434. if (player1) {
  435. this.model.clearMesh(player1);
  436. this.group.remove(player1);
  437. }
  438. const noPlayer1 = this.group.getObjectByName('noPlayer1');
  439. if (noPlayer1) {
  440. this.model.clearMesh(noPlayer1);
  441. this.group.remove(noPlayer1);
  442. }
  443. if (!videoPlayer1 && videoPlayer1 === null) {
  444. if (monitorPlane && !this.group.getObjectByName('noPlayer1')) {
  445. const planeMesh = monitorPlane.clone();
  446. planeMesh.name = 'noPlayer1';
  447. planeMesh.scale.set(0.0085, 0.0056, 0.012);
  448. planeMesh.position.set(-4.23, 0.02, -0.39);
  449. this.group?.add(planeMesh.clone());
  450. }
  451. } else if (videoPlayer1) {
  452. try {
  453. const mesh = renderVideo(this.group, videoPlayer1, 'player1');
  454. if (mesh) {
  455. mesh?.scale.set(-0.028, 0.0285, 1);
  456. mesh?.position.set(-4.262, 0.02, -0.4);
  457. mesh.rotation.y = -Math.PI;
  458. this.group.add(mesh);
  459. }
  460. } catch (error) {
  461. console.log('视频信号异常');
  462. }
  463. }
  464. const player2 = this.group.getObjectByName('player2');
  465. if (player2) {
  466. this.model.clearMesh(player2);
  467. this.group.remove(player2);
  468. }
  469. const noPlayer2 = this.group.getObjectByName('noPlayer2');
  470. if (noPlayer2) {
  471. this.model.clearMesh(noPlayer2);
  472. this.group.remove(noPlayer2);
  473. }
  474. if (!videoPlayer2 && videoPlayer2 === null) {
  475. if (monitorPlane && !this.group.getObjectByName('noPlayer2')) {
  476. const planeMesh = monitorPlane.clone();
  477. planeMesh.name = 'noPlayer2';
  478. planeMesh.scale.set(0.0085, 0.0056, 0.012);
  479. planeMesh.position.set(4.29, 0.02, -0.41);
  480. this.group?.add(planeMesh.clone());
  481. }
  482. } else if (videoPlayer2) {
  483. try {
  484. const mesh = renderVideo(this.group, videoPlayer2, 'player2');
  485. if (mesh) {
  486. mesh?.scale.set(-0.028, 0.0285, 1);
  487. mesh?.position.set(4.298, 0.02, -0.4);
  488. mesh.rotation.y = -Math.PI;
  489. this.group.add(mesh);
  490. }
  491. } catch (error) {
  492. console.log('视频信号异常');
  493. }
  494. }
  495. }
  496. mountedThree() {
  497. this.group = new THREE.Object3D();
  498. this.group.name = this.modelName;
  499. return new Promise((resolve) => {
  500. this.model.setGLTFModel(['quickObfurage-door', 'quickObfurage-wire', 'quickObfurage-wall'], this.group).then(() => {
  501. this.setModalPosition();
  502. // 初始化左右摇摆动画;
  503. this.initAnimation();
  504. // this.drawHots();
  505. this.addLight();
  506. // this.deviceDetailCard();
  507. this.model.animate();
  508. this.backDamperOpenMesh = this.group.getObjectByName('Dampler_open_1');
  509. if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = false;
  510. this.backDamperClosedMesh = this.group.getObjectByName('Damper_Closed_1');
  511. if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = true;
  512. this.frontDamperOpenMesh = this.group.getObjectByName('Damper_Open_2');
  513. if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = false;
  514. this.frontDamperClosedMesh = this.group.getObjectByName('Damper_Closed_2');
  515. if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = true;
  516. resolve(this.model);
  517. });
  518. });
  519. }
  520. destroy() {
  521. if (this.model) {
  522. if (this.mixers) {
  523. this.mixers.uncacheClip(this.clipActionArr.frontDoor.getClip());
  524. this.mixers.uncacheClip(this.clipActionArr.backDoor.getClip());
  525. this.mixers.uncacheAction(this.clipActionArr.frontDoor.getClip(), this.group);
  526. this.mixers.uncacheAction(this.clipActionArr.backDoor.getClip(), this.group);
  527. this.mixers.uncacheRoot(this.group);
  528. if (this.model.animations[0]) this.model.animations[0].tracks = [];
  529. }
  530. this.model.clearGroup(this.group);
  531. this.clipActionArr.backDoor = undefined;
  532. this.clipActionArr.frontDoor = undefined;
  533. this.mixers = undefined;
  534. // document.getElementById('damper3D').parentElement.remove(document.getElementById('damper3D'))
  535. }
  536. }
  537. }
  538. export default Fm1;