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

renderflags
renderflags { set  } 

-- OR --

renderflags { clear  } 

Set (turn on) or clear (turn off) one or more of the items below to be displayed on the screen.

CELX equivalent-1:

Based on the celestia:show and celestia:hide methods.


 * Enable one or many rendering features. This method exists for backward compatibility with older scripts; celestia:setrenderflags should be used instead.  is a string, describing the render-feature to be enabled. Multiple features can be enabled at once by giving multiple arguments to this method separated by a comma. Must be one of:
 * orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, cloudshadows,  ecliptic,  equatorialgrid,  galacticgrid,  eclipticgrid,  horizontalgrid.

celestia:show(  )


 * Disable one or many rendering features. This method exists for backward compatibility with older scripts; celestia:setrenderflags should be used instead.  is a string, describing the render-feature to be enabled. Multiple features can be enabled at once by giving multiple arguments to this method separated by a comma. Must be one of:
 * orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, cloudshadows,  ecliptic,  equatorialgrid,  galacticgrid,  eclipticgrid,  horizontalgrid.

celestia:hide(  )

CELX equivalent-2:

Based on the celestia:setrenderflags method.


 * You can use the celestia:show and celestia:hide or the celestia:setrenderflags methods, all have equivalent functionality. The main reason for the existence of this method is as a counterpart of celestia:getrenderflags, e.g. to reset all renderflags to values saved at the beginning of a script (see Cleanup). "renderflagstable" is a table which contains the  as keys, and booleans as values for each key. Multiple features can be enabled and disabled at once by giving multiple table keys.  must be one of:
 * orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, cloudshadows,  ecliptic,  equatorialgrid,  galacticgrid,  eclipticgrid,  horizontalgrid.

-- Define and initialize renderflagstable first, before setting renderflags: renderflagstable = { } renderflagstable. = true renderflagstable. = false -- more renderflag keys may be initialized. celestia:setrenderflags(renderflagstable)

-- OR --

-- Shorter notation, but note the curly braces. celestia:setrenderflags{  = true,  = false }

Example:

CEL:

renderflags { set "automag|atmospheres|nightmaps" } renderflags { clear "boundaries|galaxies|markers" }

CELX with the celestia:show and celestia:hide methods:

celestia:show("automag", "atmospheres", "nightmaps") celestia:hide("boundaries", "galaxies", "markers")

CELX with the celestia:setrenderflags method:

renderflagstable = { } renderflagstable.automag = true renderflagstable.atmospheres =true renderflagstable.nightmaps = true renderflagstable.boundaries = false renderflagstable.galaxies = false renderflagstable.markers = false celestia:setrenderflags(renderflagstable)

-- OR --

-- Shorter notation, but note the curly braces. celestia:setrenderflags{automag=true, atmospheres=true, nightmaps=true, boundaries=false, galaxies=false, markers=false}

Back to CEL command index