new LightSource(context)
Light source category.
| Name | Type | Description |
|---|---|---|
context |
Context |
Context |
Members
-
ambientLightColorColor
-
Get or set the ambient light color.
- Default Value: Color (0.0, 0.0, 0.0, 1.0)
readonly directionalLightAssociativeArray
获取所有添加的平行光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | Number of parallel light sources in the scene |
AssociativeArray.values |
Array.<DirectionalLight> | Parallel light source array in the scene |
readonly hemisphereLightAssociativeArray
获取所有添加的半球光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | Number of hemispherical light sources in the scene |
AssociativeArray.values |
Array.<HemisphereLight> | Hemisphere light source array in the scene |
readonly pointLightAssociativeArray
获取所有添加的点光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | Number of point light sources in the scene |
AssociativeArray.values |
Array.<PointLight> | Point light source array in the scene |
readonly spotLightAssociativeArray
获取所有添加的聚光灯。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | Number of spotlights in the scene |
AssociativeArray.values |
Array.<SpotLight> | Spotlight array in the scene |
sunLightCameraTrackingEnabledBoolean
Get or set to automatically update the current time zone, so that the model maintains the same brightness effect in the same time zone.
- Default Value: true
sunLightColorColor
Get or set the lighting color.
- Default Value: Color (1.0, 1.0, 1.0, 1.0)
sunLightColorMixTypeMixColorType
Get or set the blending mode between the lighting color and the natural lighting color calculated at the bottom layer
- Default Value: MixColorType.REPLACE
sunLightIntensityNumber
Get or set the intensity of sunlight
- Default Value: 1.0
sunLightONBoolean
Get or set lighting.
visibleDistanceMaxNumber
设置光源最大作用距离。
- Default Value: 10000.0