Virtual Reality

Tutorial

Follow these steps to build a “Minecraft” demo VR world. Instructions provided by Aframe.io.

1) Starter HTML. Add the following to an empty text editor.



<html>
<head>
    <script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
</head>
<body>
    <a-scene>


    </a-scene>
</body>
</html>

gif

2) Add the following code into your <head> section.


   
   <script src="https://unpkg.com/aframe-environment-component@1.1.0/dist/aframe-environment-component.min.js"></script>
   

3) Add an environment into you <a-scene> section.

  
   
    <a-entity environment="preset:default;"></a-entity>
    

4) Here are the other names you can use to replace the word default that you just copied.
Valid values: none, default, contact, egypt, checkerboard, forest, goaland, yavapai, goldmine, threetowers, poison, arches, tron, japan, dream, volcano, starry, osiris

5) Add shapes to your world. Go to the “Adding Shapes tab in the left menu”