Adding objects
Note: This documentation is for the old 0.1.0 version of A-Frame. Check out the documentation for the current 1.5.0 version
A-Frame comes with convenient primitives for common use cases such as videos, models, images, and skies. Primitives include:
<a-cube> |
The full list of available primitives is available in the Primitives documentation.
Each primitive has unique attributes. We can specify the width, depth, and height of a cube, for example, or the source of a 3D model:
<a-cube width="4" depth="2" height="20"></a-cube> |
Under the hood, primitives are concise and convenient wrappers around A-Frame’s powerful underlying entity-component system. Components include geometry, materials, raycaster, controls, and more.
To learn more about primitives, see the Primitives overview. To start working with entities and components, see the Entity/Component documentation.