fullscreen (deactivated)
This commit is contained in:
1 parent
307b6fc77c
commit
d0fc9d4019
5 files changed
+42
-7
No files matched your search
Generated
+13
@@ -16,6 +16,7 @@
|
|||||||
"next": "16.3.4",
|
"next": "16.3.4",
|
||||||
"react": "19.2.8",
|
"react": "19.2.8",
|
||||||
"react-dom": "19.2.8",
|
"react-dom": "19.2.8",
|
||||||
|
"screenfull": "^6.0.2",
|
||||||
"three": "npm:super-three@0.184.0"
|
"three": "npm:super-three@0.184.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -8090,6 +8091,18 @@
|
|||||||
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
|
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/screenfull": {
|
||||||
|
"version": "6.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-6.0.2.tgz",
|
||||||
|
"integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/seedrandom": {
|
"node_modules/seedrandom": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
|
||||||
|
|||||||
+8
-5
@@ -10,14 +10,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@serwist/next": "^9.5.12",
|
"@serwist/next": "^9.5.12",
|
||||||
|
"aframe": "^1.4.2",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"maplibre-gl": "^6.8.0",
|
"maplibre-gl": "^6.8.0",
|
||||||
|
"mind-ar": "^1.2.1",
|
||||||
"next": "16.3.4",
|
"next": "16.3.4",
|
||||||
"react": "19.2.8",
|
"react": "19.2.8",
|
||||||
"react-dom": "19.2.8",
|
"react-dom": "19.2.8",
|
||||||
"three": "npm:super-three@0.184.0",
|
"screenfull": "^6.0.2",
|
||||||
"aframe": "^1.4.2",
|
"three": "npm:super-three@0.184.0"
|
||||||
"mind-ar": "^1.2.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@serwist/turbopack": "^9.5.12",
|
"@serwist/turbopack": "^9.5.12",
|
||||||
@@ -33,7 +34,9 @@
|
|||||||
},
|
},
|
||||||
"allowScripts": {
|
"allowScripts": {
|
||||||
"unrs-resolver@1.12.2": true,
|
"unrs-resolver@1.12.2": true,
|
||||||
"@swc/core@1.15.46": true,
|
"@swc/core@1.16.13": true,
|
||||||
"esbuild@0.28.2": true
|
"canvas@2.11.2": true,
|
||||||
|
"core-js@3.29.1": true,
|
||||||
|
"esbuild@0.25.12": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ 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="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 httpEquiv="ScreenOrientation" content="autoRotate:disabled" />
|
<meta httpEquiv="ScreenOrientation" content="autoRotate:disabled" />
|
||||||
<body>
|
<body>
|
||||||
<SerwistProvider swUrl="/serwist/sw.js">{children}</SerwistProvider>
|
<SerwistProvider swUrl="/serwist/sw.js">{children}</SerwistProvider>
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ export default function manifest(): MetadataRoute.Manifest {
|
|||||||
return {
|
return {
|
||||||
name: 'Excaliburs Erben',
|
name: 'Excaliburs Erben',
|
||||||
short_name: 'Exc. Erben',
|
short_name: 'Exc. Erben',
|
||||||
description: '',
|
description: 'Eine sagenhafte Outdoor-Tour',
|
||||||
//start_url: '/', Disables the default website install popup
|
start_url: '/',
|
||||||
display: 'fullscreen',
|
display: 'fullscreen',
|
||||||
orientation: "portrait-primary",
|
orientation: "portrait-primary",
|
||||||
background_color: '#000000',
|
background_color: '#000000',
|
||||||
|
|||||||
@@ -15,13 +15,31 @@ import Tour from "@/components/screens/Tour";
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import StyledContainer from "@/components/StyledContainer";
|
import StyledContainer from "@/components/StyledContainer";
|
||||||
import Outro from "@/components/screens/Outro";
|
import Outro from "@/components/screens/Outro";
|
||||||
|
import screenfull from 'screenfull';
|
||||||
|
|
||||||
export default function Main() {
|
export default function Main() {
|
||||||
const [ stepStr, setStep ] = useLocalStorage(PREF.step, "0");
|
const [ stepStr, setStep ] = useLocalStorage(PREF.step, "0");
|
||||||
const [ players, setPlayers ] = useLocalStorage(PREF.players, "");
|
const [ players, setPlayers ] = useLocalStorage(PREF.players, "");
|
||||||
const [ tourCode, setTourCode ] = useLocalStorage(PREF.code, "");
|
const [ tourCode, setTourCode ] = useLocalStorage(PREF.code, "");
|
||||||
|
const [ hasAttachedListerner, setHasAttachedListener ] = useState(false);
|
||||||
const step = Number.parseInt(stepStr) || 0;
|
const step = Number.parseInt(stepStr) || 0;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!hasAttachedListerner && step > 0) {
|
||||||
|
const doFullscreen = () => {
|
||||||
|
return;
|
||||||
|
if (screenfull.isEnabled) {
|
||||||
|
screenfull.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.addEventListener("click", () => {
|
||||||
|
doFullscreen();
|
||||||
|
});
|
||||||
|
setHasAttachedListener(true);
|
||||||
|
doFullscreen();
|
||||||
|
}
|
||||||
|
}, [step, hasAttachedListerner, setHasAttachedListener]);
|
||||||
|
|
||||||
const content = [
|
const content = [
|
||||||
(<WelcomeScreen key={0}/>),
|
(<WelcomeScreen key={0}/>),
|
||||||
(<Intro key={1} />),
|
(<Intro key={1} />),
|
||||||
|
|||||||
Reference in new issue
Block a user