PointLight

components/lights/ PointLight

.new PointLight(paramsopt)

PointLight creates a light at a specific position in the scene. The light shines in all directions (roughly similar to a light bulb.)

It has the same options as AmbientLight in light paramater, but it also supports position, distance and decay.

Source:
Parameters:
Name Type Attributes Default Description
params Object <optional>
{light: {color: 0xffffff, intensity: 1, distance: 100, decay: 1}}

The params.

Example

Creating a PointLight

new PointLight( {
  color: 0xff0000,
  intensity: 2,
  distance: 300

  position: [10, 20, 10]
}).addTo(app);

Extends LightComponent