Celestia/Celx Scripting/CELX Lua Methods/CEL command setambientlight
Appearance
setambientlight
[edit | edit source]setambientlight { brightness <valuenumber> }
Equivalent to the set { name "AmbientLightLevel" value <valuenumber> } command. Set brightness level of Ambient Light to the specified <valuenumber>.
Arguments:
- brightness <valuenumber>
- A number, specifying the brightness level of Ambient Light.
Must be in the 0.0 (min) to 1.0 (max) range.
Values ouside the valid range are adjusted to the nearest valid value. Default is 0.
For realism, this should be set to 0.0.
Setting it to 1.0 will cause the side of a planet facing away from the Sun to appear as bright as the lit side.
CELX equivalent:
Based on the celestia:setambient() method.
- Set the level of ambient light.
The given <valuenumber> is the new level of ambient light and must be between 0 and 1.
celestia:setambient(<valuenumber>)
Example:
Set the brightness level of Ambient Light to 0.15.
CEL:
set { name "AmbientLightLevel" value 0.15 }
-- OR --
setambientlight { brightness 0.15 }
CELX:
celestia::setambient(0.15)