Celestia/Celx Scripting/CELX Lua Methods/CEL command setambientlight

< Celestia < Celx Scripting < CELX Lua Methods

setambientlight

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.

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)


Back to CEL command index

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.