Class: SpotLight

SpotLight

SpotLight represents an light source with a single point as origin and a conical range. The light strength falls off according to the inverse square rule.


new SpotLight()

Properties:
Name Type Description
radius number

The maximum reach of the light. While this is physically incorrect, it's necessary to limit the lights to a given area for performance.

innerAngle number

The angle of the spot light where it starts attenuating outwards. In radians!

outerAngle number

The maximum angle of the spot light's reach. In radians!

castShadows boolean

Defines whether or not this light casts shadows.

Author:
  • derschmale <http://www.derschmale.com>

Extends

Methods


_bindSkeleton()

Inherited From:

addComponent()

Adds a single Component object to the Entity.

Inherited From:

addComponents(components)

Adds multiple Component objects to the Entity.

Parameters:
Name Type Description
components Array

An array of components to add.

Inherited From:

clone()

Inherited From:
Overrides:

destroy()

Inherited From:

getComponentByName()

Returns the Component with a given name.

Inherited From:

invalidateBounds()

Marks the bounds as invalid, causing them to be recalculated when next queried.

Inherited From:

removeComponent()

Removes a single Component from the Entity.

Inherited From:

removeComponents(components)

Removes multiple Component objects from the Entity.

Parameters:
Name Type Description
components Array

A list of components to remove.

Inherited From: