From 62100d91693ac625580f33f2abd11dcd2dcc38cd Mon Sep 17 00:00:00 2001 From: Percen <21pesi1bif@hft-stuttgart.de> Date: Mon, 9 Dec 2024 13:39:46 +0000 Subject: [PATCH] Update public/index.html --- public/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/index.html b/public/index.html index 5287b27..1f432d1 100644 --- a/public/index.html +++ b/public/index.html @@ -96,6 +96,16 @@ loader.load("https://immersive-web.github.io/webxr-samples/media/gltf/sunflower/ flower = gltf.scene; }); + +session.addEventListener("select", (event) => { + if (flower) { + const clone = flower.clone(); + clone.position.copy(reticle.position); + scene.add(clone); + } +}); + + // Create a render loop that allows us to draw on the AR view. const onXRFrame = (time, frame) => { -- GitLab