diff --git a/2020-fuga/Panorama.js b/2020-fuga/Panorama.js index 488a2cc..13d5c73 100644 --- a/2020-fuga/Panorama.js +++ b/2020-fuga/Panorama.js @@ -1,9 +1,10 @@ - var clickElement = document.getElementById("sample-obj"); - clickElement.addEventListener("click", function() { - location.href = "https://umap.openstreetmap.fr/ja/map/skip_522718#16/38.7042/139.8837"; - },false); +var element = document.getElementsByTagName("a-sphere"); +//a-sphereの要素を所得し、elementに配列として入れる[1つ目の,2つ目の] - var click = document.getElementById("sample-obj2"); - click.addEventListener("click", function() { - location.href = "https://www.yatex.org/gitbucket/SKIP/reroad-test/pages/2020-Silk-Reroad/samplepage.html"; - },false); +element[0].addEventListener("click", function() { + location.href = "https://umap.openstreetmap.fr/ja/map/skip_522718#16/38.7042/139.8837"; +},false); + +element[1].addEventListener("click", function() { + location.href = "https://www.yatex.org/gitbucket/SKIP/reroad-test/pages/2020-Silk-Reroad/samplepage.html"; +},false); diff --git a/2020-fuga/syaisn.html b/2020-fuga/syaisn.html index 7638c8d..cea4f67 100644 --- a/2020-fuga/syaisn.html +++ b/2020-fuga/syaisn.html @@ -4,7 +4,7 @@ A-Frame - +