|
|
@@ -16,7 +16,7 @@ import MessageCom from '@/components/Message'
|
|
|
// new Vconsole()
|
|
|
|
|
|
// import { isLoc, myData } from './utils/http'
|
|
|
-const A1home = React.lazy(() => import('./pages/A1home'))
|
|
|
+const A1home = React.lazy(() => import('./pages/A1home2'))
|
|
|
const A1_1base = React.lazy(() => import('./pages/A0base'))
|
|
|
const A2yblm = React.lazy(() => import('./pages/A2yblm'))
|
|
|
const A3beie = React.lazy(() => import('./pages/A3beie'))
|
|
|
@@ -26,9 +26,6 @@ const A6ybwx = React.lazy(() => import('./pages/A6ybwx'))
|
|
|
const A7Wjwj = React.lazy(() => import('./pages/A7wjwj'))
|
|
|
const A6_1_zxys = React.lazy(() => import('./pages/A6ybwx/A6_1_zxys'))
|
|
|
const A6_2_zxzgh = React.lazy(() => import('./pages/A6ybwx/A6_2_zxzgh'))
|
|
|
-const A8byzh = React.lazy(() => import('./pages/A8byzh'))
|
|
|
-
|
|
|
-
|
|
|
|
|
|
declare global {
|
|
|
//设置全局属性
|
|
|
@@ -173,10 +170,12 @@ export default function App() {
|
|
|
const handleHashChange = () => {
|
|
|
if (window.location.hash === '#/base') {
|
|
|
callIframeFu('changePanel', 0)
|
|
|
+ callIframeFu('showInscription', -1)
|
|
|
callIframeFu('showHotspot', -1)
|
|
|
}
|
|
|
if (window.location.hash === '#/yblm') {
|
|
|
callIframeFu('changePanel', 1)
|
|
|
+ callIframeFu('showInscription', -1)
|
|
|
callIframeFu('showHotspot', -1)
|
|
|
}
|
|
|
if (window.location.hash === '#/beie') {
|
|
|
@@ -187,7 +186,7 @@ export default function App() {
|
|
|
callIframeFu('changePanel', 3)
|
|
|
callIframeFu('showInscription', -1)
|
|
|
}
|
|
|
- if (window.location.hash.includes('#/wenwu')) {
|
|
|
+ if (window.location.hash === '#/wenwu') {
|
|
|
callIframeFu('changePanel', 4)
|
|
|
callIframeFu('showInscription', -1)
|
|
|
callIframeFu('showHotspot', -1)
|
|
|
@@ -259,333 +258,333 @@ export default function App() {
|
|
|
|
|
|
|
|
|
// 更新unity页面
|
|
|
- // useEffect(() => {
|
|
|
- // if (envFlag) {
|
|
|
- // window.addEventListener('keyup', e => {
|
|
|
- // if (e.code === 'Enter') {
|
|
|
- // callIframeFu(
|
|
|
- // 'refreshAppSettings',
|
|
|
- // JSON.stringify(
|
|
|
- // {
|
|
|
- // panels: [
|
|
|
- // {
|
|
|
- // name: 'DefaultVirtualCamera',
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: 'Panel1Camera',
|
|
|
- // cameraOrthographicSize: 4,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: -10,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: 'Panel2Camera',
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: 'Panel3Camera',
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: 'Panel4Camera',
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: 0,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: 'Panel5Camera',
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // },
|
|
|
- // rotationNotAllowed: true
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // hotspots: [
|
|
|
- // {
|
|
|
- // name: '佛龛',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 1.1,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '佛像',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 0,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '佛龛两侧',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 0,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '佛龛上部',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 2,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '佛龛下部',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: -1,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -180,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '畏兽',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 2,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -90,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '飞天',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 0,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -90,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '摩尼宝珠',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 5,
|
|
|
- // viewportX: 0.5,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: -1,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: -90,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // inscriptions: [
|
|
|
- // {
|
|
|
- // name: '碑额',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 2,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 4.4,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: 0,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '碑文1',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 2,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: 0,
|
|
|
- // position: {
|
|
|
- // y: 3.6,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: 0,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '碑文2',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // position: {
|
|
|
- // y: 0,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: 0,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: '碑文3',
|
|
|
- // camera: {
|
|
|
- // cameraOrthographicSize: 9,
|
|
|
- // viewportX: 0,
|
|
|
- // offset: -10,
|
|
|
- // position: {
|
|
|
- // y: 0,
|
|
|
- // z: -50
|
|
|
- // }
|
|
|
- // },
|
|
|
- // model: {
|
|
|
- // rotation: {
|
|
|
- // x: 0,
|
|
|
- // y: 0,
|
|
|
- // z: 0
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }), 'json'
|
|
|
- // )
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }, [])
|
|
|
+ useEffect(() => {
|
|
|
+ if (envFlag) {
|
|
|
+ window.addEventListener('keyup', e => {
|
|
|
+ if (e.code === 'Enter') {
|
|
|
+ callIframeFu(
|
|
|
+ 'refreshAppSettings',
|
|
|
+ JSON.stringify(
|
|
|
+ {
|
|
|
+ panels: [
|
|
|
+ {
|
|
|
+ name: 'DefaultVirtualCamera',
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Panel1Camera',
|
|
|
+ cameraOrthographicSize: 4,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: -10,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Panel2Camera',
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Panel3Camera',
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Panel4Camera',
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Panel5Camera',
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rotationNotAllowed: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ hotspots: [
|
|
|
+ {
|
|
|
+ name: '佛龛',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 1.1,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '佛像',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 0,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '佛龛两侧',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 0,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '佛龛上部',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 2,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '佛龛下部',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: -1,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -180,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '畏兽',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 2,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -90,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '飞天',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 0,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -90,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '摩尼宝珠',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 5,
|
|
|
+ viewportX: 0.5,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: -1,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: -90,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ inscriptions: [
|
|
|
+ {
|
|
|
+ name: '碑额',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 2,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 4.4,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '碑文1',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 2,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: 0,
|
|
|
+ position: {
|
|
|
+ y: 3.6,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '碑文2',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ position: {
|
|
|
+ y: 0,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '碑文3',
|
|
|
+ camera: {
|
|
|
+ cameraOrthographicSize: 9,
|
|
|
+ viewportX: 0,
|
|
|
+ offset: -10,
|
|
|
+ position: {
|
|
|
+ y: 0,
|
|
|
+ z: -50
|
|
|
+ }
|
|
|
+ },
|
|
|
+ model: {
|
|
|
+ rotation: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ z: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }),'json'
|
|
|
+ )
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }, [])
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
@@ -603,7 +602,6 @@ export default function App() {
|
|
|
<Route path='/wjwj' component={A7Wjwj} exact />
|
|
|
<Route path='/zxys' component={A6_1_zxys} exact />
|
|
|
<Route path='/sinicize' component={A6_2_zxzgh} exact />
|
|
|
- <Route path='/byzh' component={A8byzh} exact />
|
|
|
<Route path='*' component={NotFound} />
|
|
|
</Switch>
|
|
|
</React.Suspense>
|