Class: AmbientLight

AmbientLight

AmbientLight can be added to the scene to provide a minimum (single-color) amount of light in the scene.


new AmbientLight()

Properties:
Name Type Description
color Color

The color of the ambient light.

intensity number

The intensity of the ambient light.

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

Extends

Methods


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:

destroy()

Inherited From:

getComponentsByType()

Returns an array of all Components with a given type.

Inherited From:

hasComponentType()

Returns whether or not the Entity has a component of a given type assigned to it.

Inherited From:

luminance()

Calculates the luminance of the light (color * intensity).

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: