small changes

This commit is contained in:
LionTion committed 2026-10-23 22:04:35 +02:00
1 parent 5724560171
commit 0e65b8c446
4 files changed
+16 -8

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: LayoutProps<"/">) { export default function RootLayout({ children }: LayoutProps<"/">) {
return ( return (
<html lang="en" dir="ltr" className={clsx("eisenkraft-regular")}> <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-title" content="Excalibur Outdoor Tour" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta httpEquiv="ScreenOrientation" content="autoRotate:disabled" /> <meta httpEquiv="ScreenOrientation" content="autoRotate:disabled" />
-1
View File
@@ -25,7 +25,6 @@ export default function Main() {
const step = Number.parseInt(stepStr) || 0; const step = Number.parseInt(stepStr) || 0;
useEffect(() => { useEffect(() => {
return;
if (!hasAttachedListerner && step > 0) { if (!hasAttachedListerner && step > 0) {
const doFullscreen = () => { const doFullscreen = () => {
if (screenfull.isEnabled) { if (screenfull.isEnabled) {
+14 -6
View File
@@ -35,13 +35,21 @@ export default function Riddle_7_AR_View({
const arSystem = sceneEl.systems['mindar-image-system']; const arSystem = sceneEl.systems['mindar-image-system'];
const handleRenderStart = () => { const startAR = () => {
if (arSystem) { if (arSystem) {
try {
arSystem.start(); 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) => { targetsRef.current.forEach((targetEl, index) => {
if (!targetEl) return; if (!targetEl) return;
@@ -51,7 +59,7 @@ export default function Riddle_7_AR_View({
const targetConfig = TARGET_CONFIG.find((t) => t.targetIndex === index); const targetConfig = TARGET_CONFIG.find((t) => t.targetIndex === index);
if (targetConfig) { if (targetConfig) {
setShowNextButton(false); setShowNextButton?.(false);
setActiveVideo(targetConfig); setActiveVideo(targetConfig);
} }
}; };
@@ -66,7 +74,7 @@ export default function Riddle_7_AR_View({
return () => { return () => {
if (sceneEl) { if (sceneEl) {
sceneEl.removeEventListener('renderstart', handleRenderStart); sceneEl.removeEventListener('loaded', startAR);
} }
if (arSystem) { if (arSystem) {
try { try {
@@ -125,8 +133,8 @@ export default function Riddle_7_AR_View({
position: 'fixed', position: 'fixed',
top: 0, top: 0,
left: 0, left: 0,
width: '100vw', width: '100dvw',
height: '100vh', height: '100dvh',
backgroundColor: '#000', backgroundColor: '#000',
zIndex: 9999, zIndex: 9999,
display: 'flex', display: 'flex',
+1 -1
View File
@@ -3,7 +3,7 @@
flex-direction: column; flex-direction: column;
height: 100dvh; height: 100dvh;
width: 100%; width: 100%;
overflow: hidden; overflow: auto;
} }
.top-bar { .top-bar {
position: absolute; position: absolute;