Skip to content
Snippets Groups Projects
Commit d26c6003 authored by johnshaughnessy's avatar johnshaughnessy
Browse files

When trying to make the mobile client fullscreen, keep it fullscreen.

parent 5236b39e
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import "./utils/logging";
import { patchWebGLRenderingContext } from "./utils/webgl";
patchWebGLRenderingContext();
import screenfull from "screenfull";
import "three/examples/js/loaders/GLTFLoader";
import "networked-aframe/src/index";
import "naf-janus-adapter";
......@@ -244,6 +245,10 @@ const onReady = async () => {
if (enterInVR) {
scene.enterVR();
} else if (AFRAME.utils.device.isMobile()) {
document.body.addEventListener("touchend", () => {
if (screenfull.enabled && !screenfull.isFullscreen) screenfull.request();
});
}
AFRAME.registerInputActions(inGameActions, "default");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment