<a-light>

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 light primitive adjusts the lighting setup of the scene. It is an entity that maps attributes to properties of the light component.

Examples

<!-- Red directional light shining from the top left. -->
<a-light color="red" position="-1 1 0"></a-light>
<!-- Blue point light, 5 meters in the air. -->
<a-light type="point" color="blue" position="0 5 0"></a-light>
<!-- Dim ambient lighting. -->
<a-light type="ambient" color="#222"></a-light>

Attributes

AttributeDefault ValueComponent Mapping
angle60light.angle
color#ffflight.color
decay1light.decay
distance0.0light.distance
exponent10.0light.exponent
ground-color#ffflight.groundColor
intensity1.0light.intensity
typedirectionallight.type

Differences with the Default Lighting

When we add a light, A-Frame will remove the default lighting setup (i.e., one directional light from the top-left, and one small ambient light).