camera

Note: This documentation is for the old 0.2.0 version of A-Frame. Check out the documentation for the current 0.5.0 version

The camera component defines from which perspective the user views the scene. It is often paired with controls-related components that allow user input to move and rotate the camera.

It is recommended to wrap entities with the camera component within another entity. This allows us to change the position of the camera without colliding with controls.

Example

<a-entity position="0 1.8 5">
<a-entity camera look-controls></a-entity>
</a-entity>

Properties

PropertyDescriptionDefault Value
activeWhether the camera is currently the active camera in a scene with multiple cameras.true
farCamera frustum far clipping plane.10000
fovField of view (in degrees).80
nearCamera frustum near clipping plane.0.5

Changing the Active Camera

When the active property is toggled, the component will notify the camera system to change the current camera used by the renderer.