window.threejs.ts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. import * as THREE from 'three';
  2. import UseThree from '../../../../utils/threejs/useThree';
  3. import ddFc_5 from './dandaoFc.threejs'; // ddFc_5 单道-大窗2列扇叶
  4. import singleWindowXk from './dandaoFcXk.threejs';
  5. import ddFc_1 from './dandaoFcYjl.threejs'; // ddFc_1 单道_小窗两列扇叶
  6. import sdFc_1 from './shuangdaoFc.threejs'; // sdFc_1 双道-带小门
  7. import sdFc_3 from './shuangdaoFcBlt.threejs'; // sdFc_3 双道-带小门-小窗
  8. import sdFc_4 from './shuangdaoFcHj.threejs'; // sdFc_4 双道-带门-卷闸
  9. import sdFc_2 from './shuangdaoFcSw.threejs'; // sdFc_2 单道-带小门-2个窗
  10. import sdFc_5 from './shuangdaoFcYjl.threejs'; // sdFc_5 双道-小门(侧边下)-小窗(榆家梁)
  11. import ddFc_4 from './dandaoFcBd1.threejs'; // ddFc_4 单道-一个小窗两列扇叶
  12. import ddFc_2 from './dandaoFcBd2.threejs'; // ddFc_2 单道-一个大窗两列竖型扇叶
  13. import ddFc_6 from './dandaoFcHjt.threejs'; // ddFc_6 单道-大窗1列扇叶(活鸡兔)
  14. import ddFc_7 from './dandaoFcBd3.threejs'; // ddFc_6 单道-大窗1列扇叶(活鸡兔)
  15. import threeFc_8 from './sandaoFc.threejs'; // ddFc_8 三道-大窗2列门式扇叶(三道沟)
  16. import { animateCamera } from '/@/utils/threejs/util';
  17. import useEvent from '../../../../utils/threejs/useEvent';
  18. import { getDictItemsByCode } from '/@/utils/dict';
  19. // import * as dat from 'dat.gui';
  20. // const gui = new dat.GUI();
  21. // gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
  22. // 模型对象、 文字对象
  23. let model: UseThree,
  24. ddFc5: ddFc_5,
  25. ddFc1: ddFc_1,
  26. sdFc1: sdFc_1,
  27. sdFc3: sdFc_3,
  28. sdFc4: sdFc_4,
  29. sdFc2: sdFc_2,
  30. sdFc5: sdFc_5,
  31. ddFc2: ddFc_2,
  32. ddFc4: ddFc_4,
  33. ddFc6: ddFc_6,
  34. ddFc7: ddFc_7,
  35. threeFc8: threeFc_8,
  36. singleWindowXkObj: singleWindowXk,
  37. group: THREE.Object3D,
  38. windowType = 'ddFc1';
  39. const rotationParam = {
  40. frontDeg0: 0, // 前门初始
  41. frontDeg1: 0, // 前门目标
  42. centerDeg0: 0, // 前门初始
  43. centerDeg1: 0, // 前门目标
  44. backDeg0: 0, // 后门初始
  45. backDeg1: 0, // 后门目标
  46. };
  47. const { mouseDownFn } = useEvent();
  48. // 初始化左右摇摆动画
  49. const startAnimation = () => {
  50. // 定义鼠标点击事件
  51. model.canvasContainer?.addEventListener('mousedown', mouseEvent.bind(null));
  52. model.canvasContainer?.addEventListener('pointerup', (event) => {
  53. event.stopPropagation();
  54. // 单道、 双道
  55. if (windowType === 'ddFc5' && ddFc5) {
  56. ddFc5.mouseUpModel.call(ddFc5);
  57. } else if (windowType === 'ddFc1' && ddFc1) {
  58. ddFc1.mouseUpModel.call(ddFc1);
  59. } else if (windowType === 'ddFc2' && ddFc2) {
  60. ddFc2.mouseUpModel.call(ddFc2);
  61. } else if (windowType === 'ddFc4' && ddFc4) {
  62. ddFc4.mouseUpModel.call(ddFc4);
  63. } else if (windowType === 'ddFc6' && ddFc6) {
  64. ddFc6.mouseUpModel.call(ddFc6);
  65. } else if (windowType === 'ddFc7' && ddFc7) {
  66. ddFc7.mouseUpModel.call(ddFc7);
  67. } else if (windowType === 'sdFc1' && sdFc1) {
  68. sdFc1.mouseUpModel.call(sdFc1);
  69. } else if (windowType === 'sdFc3' && sdFc3) {
  70. sdFc3.mouseUpModel.call(sdFc3);
  71. } else if (windowType === 'sdFc4' && sdFc4) {
  72. sdFc4.mouseUpModel.call(sdFc4);
  73. } else if (windowType === 'sdFc2' && sdFc2) {
  74. sdFc2.mouseUpModel.call(sdFc2);
  75. } else if (windowType === 'sdFc5' && sdFc5) {
  76. sdFc5.mouseUpModel.call(sdFc5);
  77. } else if (windowType === 'threeFc8' && threeFc8) {
  78. threeFc8.mouseUpModel.call(threeFc8);
  79. } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
  80. singleWindowXkObj.mouseUpModel.call(singleWindowXkObj);
  81. }
  82. });
  83. };
  84. // 鼠标点击、松开事件
  85. const mouseEvent = (event) => {
  86. if (event.button == 0) {
  87. mouseDownFn(model, group, event, (intersects) => {
  88. if (windowType === 'ddFc5' && ddFc5) {
  89. ddFc5.mousedownModel.call(ddFc5, intersects);
  90. } else if (windowType === 'ddFc1' && ddFc1) {
  91. ddFc1.mousedownModel.call(ddFc1, intersects);
  92. } else if (windowType === 'ddFc2' && ddFc2) {
  93. ddFc2.mousedownModel.call(ddFc2, intersects);
  94. } else if (windowType === 'ddFc4' && ddFc4) {
  95. ddFc4.mousedownModel.call(ddFc4, intersects);
  96. } else if (windowType === 'ddFc6' && ddFc6) {
  97. ddFc6.mousedownModel.call(ddFc6, intersects);
  98. } else if (windowType === 'ddFc7' && ddFc7) {
  99. ddFc7.mousedownModel.call(ddFc7, intersects);
  100. } else if (windowType === 'sdFc1' && sdFc1) {
  101. sdFc1.mousedownModel.call(sdFc1, intersects);
  102. } else if (windowType === 'sdFc3' && sdFc3) {
  103. sdFc3.mousedownModel.call(sdFc3, intersects);
  104. } else if (windowType === 'sdFc4' && sdFc4) {
  105. sdFc4.mousedownModel.call(sdFc4, intersects);
  106. } else if (windowType === 'sdFc2' && sdFc2) {
  107. sdFc2.mousedownModel.call(sdFc2, intersects);
  108. } else if (windowType === 'sdFc5' && sdFc5) {
  109. sdFc5.mousedownModel.call(sdFc5, intersects);
  110. } else if (windowType === 'threeFc8' && threeFc8) {
  111. threeFc8.mousedownModel(intersects);
  112. } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
  113. singleWindowXkObj.mousedownModel.call(singleWindowXkObj, intersects);
  114. }
  115. });
  116. console.log('摄像头控制信息', model.orbitControls, model.camera);
  117. }
  118. };
  119. const addMouseEvent = () => {
  120. // 定义鼠标点击事件
  121. model.canvasContainer?.addEventListener('mousedown', mouseEvent.bind(null));
  122. // model.canvasContainer?.addEventListener('pointerup', mouseUp);
  123. };
  124. export const addMonitorText = (selectData) => {
  125. if (windowType === 'ddFc5' && ddFc5) {
  126. return ddFc5.addMonitorText.call(ddFc5, selectData);
  127. } else if (windowType === 'ddFc1' && ddFc1) {
  128. return ddFc1.addMonitorText.call(ddFc1, selectData);
  129. } else if (windowType === 'ddFc2' && ddFc2) {
  130. return ddFc2.addMonitorText.call(ddFc2, selectData);
  131. } else if (windowType === 'ddFc4' && ddFc4) {
  132. return ddFc4.addMonitorText.call(ddFc4, selectData);
  133. } else if (windowType === 'ddFc6' && ddFc6) {
  134. return ddFc6.addMonitorText.call(ddFc6, selectData);
  135. } else if (windowType === 'ddFc7' && ddFc7) {
  136. return ddFc7.addMonitorText.call(ddFc7, selectData);
  137. } else if (windowType === 'sdFc1' && sdFc1) {
  138. return sdFc1.addMonitorText.call(sdFc1, selectData);
  139. } else if (windowType === 'sdFc3' && sdFc3) {
  140. return sdFc3.addMonitorText.call(sdFc3, selectData);
  141. } else if (windowType === 'sdFc4' && sdFc4) {
  142. return sdFc4.addMonitorText.call(sdFc4, selectData);
  143. } else if (windowType === 'sdFc2' && sdFc2) {
  144. return sdFc2.addMonitorText.call(sdFc2, selectData);
  145. } else if (windowType === 'sdFc5' && sdFc5) {
  146. return sdFc5.addMonitorText.call(sdFc5, selectData);
  147. } else if (windowType === 'threeFc8' && threeFc8) {
  148. return threeFc8.addMonitorText(selectData);
  149. } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
  150. return singleWindowXkObj.addMonitorText.call(singleWindowXkObj, selectData);
  151. }
  152. };
  153. export function computePlay(data, maxarea, isFirst = false) {
  154. const isJz = data.windowModal == 'sdFc4';
  155. if (windowType === 'singleXkWindow') {
  156. const acosToAngle = (cosValue) => {
  157. cosValue = Math.max(Math.min(cosValue, 1), -1);
  158. // 计算角度
  159. return Math.asin(cosValue) * (180 / Math.PI);
  160. };
  161. const sina = Math.sqrt((Math.sin((78 * Math.PI) / 180) ** 2 * parseFloat(data.forntArea)) / parseFloat(maxarea));
  162. const angleInRadians = acosToAngle(sina);
  163. rotationParam.frontDeg1 = angleInRadians;
  164. if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
  165. // 当返回值有误时默认关闭
  166. play(rotationParam, 0);
  167. } else {
  168. setTimeout(() => {
  169. play(rotationParam, 1);
  170. }, 0);
  171. }
  172. } else {
  173. if (data.OpenDegree || data.OpenDegree1 || data.OpenDegree2 || data.OpenDegree3) {
  174. maxarea = 180;
  175. if (data.OpenDegree) {
  176. rotationParam.frontDeg0 = (180 / maxarea) * Number(isFirst ? 0 : data.OpenDegree);
  177. rotationParam.frontDeg1 = (180 / maxarea) * Number(data.OpenDegree) || 0;
  178. }
  179. if (data.OpenDegree1) {
  180. rotationParam.frontDeg0 = (180 / maxarea) * Number(isFirst ? 0 : data.OpenDegree1);
  181. rotationParam.frontDeg1 = (180 / maxarea) * Number(data.OpenDegree1) || 0;
  182. }
  183. if (data.OpenDegree2) {
  184. rotationParam.backDeg0 = (180 / maxarea) * Number(isFirst ? 0 : data.OpenDegree2);
  185. rotationParam.backDeg1 = (180 / maxarea) * Number(data.OpenDegree2) || 0;
  186. }
  187. if (data.OpenDegree3) {
  188. rotationParam.centerDeg0 = (180 / maxarea) * Number(isFirst ? 0 : data.OpenDegree3);
  189. rotationParam.centerDeg1 = (180 / maxarea) * Number(data.OpenDegree3) || 0;
  190. }
  191. } else {
  192. // 这里判断是扇叶模型还是卷闸模型,如果是卷闸模型时
  193. if (isJz) {
  194. rotationParam.frontDeg0 = 0;
  195. rotationParam.backDeg0 = 0;
  196. rotationParam.frontDeg1 = data.forntArea / maxarea;
  197. rotationParam.backDeg1 = data.rearArea / maxarea;
  198. } else {
  199. if (!maxarea) maxarea = 90;
  200. rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.forntArea);
  201. rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearArea);
  202. rotationParam.frontDeg1 = (90 / maxarea) * Number(data.forntArea) || 0;
  203. rotationParam.backDeg1 = (90 / maxarea) * Number(data.rearArea) || 0;
  204. if (windowType == 'threeFc8') {
  205. rotationParam.centerDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.middleArea);
  206. rotationParam.centerDeg1 = (90 / maxarea) * Number(data.middleArea) || 0;
  207. }
  208. }
  209. }
  210. if (isJz) {
  211. play(1, { scaleY: data.frontArea / maxarea });
  212. play(2, { scaleY: data.rearArea / maxarea });
  213. play(3, { scaleY: data.frontArea3 / maxarea });
  214. play(4, { scaleY: data.frontArea4 / maxarea });
  215. } else {
  216. if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
  217. // 当返回值有误时默认关闭
  218. play(rotationParam, 0);
  219. } else {
  220. setTimeout(() => {
  221. play(rotationParam, 1);
  222. }, 0);
  223. if (data.nwindownum == 2) {
  224. setTimeout(() => {
  225. play(rotationParam, 2);
  226. }, 0);
  227. }
  228. if (data.nwindownum == 3) {
  229. setTimeout(() => {
  230. play(rotationParam, 2);
  231. }, 0);
  232. setTimeout(() => {
  233. play(rotationParam, 3);
  234. }, 0);
  235. }
  236. }
  237. }
  238. }
  239. }
  240. export const play = (rotationParam, flag) => {
  241. if (windowType === 'ddFc5' && ddFc5) {
  242. return ddFc5.play.call(ddFc5, rotationParam, flag);
  243. } else if (windowType === 'ddFc1' && ddFc1) {
  244. return ddFc1.play.call(ddFc1, rotationParam, flag);
  245. } else if (windowType === 'ddFc2' && ddFc2) {
  246. return ddFc2.play.call(ddFc2, rotationParam, flag);
  247. } else if (windowType === 'ddFc4' && ddFc4) {
  248. return ddFc4.play.call(ddFc4, rotationParam, flag);
  249. } else if (windowType === 'ddFc6' && ddFc6) {
  250. return ddFc6.play.call(ddFc6, rotationParam, flag);
  251. } else if (windowType === 'ddFc7' && ddFc7) {
  252. return ddFc7.play.call(ddFc7, rotationParam, flag);
  253. } else if (windowType === 'sdFc1' && sdFc1) {
  254. return sdFc1.play.call(sdFc1, rotationParam, flag);
  255. } else if (windowType === 'sdFc3' && sdFc3) {
  256. return sdFc3.play.call(sdFc3, rotationParam, flag);
  257. } else if (windowType === 'sdFc4' && sdFc4) {
  258. return sdFc4.play.call(sdFc4, rotationParam, flag);
  259. } else if (windowType === 'sdFc2' && sdFc2) {
  260. return sdFc2.play.call(sdFc2, rotationParam, flag);
  261. } else if (windowType === 'sdFc5' && sdFc5) {
  262. return sdFc5.play.call(sdFc5, rotationParam, flag);
  263. } else if (windowType === 'threeFc8' && threeFc8) {
  264. return threeFc8.play(rotationParam, flag);
  265. } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
  266. return singleWindowXkObj.play.call(singleWindowXkObj, rotationParam, flag);
  267. }
  268. };
  269. // 切换风窗类型
  270. export const setModelType = (type) => {
  271. // if (!model || !model.scene) return;
  272. windowType = type;
  273. const windowConfigurations = {
  274. sdFc1: {
  275. render: sdFc1 ? () => sdFc1.render() : null,
  276. group: sdFc1 ? sdFc1.group : null,
  277. newP: { x: 66.257, y: 57.539, z: 94.313 },
  278. newT: { x: 0, y: 0, z: 0 },
  279. },
  280. ddFc5: {
  281. render: ddFc5 ? () => ddFc5.render() : null,
  282. group: ddFc5 ? ddFc5.group : null,
  283. newP: { x: 66.257, y: 57.539, z: 94.313 },
  284. newT: { x: 0, y: 0, z: 0 },
  285. },
  286. ddFc6: {
  287. render: ddFc6 ? () => ddFc6.render() : null,
  288. group: ddFc6 ? ddFc6.group : null,
  289. newP: { x: 66.257, y: 57.539, z: 94.313 },
  290. newT: { x: 0, y: 0, z: 0 },
  291. },
  292. ddFc7: {
  293. render: ddFc7 ? () => ddFc7.render() : null,
  294. group: ddFc7 ? ddFc7.group : null,
  295. newP: { x: 66.257, y: 57.539, z: 94.313 },
  296. newT: { x: 0, y: 0, z: 0 },
  297. },
  298. ddFc1: {
  299. render: ddFc1 ? () => ddFc1.render() : null,
  300. group: ddFc1 ? ddFc1.group : null,
  301. newP: { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 },
  302. newT: { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 },
  303. },
  304. ddFc2: {
  305. render: ddFc2 ? () => ddFc2.render() : null,
  306. group: ddFc2 ? ddFc2.group : null,
  307. newP: { x: 66.257, y: 57.539, z: 94.313 },
  308. newT: { x: 0, y: 0, z: 0 },
  309. },
  310. ddFc4: {
  311. render: ddFc4 ? () => ddFc4.render() : null,
  312. group: ddFc4 ? ddFc4.group : null,
  313. newP: { x: 66.257, y: 57.539, z: 94.313 },
  314. newT: { x: 0, y: 0, z: 0 },
  315. },
  316. sdFc3: {
  317. render: sdFc3 ? () => sdFc3.render() : null,
  318. group: sdFc3 ? sdFc3.group : null,
  319. newP: { x: 66.257, y: 57.539, z: 94.313 },
  320. newT: { x: 0, y: 0, z: 0 },
  321. },
  322. sdFc4: {
  323. render: sdFc4 ? () => sdFc4.render() : null,
  324. group: sdFc4 ? sdFc4.group : null,
  325. newP: { x: 66.257, y: 57.539, z: 94.313 },
  326. newT: { x: 0, y: 0, z: 0 },
  327. },
  328. sdFc2: {
  329. render: sdFc2 ? () => sdFc2.render() : null,
  330. group: sdFc2 ? sdFc2.group : null,
  331. newP: { x: 66.257, y: 57.539, z: 94.313 },
  332. newT: { x: 0, y: 0, z: 0 },
  333. },
  334. sdFc5: {
  335. render: sdFc5 ? () => sdFc5.render() : null,
  336. group: sdFc5 ? sdFc5.group : null,
  337. newP: { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 },
  338. newT: { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 },
  339. },
  340. threeFc8: {
  341. render: threeFc8 ? () => threeFc8.render() : null,
  342. group: threeFc8 ? threeFc8.group : null,
  343. newP: { x: 70.79925059068043, y: 61.89235869996884, z: 107.07997293517579 },
  344. newT: { x: 15.353809053159333, y: 8.712511207091119, z: -13.223119892513122 },
  345. },
  346. singleXkWindow: {
  347. render: singleWindowXkObj ? () => singleWindowXkObj.render() : null,
  348. group: singleWindowXkObj ? singleWindowXkObj.group : null,
  349. newP: { x: 116.08531358656566, y: 81.45510733175816, z: 193.00752046594465 },
  350. newT: { x: 23.446366480086372, y: -12.335134633777185, z: -5.63294282643405 },
  351. },
  352. };
  353. const oldCameraPosition = { x: 100, y: 0, z: 10 };
  354. model.scene?.remove(group);
  355. function handleWindowType(windowType: string, model: any) {
  356. const config = windowConfigurations[windowType];
  357. if (config && config.group) {
  358. model.startAnimation = config.render;
  359. group = config.group;
  360. return new Promise((resolve) => {
  361. setTimeout(async () => {
  362. await animateCamera(oldCameraPosition, { x: 0, y: 0, z: 0 }, config.newP, config.newT, model);
  363. model.scene?.add(config.group);
  364. resolve(null);
  365. }, 1000);
  366. });
  367. } else {
  368. throw new Error(`Unsupported windowType: ${windowType}`);
  369. }
  370. }
  371. return handleWindowType(windowType, model);
  372. };
  373. export const mountedThree = () => {
  374. // const { sysOrgCode } = useGlobSetting();
  375. // const sysOrgCode = 'zmhjhzmy';
  376. return new Promise(async (resolve) => {
  377. model = new UseThree('#window3D');
  378. if (!model || !model.renderer || !model.camera) return;
  379. model.setEnvMap('royal_esplanade_1k.hdr');
  380. model.renderer.toneMappingExposure = 1.8;
  381. model.camera.position.set(100, 0, 1000);
  382. // 根据模型类型判断要初始化哪些模型
  383. const dictCodes = getDictItemsByCode('windowModalType');
  384. for (let i = 0; i < dictCodes.length; i++) {
  385. const dict = dictCodes[i];
  386. switch (dict.value) {
  387. case 'sdFc1':
  388. sdFc1 = new sdFc_1(model);
  389. await sdFc1.mountedThree();
  390. break;
  391. case 'ddFc5':
  392. ddFc5 = new ddFc_5(model);
  393. await ddFc5.mountedThree();
  394. break;
  395. case 'ddFc1':
  396. ddFc1 = new ddFc_1(model);
  397. await ddFc1.mountedThree();
  398. break;
  399. case 'ddFc2':
  400. ddFc2 = new ddFc_2(model);
  401. await ddFc2.mountedThree();
  402. break;
  403. case 'ddFc4':
  404. ddFc4 = new ddFc_4(model);
  405. await ddFc4.mountedThree();
  406. break;
  407. case 'ddFc6':
  408. ddFc6 = new ddFc_6(model);
  409. await ddFc6.mountedThree();
  410. break;
  411. case 'ddFc7':
  412. ddFc7 = new ddFc_7(model);
  413. await ddFc7.mountedThree();
  414. break;
  415. case 'sdFc3':
  416. sdFc3 = new sdFc_3(model);
  417. await sdFc3.mountedThree();
  418. break;
  419. case 'sdFc4':
  420. sdFc4 = new sdFc_4(model);
  421. await sdFc4.mountedThree();
  422. break;
  423. case 'sdFc2':
  424. sdFc2 = new sdFc_2(model);
  425. await sdFc2.mountedThree();
  426. break;
  427. case 'sdFc5':
  428. sdFc5 = new sdFc_5(model);
  429. await sdFc5.mountedThree();
  430. break;
  431. case 'threeFc8':
  432. threeFc8 = new threeFc_8(model);
  433. await threeFc8.mountedThree();
  434. break;
  435. case 'singleXkWindow':
  436. singleWindowXkObj = new singleWindowXk(model);
  437. await singleWindowXkObj.mountedThree();
  438. break;
  439. }
  440. }
  441. model.animate();
  442. // addMouseEvent();
  443. resolve(null);
  444. });
  445. };
  446. export const destroy = () => {
  447. if (model) {
  448. model.isRender = false;
  449. console.log('场景销毁前信息----------->', model.renderer?.info);
  450. model.isRender = false;
  451. if (ddFc5) ddFc5.destroy();
  452. if (ddFc1) ddFc1.destroy();
  453. if (ddFc2) ddFc2.destroy();
  454. if (ddFc4) ddFc4.destroy();
  455. if (ddFc6) ddFc6.destroy();
  456. if (ddFc7) ddFc7.destroy();
  457. if (sdFc1) sdFc1.destroy();
  458. if (sdFc3) sdFc3.destroy();
  459. if (sdFc4) sdFc4.destroy();
  460. if (sdFc2) sdFc2.destroy();
  461. if (sdFc5) sdFc5.destroy();
  462. if (threeFc8) threeFc8.destroy();
  463. singleWindowXkObj.destroy();
  464. model.destroy();
  465. model = null;
  466. group = null;
  467. singleWindowXkObj = null;
  468. ddFc5 = null;
  469. ddFc1 = null;
  470. ddFc2 = null;
  471. ddFc4 = null;
  472. ddFc6 = null;
  473. ddFc7 = null;
  474. sdFc1 = null;
  475. sdFc3 = null;
  476. sdFc4 = null;
  477. sdFc2 = null;
  478. sdFc5 = null;
  479. threeFc8 = null;
  480. }
  481. };