Commit b8d9b2f4 authored by Arif's avatar Arif
Browse files

Update 2-Hit.html

parent b4260b5c
Pipeline #8302 passed with stage
in 4 seconds
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Tap to Place</title>
<title>Tap to Place Demo</title>
<!-- three.js -->
<script src="https://unpkg.com/three@0.126.0/build/three.js"></script>
......@@ -15,7 +15,7 @@
<!-- Starting an immersive WebXR session requires user interaction.
We start this one with a simple button. -->
<button onclick="activateXR()">Start Tap to Place</button>
<button onclick="activateXR()">Start Tap to Place Demo</button>
<script>
async function activateXR() {
// Add a canvas element and initialize a WebGL context that is compatible with WebXR.
......@@ -71,7 +71,7 @@ loader.load("https://immersive-web.github.io/webxr-samples/media/gltf/reticle/re
})
let flower;
loader.load("https://transfer.hft-stuttgart.de/gitlab/azizularif/ar/-/raw/master/Arif/hanging_picture_frame_02_4k.gltf", function(gltf) {
loader.load("https://transfer.hft-stuttgart.de/gitlab/22azah1mpg/ar_civ2/-/raw/master/gltf/Unity2Skfb.gltf", function(gltf) {
flower = gltf.scene;
});
......@@ -79,7 +79,7 @@ session.addEventListener("select", (event) => {
if (flower) {
const clone = flower.clone();
// Set the desired scale for the icon.
// const iconScale = 0.1; // Adjust the scale value as needed
const iconScale = 0.09; // Adjust the scale value as needed
clone.scale.set(iconScale, iconScale, iconScale);
clone.position.copy(reticle.position);
scene.add(clone);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment