new LightSource(context)
光源类。
| Name | Type | Description |
|---|---|---|
context |
Context |
上下文 |
Members
-
ambientLightColorColor
-
获取或设置环境光颜色。
- Default Value: Color (0.6, 0.6, 0.6, 1.0)
readonly directionalLightAssociativeArray
获取平行光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | 场景中平行光源个数 |
AssociativeArray.values |
Array.<DirectionalLight> | 场景中平行光源数组 |
readonly hemisphereLightAssociativeArray
获取半球光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | 场景中半球光源个数 |
AssociativeArray.values |
Array.<HemisphereLight> | 场景中半球光源数组 |
readonly pointLightAssociativeArray
获取点光源。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | 场景中点光源个数 |
AssociativeArray.values |
Array.<PointLight> | 场景中点光源数组 |
readonly spotLightAssociativeArray
获取聚光灯。
Properties:
| Name | Type | Description |
|---|---|---|
AssociativeArray.length |
Number | 场景中聚光灯个数 |
AssociativeArray.values |
Array.<SpotLight> | 场景中聚光灯数组 |
sunLightCameraTrackingEnabledBoolean
获取或设置自动更新当前时区,使模型在同一时区保持相同的明暗效果。
- Default Value: true
sunLightColorColor
获取或设置光照颜色。
- Default Value: Color (1.0, 1.0, 1.0, 1.0)
sunLightColorMixTypeMixColorType
获取或设置光照颜色与底层计算的自然光照颜色的混合模式
- Default Value: MixColorType.REPLACE
sunLightIntensityNumber
获取或设置太阳光强度
- Default Value: 1.0
sunLightONBoolean
获取或设置光照。
visibleDistanceMaxNumber
设置灯光最大可见距离。
- Default Value: 10000.0