<a-light>

A light changes the lighting and shading of the scene.

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

AttributeComponent MappingDefault Value
anglelight.angle60
colorlight.color#fff
decaylight.decay1
distancelight.distance0.0
ground-colorlight.groundColor#fff
intensitylight.intensity1.0
penumbralight.penumbra0.0
typelight.typedirectional
targetlight.targetnull

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).