Environment
Environments are used to control global visual aspects such as fog or background gradients.
makeEnvironment()
Make a new environment entity.
Return
Entity , a pointer to an environment in the world
setActiveEnvironment(environment)
Set the active environment to be used when shading the scene.
Arguments
environment: Entity, a pointer to an environment in the world.
getActiveEnvironment()
Get the active environment used to shade the scene.
Return
Entity , a pointer to an entity in the world, nil if the entity was not found.
setEnvironmentIntensity(environment, value)
Set how much light the scene gets from this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentIntensity(environment)
Get how much light the scene gets from this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentEmissiveStrength(environment, value)
Set how much light comes from models that have emissive colors.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentEmissiveStrength(environment)
Get how much light comes from models that have emissive colors.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentColorTop(environment, color)
Set the top color of the gradient for this environment. The color.w element is used for emissive strength, value range is 0.0 to 1.0.
Arguments
environment: Entity, a pointer to an environment in the world.
color: vec4
getEnvironmentColorTop(environment)
Get the top color of the gradient for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
vec4
setEnvironmentColorCenter(environment, color)
Set the center color of the gradient for this environment. The color.w element is used for emissive strength, value range is 0.0 to 1.0.
Arguments
environment: Entity, a pointer to an environment in the world.
color: vec4
getEnvironmentColorCenter(environment)
Get the top center of the gradient for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
vec4
setEnvironmentColorBottom(environment, color)
Set the bottom color of the gradient for this environment. The color.w element is used for emissive strength, value range is 0.0 to 1.0.
Arguments
environment: Entity, a pointer to an environment in the world.
color: vec4
getEnvironmentColorBottom(environment)
Get the bottom center of the gradient for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
vec4
setEnvironmentAmbientOcclusion(environment, value)
Set the ambient occlusion for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentAmbientOcclusion(environment)
Get the ambient occlusion for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentAmbientOcclusionRadius(environment, value)
Set the ambient occlusion radius for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentAmbientOcclusionRadius(environment)
Get the ambient occlusion radius for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogDensity(environment, value)
Set the fog density for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentFogDensity(environment)
Get the fog density for this environment.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogHeight(environment, value)
Set the height at which fog will start to appear.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentFogHeight(environment)
Get the height at which fog will start to appear.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogHeightFalloff(environment, value)
Set the fog height falloff.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentFogHeightFalloff(environment)
Get the fog height falloff.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogStart(environment, value)
Set the distance at which fog will start to appear.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentFogStart(environment)
Get the distance at which fog will start to appear.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogOpacity(environment, value)
Set the overall fog opacity.
Arguments
environment: Entity, a pointer to an environment in the world.
value: number
getEnvironmentFogOpacity(environment)
Get the overall fog opacity.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
float
setEnvironmentFogColor(environment, color)
Set the color of the fog.
Arguments
environment: Entity, a pointer to an environment in the world.
color: vec4
getEnvironmentFogColor(environment)
Get the color of the fog.
Arguments
environment: Entity, a pointer to an environment in the world.
Return
vec4