Spot Light

Spot Light

Topic Progress:

Spot Light

In contrast to the Directional and Point Light, the Spot Light does not shine in all directions. Beside the position and the distance, it needs also the attributes angle (in degrees) and target (to look at a specific object in the scene):

 <a-light type="spot" color="#EEE" intensity="1.5" distance="20" position="5 5 5" angle="5" target="#myPlane"></a-light>

In the example the Spot light is shining to the target, which is the id of the <a-plane> Tag:

<a-plane id="myPlane" position="0 -.5 0" rotation="-90 0 0" width="2" height="2" color="#FFFF00"></a-plane>

In the example the Spot Light is targeted to the plane via id.





Comments are closed.