A component that scales the amount of light that an entity receives from its environment.
When rendering a RealityKit scene, you can control how much the environment's
lighting affects the virtual objects in your scene, such as the lighting from your
real-world surroundings, a virtual environment, or both.
Use an `EnvironmentLightingConfigurationComponent` to configure this amount for an entity.
For example, create an entity that receives no lighting from its environment by setting the weight to `0.0`.
```swift
let spaceship = try await Entity(named: "spaceship")
spaceship.components.set(EnvironmentLightingConfigurationComponent(
environmentLightingWeight: 0.0))
```
- Note: The weight value of the component also affects the lighting of the entity's descendants.
Creates an environment-lighting configuration component.
- Parameter environmentLightingWeight: A floating-point value in the range `[0.0, 1.0]`,
where `0.0` indicates no environment-lighting contribution and `1.0` indicates full environment-lighting
contribution.
get · iOS 18.0+
environmentLightingWeight
TypeScript
get environmentLightingWeight(): number
Swift declaration
var environmentLightingWeight: Float
A value that controls the environment-lighting contribution to an entity's lighting.
The weight is a floating-point value in the range `[0.0, 1.0]`.
* A value of `1.0` indicates the entity receives the full environment-lighting contribution.
* A value of `0.0` indicates the entity receives no light from its environment. The entity still receives
lighting from other sources, such as directional, point, and spot lights.
* The default value is `1.0`.
set · iOS 18.0+
environmentLightingWeight
TypeScript
set environmentLightingWeight(value: number)
Swift declaration
var environmentLightingWeight: Float
A value that controls the environment-lighting contribution to an entity's lighting.
The weight is a floating-point value in the range `[0.0, 1.0]`.
* A value of `1.0` indicates the entity receives the full environment-lighting contribution.
* A value of `0.0` indicates the entity receives no light from its environment. The entity still receives
lighting from other sources, such as directional, point, and spot lights.
* The default value is `1.0`.