diff --git a/public/index.html b/public/index.html index d553fa4587aae0ff96e3329acfdd2f1d530c0979..b8be792b0d032c54217a8149a56089f927ee5daf 100644 --- a/public/index.html +++ b/public/index.html @@ -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>