Home » JavaFX Light.Distant Effect

JavaFX Light.Distant Effect

by Online Tutorials Library

JavaFX Light.Distant Effect

In this effect, the node is lighten from a distant light source. The distant light source is the one which is kept at some fair distance from the object and the light is attenuated into one direction from the source to the object. In JavaFX, the class javafx.scene.effect.Light.Distant represents the Distant light source. We need to instantiate this class to generate the appropriate light on the node.

Properties

The class contains two properties described in the following table.

Property Description Setter Methods
azimuth This property is of the type double and it represents the Azimuth of the light. setAzimuth(double value)
elevation This property is of double type and it represents the elevation of the light. setAlivation(double value)

Constructors

The class contains two constructors

  1. public Light.Distant() : creates the new instance of the class with the default parameters.
  2. public Light.Distant(double azimuth, double elevation, Color color) : Creates the new instance of the class with the specified parameters.

Example:

JavaFX Light.Distant Effect

You may also like