SpotLight

new Cesium.SpotLight(position, targetPosition, options)

spotlight
Name Type Description
position Cartesian3 Light source position
targetPosition Cartesian3 Target position, determine the direction of concentration
options Object optional Optional, with 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 smaller the attenuation factor of the light source, the smaller the attenuation with distance, the brighter it is.

Members

staticCesium.SpotLight.angle : Number

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

staticCesium.SpotLight.color : Color

Gets or sets the color of the light, default white.

staticCesium.SpotLight.decay : Number

Get or set the spotlight source attenuation factor. The smaller the distance, the smaller the distance attenuation will be.

staticCesium.SpotLight.direction : Cartesian3

Get the direction of the spotlight.

staticCesium.SpotLight.distance : Number

Get or set 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

Gets or sets the point source position, using the world coordinate system.

staticCesium.SpotLight.targetPosition : Cartesian3

Get or set the spotlight target point position to determine the spotlight direction.