Pick a theme:

Lights

by Lea Rosema

Three.js provides several classes to add light to your scene, based on the abstract classes Light or LightProbe

Light vs LightProbe

anchor

Light probes are an alternative way of adding light to 3D scenes. In contrast to Light, a LightProbe doesn't emit light directly and is usually generated by environment maps.

AmbientLight

anchor

AmbientLight globally illuminates all objects in the scene equally.

  • No direction, cannot be used to cast shadows
  • also available as LightProbe: AmbientLightProbe

DirectionalLight

anchor

Light that gets emitted in a specific direction. It will behave as it is infinitely far away. Light rays are all cast in parallel. This is like the sun.

This light can cast shadows, see DirectionalLightShadow for details.

HemisphereLight

anchor

HemisphereLight is a light source positioned directly above the scene.

  • light is fading from a skyColor to groundColor
  • no direction
  • cannot be used to cast shadows
  • also available as LightProbe class: HemisphereLightProbe

PointLight

anchor

PointLight emits light from a single point in all directions.

SpotLight

anchor

SpotLight emits from a single point alonng a cone.

RectAreaLight

anchor

RectAreaLight emits light across the face a rectangular plane.

  • can be used to simulate light sources such as bright windows
  • no shadow support
  • only MeshStandardMaterial and MeshPhysicalMaterial are supported
  • additional include needed: ReactAreaLightUniformsLib