Features
👓 Virtual reality made simple: A-Frame handles the 3D and WebVR boilerplate required to get running across platforms including mobile, desktop, Vive, and Rift just by dropping in <a-scene>
.
❤️ Declarative HTML: A-Frame is accessible to all developers due to its easy-to-read and copy-and-pastable HTML.
⚙ Entity – component pattern: A-Frame is a powerful framework for three.js, providing an declarative, composable, reusable entity-component architecture.
🔨 Tool agnostic: A-Frame interoperates beautifully with JavaScript DOM APIs and most libraries such as React, Vue.js, Angular, or d3.js.
🔍 Visual Inspector: A-Frame provides a built-in visual inspector that acts just like your browser’s DevTools; open up a scene and hit <ctrl> + <alt> + i
.
📦 Registry: A-Frame has a Registry, a curated component repository similar to the Unity Asset Store. Install some components and use them right from your HTML.
Usage
Basic Example
To get started playing now, open this CodePen example scene.
< HTML > < head > < title > My A - Frame Scene < / title > < script SRC = "https://aframe.io/releases/0.5.0/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 </a-sphere> <a-cylinder position=" 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>Copy the code
Builds
To use the latest stable build of A-Frame, include aframe.min.js
:
The < head > < script SRC = "https://aframe.io/releases/0.5.0/aframe.min.js" > < / script > < / head >Copy the code
To check out the stable and master builds, see the dist/
folder.
npm
npm install --save aframeCopy the code
require('aframe') // e.g., with Browserify or Webpack.Copy the code
Local Development
git clone https://github.com/aframevr/aframe.git # Clone the repository.
cd aframe && npm install # Install dependencies.
npm start # Start the local development server.Copy the code
And open in your browser http://localhost:9000.
Generating Builds
npm run distCopy the code
Questions
For questions and support, ask on StackOverflow.
Stay in Touch
- To hang out with the community, join the A-Frame Slack.
- Follow
A Week of A-Frame
on the A-Frame blog. - Follow @aframevr on Twitter.
Contributing
Get involved! Check out the Contributing Guide for how to get started.
License
This program is free software and is distributed under an MIT License.