|
|
|
@ -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( _ => { |
|
|
|
|
</a-box> |
|
|
|
|
<a-box teleporter height=".1" class="teleportable" material="color: cyan" position="0 0 0" ></a-box> |
|
|
|
|
|
|
|
|
|
<a-box id="namedteleporter" teleporter height=".1" class="teleportable" material="color: cyan" position="2 0 2" ></a-box> |
|
|
|
|
|
|
|
|
|
<a-box target teleporter height=".1" depth=".1" width=".1" class="teleportable" material="color: red" position="0 1 -.5" ></a-box> |
|
|
|
|
</a-scene> |
|
|
|
|
</body> |
|
|
|
|