SpotLight

new Cesium.SpotLight(position, targetPosition, options)

Spotlight
Name Type Description
position Cartesian3 Light source position
targetPosition Cartesian3 The position of the target point determines the direction of the light
options Object optional Optional, including the following attributes:
Name Type Default Description
color Color Color.WHITE optional Light source color
intesity Number 2 optional Brightness
distance Number 100 optional The distance that light can reach, the default is 100 meters
decay Number 1 optional The light source attenuation factor, the smaller the attenuation with distance, the brighter

Members

staticCesium.SpotLight.angle : Number

Gets or sets the spotlight range, the default is Math.PI/6, the unit is radians.

staticCesium.SpotLight.color : Color

Gets or sets the light source color, the default is white.

staticCesium.SpotLight.decay : Number

Get or set the attenuation factor of the spotlight source. The smaller the attenuation factor with the distance, the brighter it will be.

staticCesium.SpotLight.direction : Cartesian3

Get the direction of the spotlight.

staticCesium.SpotLight.distance : Number

Gets or sets the distance that the spotlight can reach, the default is 100 meters.

staticCesium.SpotLight.id : Number

Get the spotlight id.

staticCesium.SpotLight.intensity : Number

Gets or sets the light intensity of the spotlight.

staticCesium.SpotLight.lightColor : Color

Get the color of the spotlight.

staticCesium.SpotLight.position : Cartesian3

Get or set the position of the point light source, using the world coordinate system.

staticCesium.SpotLight.targetPosition : Cartesian3

Get or set the position of the target point of the spotlight and determine the direction of the spotlight.