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

< Celestia < Celx Scripting < CELX Lua Methods

set

set { name <string> value <valuenumber> }

-- Or --

set { name <string> value <valuestring> }

Set one of the items listed below to the value specified in the value argument.

Arguments:

name <string>
No default. Must be one of the following values:
  • MinOrbitSize
    This value is used when Celestia's render orbits option is turned on.
    In general, when an object is very distant its orbit path will not be shown. MinOrbitSize is the minimum radius (in pixels) which the orbit path must cover before Celestia will draw it.
  • AmbientLightLevel
    Equivalent to the setambientlight { brightness <valuenumber> } command.
    Set brightness level of Ambient Light to the specified <valuenumber>. Must be within the 0.0 (min) to 1.0 (max) range. Default is 0.
    Values specified outside the valid range are adjusted to the nearest valid value.
    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.
  • FOV
    Field of View. Celestia computes this value relative to the size of the display window, in pixels.
  • StarDistanceLimit
    The furthest distance at which Celestia will display stars.
    The default value is 1,000,000, however, as of version 1.3.1, Celestia only uses a distance out to 16,000 light years.
value <valuenumber>
The number value you want to assign to the name <string> parameter. Default is 0.0.

-- OR --

Arguments:

name <string>
No default. Must be one of the following values:
  • StarStyle
    This allows you to set how Celestia displays stars on the screen.
    The StarStyle value must be one of the following:
    • Fuzzypoints
    • Points
    • scaleddiscs
value <valuestring>
The string value you want to assign to the name <string> parameter. Default is "".


CELX equivalents:

Based on five different celestia methods.

celestia:setminorbitsize( <valuenumber> )
celestia:setambient( <valuenumber> )
fov_radians = math.rad( <valuenumber> )
obs = celestia:getobserver()
obs:setfov(fov_radians)
celestia:setstardistancelimit( <valuenumber> )
celestia:setstarstyle( <valuestring> )

Example:

CEL:

set { name "MinOrbitSize" value 3 }
set { name "AmbientLightLevel" value 0.15 }           setambientlight { brightness 0.15 } 
set { name "FOV" value 35.5 }
set { name "StarDistanceLimit" value 2000000 }
set { name "StarStyle" value "points" }

CELX with 5 different celestia methods:

celestia:setminorbitsize(3)
celestia:setambient(0.15)
celestia:getobserver():setfov(math.rad(35.5))
celestia:setstardistancelimit(2000000)
celestia:setstarstyle("points")


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.