Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: LightBase

[16:7] extends: Node

Wraps JavaFX LightBase, the abstract base class for 3D light sources (AmbientLight and PointLight). Holds the color of the light and a scope list of nodes the light affects (empty scope means the light affects every node in the scene). LightBase extends Node. It has no constructor; use AmbientLight or PointLight.

Methods

  • setColor (object ColorObj)

    Sets the color of the light.

    • @p ColorObj is a Color wrapper.
    • @r this object
  • getColor ()

    Returns the color of the light.

    • @r A Color wrapper.
  • setLightOn (bool Enabled)

    Sets the light's enabled state. Disabled lights contribute no illumination.

    • @p Enabled is a bool.
    • @r this object
  • isLightOn ()

    Returns whether the light is on.

    • @r A bool with the state.
  • addScope (object NodeObj)

    Adds a node to the light's scope. When the scope list is non-empty, only listed nodes are illuminated by this light.

    • @p NodeObj is a Node wrapper to add.
    • @r this object
  • colorProperty ()

    Returns the property that holds the light color.

    • @r An ObjectProperty AJO holding the Color.
  • lightOnProperty ()

    Returns the property that holds the lightOn flag.

    • @r A BooleanProperty AJO.
  • getScope ()

    Returns the live ObservableList of nodes that this light affects. When the list is empty the light affects every node in the scene.

    • @r An ObservableList AJO of Node elements.
  • getExclusionScope ()

    Returns the live ObservableList of nodes that are excluded from this light's illumination.

    • @r An ObservableList AJO of Node elements.