small changes
This commit is contained in:
1 parent
5724560171
commit
0e65b8c446
4 files changed
+17
-9
No files matched your search
@@ -11,6 +11,7 @@ export const metadata: Metadata = {
|
||||
export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||
return (
|
||||
<html lang="en" dir="ltr" className={clsx("eisenkraft-regular")}>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content" />
|
||||
<meta name="apple-mobile-web-app-title" content="Excalibur Outdoor Tour" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta httpEquiv="ScreenOrientation" content="autoRotate:disabled" />
|
||||
|
||||
@@ -25,7 +25,6 @@ export default function Main() {
|
||||
const step = Number.parseInt(stepStr) || 0;
|
||||
|
||||
useEffect(() => {
|
||||
return;
|
||||
if (!hasAttachedListerner && step > 0) {
|
||||
const doFullscreen = () => {
|
||||
if (screenfull.isEnabled) {
|
||||
|
||||
@@ -35,13 +35,21 @@ export default function Riddle_7_AR_View({
|
||||
|
||||
const arSystem = sceneEl.systems['mindar-image-system'];
|
||||
|
||||
const handleRenderStart = () => {
|
||||
const startAR = () => {
|
||||
if (arSystem) {
|
||||
arSystem.start();
|
||||
try {
|
||||
arSystem.start();
|
||||
} catch (error) {
|
||||
console.warn('AR System start error:', error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
sceneEl.addEventListener('renderstart', handleRenderStart);
|
||||
if (sceneEl.hasLoaded) {
|
||||
startAR();
|
||||
} else {
|
||||
sceneEl.addEventListener('loaded', startAR, { once: true });
|
||||
}
|
||||
|
||||
targetsRef.current.forEach((targetEl, index) => {
|
||||
if (!targetEl) return;
|
||||
@@ -51,7 +59,7 @@ export default function Riddle_7_AR_View({
|
||||
|
||||
const targetConfig = TARGET_CONFIG.find((t) => t.targetIndex === index);
|
||||
if (targetConfig) {
|
||||
setShowNextButton(false);
|
||||
setShowNextButton?.(false);
|
||||
setActiveVideo(targetConfig);
|
||||
}
|
||||
};
|
||||
@@ -66,7 +74,7 @@ export default function Riddle_7_AR_View({
|
||||
|
||||
return () => {
|
||||
if (sceneEl) {
|
||||
sceneEl.removeEventListener('renderstart', handleRenderStart);
|
||||
sceneEl.removeEventListener('loaded', startAR);
|
||||
}
|
||||
if (arSystem) {
|
||||
try {
|
||||
@@ -125,8 +133,8 @@ export default function Riddle_7_AR_View({
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
width: '100dvw',
|
||||
height: '100dvh',
|
||||
backgroundColor: '#000',
|
||||
zIndex: 9999,
|
||||
display: 'flex',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
flex-direction: column;
|
||||
height: 100dvh;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
overflow: auto;
|
||||
}
|
||||
.top-bar {
|
||||
position: absolute;
|
||||
|
||||
Reference in new issue
Block a user