How Do I Make an Image a link in A Frame?

Viewed 24

I'm trying to make an augmented reality clickable icon to go to google.com. Following the docs, I'm unable to get the link to work. I've tried so many other sites but none seem to work. Here, I have the cleanest, non-convoluted version of what I tried.

(I did this in 8th Wall, if that makes any difference)

Here is what I have so far:

head.html

<meta name="8thwall:renderer" content="aframe:1.3.0">
<meta name="8thwall:package" content="@8thwall.xrextras">
<meta name="8thwall:package" content="@8thwall.landing-page">
<meta name="8thwall:package" content="@8thwall.coaching-overlay">

body.html

<a-scene 
landing-page
xrextras-loading
xrextras-runtime-error
xrextras-gesture-detector
xrweb>

  <a-assets>
    <img id="email" src="assets/email_icon_red.png">
  </a-assets>
  
  <a-entity 
    light="
      type: directional; 
      castShadow: true; 
      color: white; 
      intensity: 0.5" 
    position="5 10 7">
  </a-entity>
  
  <a-camera position="0 2 2"></a-camera>

  
  <a-entity link="href: https://aframe.io/; image: #email"></a-entity>
<!--image does not appear when I used this, as shown on A-frame doc--> 

 <!-- <a-image src="#email"></a-image>
 --> 
  
  <a-plane 
    height="2000" 
    width="2000" 
    rotation="-90 0 0" 
    material="shader: shadow; opacity: 0.67" 
    shadow>
  </a-plane>  
</a-scene>
0 Answers
Related