Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

aframe

> 前端框架
Open source

:a: Web framework for building virtual reality experiences.

17.6K stars0 likes2 views
WebsiteGitHub

About

:a: Web framework for building virtual reality experiences.

A-Frame

A web framework for building browser based 3D, AR and VR experiences.

Examples

Find more examples on the homepage, A Week of A-Frame, and WebVR Directory.

Features

:eyeglasses: Virtual Reality Made Simple: A-Frame handles the 3D and WebXR boilerplate required to get running across platforms including mobile, desktop, and all headsets (compatible with a WebXR capable browser) just by dropping in <a-scene>.

:heart: Declarative HTML: HTML is easy to read and copy-and-paste. Since A-Frame can be used from HTML, A-Frame is accessible to everyone: web developers, VR and AR enthusiasts, educators, artists, makers, kids.

:electric_plug: Entity-Component Architecture: A-Frame is a powerful framework on top of three.js, providing a declarative, composable, reusable entity-component structure for three.js. While A-Frame can be used from HTML, developers have unlimited access to JavaScript, DOM APIs, three.js, WebXR, and WebGL.

:zap: Performance: A-Frame is a thin framework on top of three.js. Although A-Frame uses the DOM, A-Frame does not touch the browser layout engine. Performance is a top priority, being battle-tested on highly interactive WebXR experiences.

:globe_with_meridians: Cross-Platform: Build VR and AR applications for any headset compatible with a WebXR capable browser. Don't have a headset or controllers? No problem! A-Frame still works on standard desktop and smartphones.

:mag: Visual Inspector: A-Frame provides a built-in visual 3D inspector with a workflow similar to a browser's developer tools and interface similar to Unity. Open up any A-Frame scene and hit <ctrl> + <alt> + i.

:runner: Features: Hit the ground running with A-Frame's built-in components such as geometries, materials, lights, animations, models, raycasters, shadows, positional audio, tracked controllers. Get even further with community components such as particle systems, physics, multiuser, oceans, mountains, speech recognition, or teleportation!

Usage

Example

Build VR and AR scenes in the browser with just a few lines of HTML! To start playing and publishing now, remix the starter example on:

xml
<html>
  <head>
    <script src="https://aframe.io/releases/1.8.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 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>

With A-Frame's entity-component architecture, we can drop in community components from the ecosystem (e.g., ocean, physics) and plug them into our objects straight from HTML:

See example

…

Builds

To use the latest stable build of A-Frame, include aframe.min.js:

javascript
<head>
  <script src="https://aframe.io/releases/1.8.0/aframe.min.js"></script>
</head>

To check out the stable and master builds, see the dist/ folder.

npm

bash
npm install --save aframe
# Or yarn add aframe
javascript
import AFRAME from 'aframe';  // e.g., with Webpack or Vite.

Local Development

bash
git clone https://github.com/aframevr/aframe.git  # Clone the repository.
cd aframe && npm install  # Install dependencies.
npm start  # Start the local development server.

And open in your browser http://localhost:8080.

If you want to test the examples in VR, you need to run it with https:

bash
npm run start:https

Look at the "On Your Network (IPv4)" line in the console, and copy and paste the url to https://hmd.link service. Then open the browser in your headset and type hmd.link in the address bar then click on the copied url that will show up if you're connected to the same network as your machine. You will see a message about the page being dangerous because we're using a self-signed certificate, you can ignore that warning and continue to the page.

Generating Builds

bash
npm run dist

Questions

For questions and support, ask on StackOverflow.

Stay in Touch

  • Hang out with the community
  • Follow @aframevr on X.

And get in touch with the maintainers!

  • Diego Marcos
  • Don McCurdy
  • Kevin Ngo

Contributing

Get involved! Check out the Contributing Guide for how to get started.

You can also support development by buying a gorgeous A-Frame t-shirt with exclusive designs

License

This program is free software and is distributed under an MIT License.

Issues· 343 open

View all issuesOpen on GitHub
  • #5857

    Removing grabbable does not remove obb-collider

    Updated Sep 25, 2026
  • #5856

    Quest WebXR: tracked-controls reports false controller disconnects when a Touch source moves to trackedSources

    Updated Sep 24, 2026
  • #5681

    WebXR + WebGPU support

    Updated Jul 4, 2026
  • #5457

    Materials as assets and property type

    Updated Jul 4, 2026
  • #5845

    TypeError: session.requestAnimationFrame is not a function when re-entering XR session after exit

    Updated Jul 1, 2026
  • #5844

    Uncaught TypeError: Cannot read properties of null (reading 'cancelAnimationFrame') on session end

    Updated Jul 1, 2026
  • #5737

    Export all glitches before 8th July

    Updated Jun 30, 2026
  • #5396

    Consider an A-Frame API to expose THREE.BatchedMesh

    Updated Jun 10, 2026
  • #5803

    tracked-controls-webxr does not update entity position when referenceSpaceType is bounded-floor

    Updated May 21, 2026
  • #5361

    Time leakage bug in anime.js when looping animations

    Updated Mar 30, 2026

> Tags

JavaScript3daframeaugmented-realitydaydream

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架