Exercise 2: 360 image

Now let’s bring in an image as a backdrop. Background images must be in a specific image projection called Equirectangular, here’s what can be found at Flickr when you search for Equirectangular

Download these background images for examples:
city.jpg
rep-square.jpg
opera.jpg
hamalir.jpg

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>360° Image</title>
    <meta name="description" content="360° Image Gallery - A-Frame">
    <script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-assets>
        <img id="opera" crossorigin="anonymous" src="images/opera.jpg">
      </a-assets>

      <!-- 360-degree image. -->
      <a-sky id="image-360" radius="10" src="#opera"></a-sky>
      <!-- Camera + cursor. -->
      <a-entity id="camera" camera look-controls>
        <a-cursor id="cursor"></a-cursor>
      </a-entity>
    </a-scene>
  </body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *