Commit ce44dc7d authored by Rahman's avatar Rahman
Browse files

Update index.html

parent 32c175da
Pipeline #9302 passed with stage
in 6 seconds
......@@ -70,14 +70,14 @@ loader.load("https://immersive-web.github.io/webxr-samples/media/gltf/reticle/re
scene.add(reticle);
})
let rabbit;
loader.load("https://immersive-web.github.io/webxr-samples/media/gltf/rabbit/scene.gltf", function(gltf) {
rabbit = gltf.scene;
let flower;
loader.load("https://immersive-web.github.io/webxr-samples/media/gltf/sunflower/sunflower.gltf", function(gltf) {
flower = gltf.scene;
});
session.addEventListener("select", (event) => {
if (rabbit) {
const clone = rabbit.clone();
if (flower) {
const clone = flower.clone();
clone.position.copy(reticle.position);
scene.add(clone);
}
......@@ -115,3 +115,17 @@ const onXRFrame = (time, frame) => {
}
// Render the scene with THREE.WebGLRenderer.
renderer.render(scene, camera)
}
}
session.requestAnimationFrame(onXRFrame);
}
</script>
</body>
</html>
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