AmbientLight - Verge3D User Manual - Soft8Soft
Description: Learn how to use AmbientLight in your interactive 3D apps made with Verge3D

Object3D → Light →

# AmbientLight

This light globally illuminates all objects in the scene equally.

This light cannot be used to cast shadows as it does not have a direction.

## Code Example

`const light = new v3d.AmbientLight(0x404040); // soft white light app.scene.add(light);`

## Constructor

### AmbientLight(color : Integer, intensity : Float)

- color — (optional) numeric value of the RGB component of the color. Default is `0xffffff` (white).
- intensity — (optional) numeric value of the light's strength/intensity. Default is `1`.

Creates a new AmbientLight.

## Properties

See the base Light class for common properties.

### # .isAmbientLight : Boolean

Read-only flag to check if a given object is of type AmbientLight.

## Methods

See the base Light class for common methods.

## Puzzles

The following puzzles work with the ambient lights:

- create object — select light, then ambient.
- set light param — to set various light parameters.
- get light param — to obtain light parameters.

## Source

For more info on how to obtain the source code of this module see this page.