From 91f23d187b91e85b9fedaefe3e8243ac86b49694 Mon Sep 17 00:00:00 2001 From: Percen <21pesi1bif@hft-stuttgart.de> Date: Sat, 14 Dec 2024 14:20:38 +0000 Subject: [PATCH] Update public/index.html --- public/index.html | 282 ++++++++++++++++++++-------------------------- 1 file changed, 122 insertions(+), 160 deletions(-) diff --git a/public/index.html b/public/index.html index f20a77c..18cc291 100644 --- a/public/index.html +++ b/public/index.html @@ -3,171 +3,133 @@ - AR-Menü Overlay - - - - -
- - - - - + 3D-Menü in AR - - + } +} + +// AR starten +if (navigator.xr) { + const startButton = document.createElement('button'); + startButton.textContent = 'Start AR'; + startButton.style.cssText = "position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 15px; font-size: 18px;"; + document.body.appendChild(startButton); + startButton.onclick = () => { + startButton.remove(); + activateXR(); + }; +} else { + alert('WebXR wird nicht unterstützt.'); +} + -- GitLab