Problem
With the popularity of VR, is the Web virtual reality feasible
- 1. The easiest solution to achieve web virtual reality A-frame
A-frame is an open source framework that allows you to build Webvr scenarios with custom HTML elements. With this framework, Web programmers can add virtual reality support in web development without having to learn a new language or a three-dimensional engine like unity and unreal. As an introductory tutorial, this article will walk you through the process of building a Web page that joins Web virtual reality support.
1. The easiest solution to achieve web virtual reality A-frame
NoteA-frame (https://aframe.io/) is an open source frameworkEntry-Level Tutorials page for the A-frame framework (https://aframe.io/docs/guide/getting-started.html)
Ignore the above introduction, simple rough direct download ... Find and Open inex.html
A-frame Template (Https://github.com/aframevr/aframe-boilerplate/archive/master.zip)
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8"> <title>A-frame Street Demo</title> <Scriptsrc= "Https://aframe.io/releases/0.2.0/aframe.min.js"></Script> </Head> <Body> <A-scene> <a-assets> <imgID= "Darktexture"src= "Blacktexture.png"> </a-assets> <A-boxColor= "#B76705"Depth= "2"Height= "2"width= "4"position= "0 0-1.25"></A-box> <A-cylinderColor= "#1E130E"Height= "Max"radius= "0.5"position= " -40 0-8"></A-cylinder> <A-cylinderColor= "#1E130E"Height= "Max"radius= "0.5"position= " -10 0-8"></A-cylinder> <A-cylinderColor= "#1E130E"Height= "Max"radius= "0.5"position= "0-8"></A-cylinder> <A-cylinderColor= "#1E130E"Height= "Max"radius= "0.5"position= "0-7"></A-cylinder> <A-spheresrc= "#darktexture"radius= "2"position= "0"></A-sphere> <A-skysrc= "Res.jpg"></A-sky> </A-scene> </Body></HTML>
NoteIf the picture is not displayed, it may need to be run on the local server, such as PHP's operating environmentEffect Linkhttps://www.devdiner.com/demos/aframedemo/
Image material: Https://flic.kr/p/bCMJ4X
Summary. This article turns from 51cto.com
The easiest solution for Web virtual reality-a-frame Framework