Package ecs

Class PointLight

All Implemented Interfaces:
Comparable<Component>

public class PointLight extends Component
A Point Light Component is essentially a location in the world that emits light in all directions. One can also specify both it's color and it's intensity.
Author:
VoxelRifts
  • Field Details

    • color

      public org.joml.Vector3f color
      Colour of the light
    • intensity

      public float intensity
      Intensity of the light It controls how far the light's attenuation will reach
  • Constructor Details

    • PointLight

      public PointLight(float intensity)
      Constructor which sets color of the light by default to white.
      Parameters:
      intensity - float: Intensity of the light
    • PointLight

      public PointLight(Color color, float intensity)
      Parameters:
      color - Vector3f: Color of the light
      intensity - float: Intensity of the light
  • Method Details

    • start

      public void start()
      Description copied from class: Component
      Called once on Component initialization.
      Overrides:
      start in class Component
    • update

      public void update(float dt)
      Description copied from class: Component
      Called once per frame for each Component
      Overrides:
      update in class Component
      Parameters:
      dt - Engine.deltaTime