Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PointLight

[14:7] extends: LightBase

Wraps JavaFX PointLight, a light source emitted from a single point in the scene with optional distance attenuation. Position the light by setting translateX, translateY, translateZ on the Node (inherited from the Node base). Light intensity falls off with distance based on the constant, linear, and quadratic attenuation factors.

Methods

  • PointLight (object ColorObj = null)

    Creates a new PointLight. If a Color is provided, it sets the initial light color; otherwise the default is white.

    • @p ColorObj is an optional Color wrapper.
  • setConstantAttenuation (double C)

    Sets the constant attenuation factor (applied independent of distance). Default 1.0.

    • @p C is a double with the constant attenuation.
    • @r this object
  • setLinearAttenuation (double L)

    Sets the linear attenuation factor (multiplied by distance). Default 0.0.

    • @p L is a double with the linear attenuation.
    • @r this object
  • setQuadraticAttenuation (double Q)

    Sets the quadratic attenuation factor (multiplied by distance squared). Default 0.0.

    • @p Q is a double with the quadratic attenuation.
    • @r this object
  • setMaxRange (double Range)

    Sets the maximum effective range of the light. Geometry beyond this distance receives no illumination from this light.

    • @p Range is a double with the maximum range.
    • @r this object
  • getMaxRange ()

    Returns the maximum effective range of the light.

    • @r A double with the maximum range.
  • maxRangeProperty ()

    Returns the max range property for binding or change listeners.

    • @r An AussomJavaObject around a DoubleProperty.
  • getConstantAttenuation ()

    Returns the constant attenuation factor.

    • @r A double with the constant attenuation.
  • constantAttenuationProperty ()

    Returns the constant attenuation property for binding or change listeners.

    • @r An AussomJavaObject around a DoubleProperty.
  • getLinearAttenuation ()

    Returns the linear attenuation factor.

    • @r A double with the linear attenuation.
  • linearAttenuationProperty ()

    Returns the linear attenuation property for binding or change listeners.

    • @r An AussomJavaObject around a DoubleProperty.
  • getQuadraticAttenuation ()

    Returns the quadratic attenuation factor.

    • @r A double with the quadratic attenuation.
  • quadraticAttenuationProperty ()

    Returns the quadratic attenuation property for binding or change listeners.

    • @r An AussomJavaObject around a DoubleProperty.