JavaFX Light.Spot Effect

This effect lighten the node by a spot light source. The spot light source is the one whose light attenuates in all the directions. The intensity of the light source depends upon the distance between the light source and the node. The class javafx.scene.effect.Light.Spot represents this effect. We just need to instantiate this class to generate the appropriate light on the node.

Properties

The properties of the class along with the setter methods are described in the following table.

Property Description Setter Methods
pointsAtX This is a double type property. It represents the X coordinate of the direction vector of light setPointsAtX(double value)
pointsAtY This is a double type property. It represents the Y coordinate of the direction vector of light setPointsAtY(double value)
pointsAtZ This is a double type property. It represents the Z coordinate of the direction vector of light. setPointsAtZ(double value)
specularExponent This is a double type property. It represents the specularexponent. This is used to alter the focus of the light source. setSpecularExponent(double value)

Constructors

The class contains two constructors

  1. Light.Spot(): Creates a new instance with the default parameters.
  2. Light.Spot(double x, double y, double z, double specularexponent, color color): Creates a new instance with the specified parameters.

Example:


JavaFX Light.Spot Effect



Contact US

Email:[email protected]

JavaFX Light.Spot
10/30