Jump to content

A-Frame (virtual reality framework)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Kodakev (talk | contribs) at 05:35, 25 October 2016 (Created page with '{{AFC submission|t||ts=20161024221615|u=2601:647:203:30DC:8189:5F8E:D554:DD90|ns=118|demo=}}<!-- Important, do not remove this line before article has been creat...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
A-Frame
Original author(s)Mozilla
Developer(s)A-Frame Authors
Initial releaseDecember 2015; 9 years ago (2015-12)
Stable release
0.3.2 / October 12, 2016; 8 years ago (2016-10-12)
Repository
Written inJavaScript
PlatformCross-platform
TypeJavaScript framework
LicenseMIT License
Websiteaframe.io

A-Frame is an open-source web framework for building virtual reality (VR) experiences.[1] It is primarily maintained by Mozilla and the WebVR community. It is an Entity component system framework for Three.js where developers can create 3D and WebVR scenes using HTML. HTML provides a familiar authoring tool for web developers and designers while incorporating a popular game development pattern used by engines such as Unity.

History

A-Frame was developed within the Mozilla VR team during mid-to-late 2015. The Mozilla VR team pioneered the WebVR platform and spec, but needed an easier way to create content. The original work behind A-Frame involved Diego Marcos, Josh Carpenter, Casey Yee, Chris Van Wiemeersch, and Kevin Ngo. A-Frame was created in order to allow web developers and designers to author 3D and VR experiences with HTML without having to know WebGL. A-Frame's first public release was on December 18th, 2015. There are now over 75 contributors in total.

Usage

An entire A-Frame scene can be contained within a HTML file by including a single JavaScript file.

<html>
  <head>
    <title>Hello, World!</title>
    <script src="https://aframe.io/releases/0.3.2/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
  </body>
</html>

Since A-Frame is based on an Entity component system pattern, under the hood, every object in a scene is an entity. Entities are general placeholder objects. Components are composable and reusable modules that can be plugged into entities in order to add appearance, behavior, and functionality. Components are written in JavaScript and can be made to do anything, and then expose a declarative API through HTML. Here is an example of including a couple of community components for particle systems and physics via external scripts, and then being used from HTML.

<script src="https://unpkg.com/aframe-particle-system-component/"></script>
<script src="https://unpkg.com/aframe-physics-system/"></script>

<a-entity
  geometry="primitive: box"
  material="color: red; metalness: 0.5"
  dynamic-body="mass: 5"
  light="type: point; intensity: 1.1"
  particle-system
></a-entity>

Community

All online IDEs support A-Frame as a result of being based on HTML. Documentation is available for the API[2]. Support for developers committing to the library is provided via GitHub issues, while support for developers building apps and web pages is provided via StackOverflow[3]. Real-time on-line support is provided using Slack (software)[4]. Most of the developers are also on Twitter.

References

  1. ^ "A-Frame". A-Frame. Retrieved 2016-10-25.
  2. ^ "Redirecting..." aframe.io. Retrieved 2016-10-25. {{cite web}}: Cite uses generic title (help)
  3. ^ "Newest 'aframe' Questions". stackoverflow.com. Retrieved 2016-10-25.
  4. ^ Slack. "Slack". aframe.io. Retrieved 2016-10-25.