Class: DirectionalLight

DirectionalLight

new DirectionalLight(position, options)

Parallel light source class.

Name Type Description
position Cartesian3

光源位置,笛卡尔世界坐标系。

options Object optional

Contains the following attributes:

Name Type Default Description
targetPosition Cartesian3 Cartesian3.ZERO optional

目标位置(笛卡尔世界坐标系),决定平行光方向。

color Color Color.WHITE optional

Light source color.

intensity Number 1 optional

Light intensity.

Members

colorColor

Get or set the color of the light source.

readonly idNumber

Obtain the ID of the parallel light source.

intensityNumber

Get or set the light intensity of a parallel light source.

readonly lightTypeLightSourceType

Obtain the type of light source.

positionCartesian3

获取或设置平行光源位置,使用笛卡尔世界坐标系。

targetPositionCartesian3

Obtain or set the target position of a parallel light source to determine the direction of the parallel light.