SpotLight

new SuperMap3D.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 spotlight
options Object optional Optional, contains 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 the light can reach, the default is 100 meters
decay Number 1 optional The light source attenuation factor, the smaller the attenuation with the distance, the brighter it is

Members

staticSuperMap3D.SpotLight.angle : Number

Get or set the spotlight range, the default is Math.PI / 6, and the unit is radian.

staticSuperMap3D.SpotLight.color : Color

Get or set the color of the light source, the default is white.

staticSuperMap3D.SpotLight.decay : Number

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

staticSuperMap3D.SpotLight.direction : Cartesian3

Get the direction of the spotlight.

staticSuperMap3D.SpotLight.distance : Number

Get or set the distance that the spot light can reach, the default is 100 meters.

staticSuperMap3D.SpotLight.id : Number

Get the spotlight id.

staticSuperMap3D.SpotLight.intensity : Number

Gets or sets the light intensity of the spotlight.

staticSuperMap3D.SpotLight.lightColor : Color

Get the color of the spotlight.

staticSuperMap3D.SpotLight.position : Cartesian3

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

staticSuperMap3D.SpotLight.targetPosition : Cartesian3

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