new SpotLight(position, targetPosition, options)
Spotlight category.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
position |
Cartesian3 |
光源位置(笛卡尔世界坐标)。 |
||||||||||||||||||||||||
targetPosition |
Cartesian3 |
目标点位置(笛卡尔世界坐标),决定聚光方向。 |
||||||||||||||||||||||||
options |
Object |
optional
Contains the following attributes:
|
Members
-
angleNumber
-
Get or set the spotlight range, default to Math.PI/6, in radians.
-
colorColor
-
Get or set the color of the light source, default is white.
-
decayNumber
-
Get or set the attenuation factor of the spotlight light source, the smaller it is, the smaller the attenuation with distance, and the brighter it will be.
-
distanceNumber
-
Get or set the distance that spotlight can reach, default is 100 meters.
-
readonly idNumber
-
Obtain the spotlight ID.
-
intensityNumber
-
Get or set the light intensity of the spotlight.
-
readonly lightColorColor
-
Get the color of the spotlight.
-
positionCartesian3
-
获取或设置点光源位置,笛卡尔世界坐标。
-
targetPositionCartesian3
-
获取或设置聚光灯目标点位置,决定聚光方向,笛卡尔世界坐标。