Skip to content

Commit

Permalink
This should / might fix the orientation to landscape on mobile and ma…
Browse files Browse the repository at this point in the history
…ke it fullscreen
  • Loading branch information
mvriel committed Dec 19, 2024
1 parent 0845f74 commit f6e8e0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Assets/WebGLTemplates/Netherlands3D/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@
};
if (isMobileDevice) {
config.devicePixelRatio = 2;

screen.orientation
.lock("landscape")
.then(() => { console.log(`Locked to "landscape"`); })
.catch((error) => { console.error(`${error}`); });

container.requestFullscreen().catch((error) => { console.error(`${error}`); });
}

mobileWarning.classList.remove('--visible');
Expand Down

0 comments on commit f6e8e0f

Please sign in to comment.