<!DOCTYPE html>
<html>
  <head>
    <title>360º VR - 02 - Information Panel</title>
    <script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
    <script src="https://unpkg.com/aframe-webcentric-component@0.1.0/dist/aframe-webcentric-component.min.js"></script>
    <script src="https://unpkg.com/aframe-event-set-component/dist/aframe-event-set-component.min.js"></script>

  </head>
  <body>
    <a-scene webcentric>
      <a-assets>
        <img
          id="fci"
          crossorigin="anonymous"
          src="https://cdn.glitch.com/80978ab7-9db6-45ae-bc43-4fab16bdbb6e%2FFCI-MDS-01.png?v=1589546071255"
        />
        <img
          id="infopanel-background"
          crossorigin="anonymous"
          src="https://cdn.glitch.com/80978ab7-9db6-45ae-bc43-4fab16bdbb6e%2Finfopanel-down.png?v=1589543923454"
        />

        <img
          id="classroom"
          crossorigin="anonymous"
          src="https://cdn.glitch.com/80978ab7-9db6-45ae-bc43-4fab16bdbb6e%2FR0010059.JPG?1525432731662"
        />
      </a-assets>

      <a-sky src="#classroom"></a-sky>

      <a-plane
        position="0 1.6 -1"
        visible="false"
        width="0.5"
        height="1.5"               
        color="red"
        event-set__makevisible="_event: mouseenter; _target: #infopanel1; visible: true"
        event-set__makebig="_event: mouseenter; width: 1"

        event-set__makeinvisible="_event: mouseleave; _target: #infopanel1; visible: false"
        event-set__makesmall="_event: mouseleave; width: 0.5"
      ></a-plane>

      <a-entity
        id="infopanel1"
        class="infopanel"
        position="0 1.6 -1.5"
        look-at="a-camera"
        visible="false"
      >
        <a-image src="#infopanel-background" height="1" width="1"></a-image>

        <a-text
          class="title"
          font="https://raw.githubusercontent.com/jorgecardoso/aframe-course-resources/master/fonts/montserrat-bold.fnt"
          position="0.07 0.44 0.001"
          width="1"
          value="Information"
          align="left"
          color="#595a5a"
          anchor="center"
          baseline="top"
          height="0.02"
          wrap-count="20"
        ></a-text>

        <a-image
          position="-0.1764 0.2 0.001"
          src="#fci"
          height="0.3"
          width="0.5"
        ></a-image>
        <a-text
          class="description"
          baseline="top"
          width="0.86"
          font="https://raw.githubusercontent.com/jorgecardoso/aframe-course-resources/master/fonts/montserrat.fnt"
          position="-0.43089 -0.014 0.001"
          value="The University of Saint Joseph is a leading international university in China’s Special Administrative Region (SAR) of Macao, where the creative and cultural industries are acknowledged as a strategic area for the development of a vibrant and pioneering cluster of businesses and entrepreneurs. "
          align="left"
          color="black"
        >
        </a-text>
      </a-entity>

      <a-entity id="cameraRig">
        <a-camera id="camera" wasd-controls-enabled="false"
          ><a-cursor></a-cursor
        ></a-camera>
      </a-entity>
    </a-scene>
  </body>
</html>