|
@@ -699,6 +699,23 @@ export const initCameraCanvas = async (playerVal1) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const loadModel = (code): Promise<any> => {
|
|
|
+ if (code === 'Fm1') return import('./gate.threejs.yy').then((r) => r.default);
|
|
|
+ if (code === 'Fm3') return import('./gate.threejs.qd').then((r) => r.default);
|
|
|
+ if (code === 'FmXR') return import('./gate.threejs.xr').then((r) => r.default);
|
|
|
+ if (code === 'Fm2') return import('./gate.threejs.three').then((r) => r.default);
|
|
|
+ if (code === 'FmTwoSs') return import('./gate.threejs.two.ss').then((r) => r.default);
|
|
|
+ if (code === 'FmThreeTl') return import('./gate.threejs.three.tl').then((r) => r.default);
|
|
|
+ if (code === 'FmDc') return import('./gate.threejs.window').then((r) => r.default);
|
|
|
+ if (code === 'FmDcHJG') return import('./gate.threejs.window.hjg').then((r) => r.default);
|
|
|
+ if (code === 'FmDcZHQ') return import('./gate.threejs.window.zhq').then((r) => r.default);
|
|
|
+ if (code === 'FmHsw3') return import('./gate.threejs.three.hsw').then((r) => r.default);
|
|
|
+ if (code === 'FmYjXr') return import('./gate.threejs.two.yj').then((r) => r.default); // 姚街行人
|
|
|
+ if (code === 'FmYj') return import('./gate.threejs.yj').then((r) => r.default); // 姚街
|
|
|
+ if (code === 'FmSp1') return import('./gate.threejs.one.sp').then((r) => r.default);
|
|
|
+ return import('./gate.threejs.yy').then((r) => r.default);
|
|
|
+};
|
|
|
+
|
|
|
export const mountedThree = (playerDom) => {
|
|
|
// const { sysOrgCode } = useGlobSetting();
|
|
|
// const sysOrgCode = 'gsgszdek';
|
|
@@ -713,55 +730,67 @@ export const mountedThree = (playerDom) => {
|
|
|
const dict = dictCodes[i];
|
|
|
switch (dict.value) {
|
|
|
case 'fmXr':
|
|
|
+ const FmXR = await loadModel('FmXR');
|
|
|
fmXr = new FmXR(model);
|
|
|
fmXr.mountedThree(playerDom);
|
|
|
break;
|
|
|
case 'fmYy':
|
|
|
+ const Fm1 = await loadModel('Fm1');
|
|
|
fm1 = new Fm1(model);
|
|
|
fm1.mountedThree(playerDom);
|
|
|
break;
|
|
|
case 'gate_qd':
|
|
|
+ const Fm3 = await loadModel('Fm3');
|
|
|
fm3 = new Fm3(model);
|
|
|
await fm3.mountedThree();
|
|
|
break;
|
|
|
case 'fmSs':
|
|
|
+ const FmTwoSs = await loadModel('FmTwoSs');
|
|
|
fmTwoSs = new FmTwoSs(model);
|
|
|
await fmTwoSs.mountedThree();
|
|
|
break;
|
|
|
case 'fmtl3':
|
|
|
+ const FmThreeTl = await loadModel('FmThreeTl');
|
|
|
fmThreeTl = new FmThreeTl(model);
|
|
|
await fmThreeTl.mountedThree();
|
|
|
break;
|
|
|
case 'fmSs3':
|
|
|
+ const Fm2 = await loadModel('Fm2');
|
|
|
fm2 = new Fm2(model);
|
|
|
await fm2.mountedThree();
|
|
|
break;
|
|
|
case 'fm_fc_hjg':
|
|
|
+ const FmDcHJG = await loadModel('FmDcHJG');
|
|
|
fmWindowHjg = new FmDcHJG(model);
|
|
|
await fmWindowHjg.mountedThree();
|
|
|
break;
|
|
|
case 'fm_fc':
|
|
|
+ const FmDc = await loadModel('FmDc');
|
|
|
fmWindow = new FmDc(model);
|
|
|
await fmWindow.mountedThree();
|
|
|
break;
|
|
|
case 'fm_fc_zhq': //fmWindowZhq
|
|
|
+ const FmDcZHQ = await loadModel('FmDcZHQ');
|
|
|
fmWindowZhq = new FmDcZHQ(model);
|
|
|
await fmWindowZhq.mountedThree();
|
|
|
break;
|
|
|
case 'fmHsw3':
|
|
|
+ const FmHsw3 = await loadModel('FmHsw3');
|
|
|
fmHsw3 = new FmHsw3(model);
|
|
|
await fmHsw3.mountedThree();
|
|
|
break;
|
|
|
case 'fmYjXr':
|
|
|
+ const FmYjXr = await loadModel('FmYjXr');
|
|
|
fmYjXr = new FmYjXr(model);
|
|
|
await fmYjXr.mountedThree();
|
|
|
break;
|
|
|
case 'fmYj':
|
|
|
+ const FmYj = await loadModel('FmYj');
|
|
|
fmYj = new FmYj(model);
|
|
|
await fmYj.mountedThree();
|
|
|
break;
|
|
|
case 'fmSp1':
|
|
|
- debugger;
|
|
|
+ const FmSp1 = await loadModel('FmSp1');
|
|
|
fmSp1 = new FmSp1(model);
|
|
|
await fmSp1.mountedThree();
|
|
|
break;
|
|
@@ -769,18 +798,24 @@ export const mountedThree = (playerDom) => {
|
|
|
}
|
|
|
resolve(null);
|
|
|
} else {
|
|
|
+ const Fm3 = await loadModel('Fm3');
|
|
|
fm3 = new Fm3(model);
|
|
|
fm3.mountedThree(playerDom);
|
|
|
+ const FmTwoSs = await loadModel('FmTwoSs');
|
|
|
fmTwoSs = new FmTwoSs(model);
|
|
|
fmTwoSs.mountedThree(playerDom);
|
|
|
+ const Fm2 = await loadModel('Fm2');
|
|
|
fm2 = new Fm2(model);
|
|
|
fm2.mountedThree(playerDom);
|
|
|
// 三道门
|
|
|
+ const FmThreeTl = await loadModel('FmThreeTl');
|
|
|
fmThreeTl = new FmThreeTl(model);
|
|
|
if (fmThreeTl) fmThreeTl.mountedThree(playerDom);
|
|
|
+ const FmXR = await loadModel('FmXR');
|
|
|
fmXr = new FmXR(model);
|
|
|
fmXr.mountedThree(playerDom);
|
|
|
// 液压风门
|
|
|
+ const Fm1 = await loadModel('Fm1');
|
|
|
fm1 = new Fm1(model);
|
|
|
fm1.mountedThree(playerDom);
|
|
|
resolve(null);
|