API Docs for: 0.2.0
Show:

DirectionalLight Class

Module: LE

The DirectionalLight class is used to render a light with a limited range of 1-179 degrees. When calculating shadows from this type of light they are calculated from a single point

Constructor

DirectionalLight

(
  • [parameters]
)

Parameters:

  • [parameters] Object optional

    Parameters is an object that contains the DirectionalLights properties

    • [x=0] Number optional

      X position

    • [y=0] Number optional

      Y position

    • [rotation=0] Number optional

      Rotation of the light

    • [range=0] Number optional

      The range of the light in degrees (angle)

    • [colour=new LE.Colour(255, 255, 255, 255)] Colour optional

      Colour, default is white

    • [intensity=0.1] Number optional

      Light intensity/brightness

    • [shader=LE.LightShaders.POINT_LIGHT] Number optional

      Index of the shader used during rendering

Item Index

Properties

colour

Colour

Default: new LE.Colour(255, 255, 255, 255

intensity

Number

Default: 0.1

range

Number

Default: 90

rotation

Number

Default: 0

shader

Number

Default: LE.LightShaders.POINT_LIGHT

type

String

Automatically generated on creation

x

Number

Default: 0

y

Number

Default: 0