SpotLight Class

Extends SpotLight
Module: Lights

A SpotLight emit light from a point in a specific direction in a cone volume.

SpotLight has a target that is always represented in words coordinates, and can be moved to change where the light is pointing at.

Based on THREE.SpotLight documentation for the object can be found at https://threejs.org/docs/index.html#Reference/Lights/SpotLight

Constructor

SpotLight

(
  • color
  • intensity
  • distance
  • angle
  • exponent
  • decay
)

Parameters:

  • color Number

    Light color in hex RGB

  • intensity Number

    Light intensity

  • distance Number

    SpotLight maximum range

  • angle Number
  • exponent Number
  • decay Number

Item Index

Methods

setTarget

(
  • target
)

SpotLight looks to the target object coordinates.

The target object should always be at the scene root.

Parameters:

toJSON

(
  • meta
)

Serialize SpotLight data to JSON.

Parameters:

  • meta Object

    Meta.

updateShadowMap

()

Update light shadow map atributtes at runtime.