Skip to content
On this page

DirectionalLight

A light that gets emitted in a specific direction. This light will behave as though it is infinitely far away and the rays produced from it are all parallel. The common use case for this is to simulate daylight; the sun is far enough away that its position can be considered to be infinite, and all light rays coming from it are parallel.

This light can cast shadows.

Example

Code

template
<DirectionalLight :color="0xffffff" />

Props

Prop nameDescriptionTypeDefault
castShadowIf set to true light will cast dynamic shadows.booleanfalse
color Color of the light.union0xffffff
intensity Numeric value of the light's strength/intensity.number1
position A Vector3Like representing the object's local position.Vector3Like[0, 0, 0]

Expose

three


Released under the MIT License.