VR (Virtual reality) is the simulated environment using computer technology . Now the modern mobile phones are VR enabled by default and we have to use the VR headset like Samsung Gear to get the VR experience. In this article I will explain the very basic example of WebVR using A-Frame.
What is A-Frame ?
Support for A-Frame
MOZVR recommences Google Cardboard V2-compatible headset for best results. WebVR is now tested with mobile Safari and Firefox for iOS, and Firefox for Android and Chrome on Android.
A-frame also display the elements beautifully even in non-VR browser so there won’t be any problem for users on a standard desktop. A-Frame supports a wide range of 3D elements such as Panoramic images , 2D Content integration , 360 degree video etc.
Create first WebVR using A-Frame
<!doctype html> <html> <head> <title>My first VR site</title> <script src="https://aframe.io/releases/latest/aframe.min.js"></script> </head> <body> <a-scene> <a-cube></a-cube> </a-scene> </body> </html>
You can see one VR headset icon on the right corner, that will indicate the WebVR compatibility of our browser. You will get the VR experience via VR headset. You can see more examples from A-Frame official web . If you want to learn more about A-Frame then go to the complete documentation.