Package javafx.scene

Class AmbientLight

All Implemented Interfaces:
Styleable, EventTarget

public class AmbientLight extends LightBase
A light that illuminates an object from all directions equally regardless of its position and orientation. An AmbientLight adds a constant term to the amount of light reflected by each point on the surface of an object, thereby increasing the brightness of the object uniformly.

AmbientLights are often used to represent the base amount of illumination in a scene. In the real world, light gets reflected off of surfaces, causing areas that are not in direct line-of-sight of the light to be lit (more dimly). Using a dark colored (weak) AmbientLight can achieve the effect of the lighting of those areas.

Since:
JavaFX 8.0
  • Constructor Details

    • AmbientLight

      public AmbientLight()
      Creates a new instance of AmbientLight class with a default Color.WHITE light source.
    • AmbientLight

      public AmbientLight(Color color)
      Creates a new instance of AmbientLight class using the specified color.
      Parameters:
      color - the color of the light source