diff --git a/index.html b/index.html index 1bf3de4..a8936d5 100644 --- a/index.html +++ b/index.html @@ -240,6 +240,8 @@ function onHoveredTeleport(){ AFRAME.registerComponent('teleporter', { init: function(){ this.el.setAttribute("opacity", .5) + if (window.location.hash && document.querySelector(window.location.hash+"[teleporter]")) + document.getElementById('rig').setAttribute('position', document.querySelector(window.location.hash+"[teleporter]").getAttribute("position") ) }, events: { mouseenter: function (e) { this.el.setAttribute("opacity", .8) }, @@ -348,6 +350,8 @@ setTimeout( _ => { + +