Jump to content

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

From Wikibooks, open books for an open world

renderflags

[edit | edit source]

renderflags { set <renderflagstring> }

-- OR --

renderflags { clear <renderflagstring> }

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

Arguments:

set <renderflagstring> -- OR -- clear <renderflagstring>
The set or clear string values can be any combination of the items listed below. No default.
Multiple values are specified within a single set of quotes (") by separating them with a space or vertical bar "|" (i.e. "orbits|stars"):
  • atmospheres
  • automag
  • boundaries
  • cloudmaps
  • 1.6.0 cloudshadows
  • comettails
  • constellations
  • eclipseshadows
  • 1.6.0 ecliptic
  • 1.6.0 eclipticgrid
  • 1.6.0 equatorialgrid
  • 1.6.0 galacticgrid
  • galaxies
  • grid
  • 1.6.0 horizontalgrid
  • markers
  • nightmaps
  • orbits
  • partialtrajectories
  • planets
  • pointstars → (no longer used -- see set command)
  • ringshadows
  • smoothlines
  • stars
Note: The lightdelay is (yet) un unknown renderflag for this command.


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.
    <renderflagstring> 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, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid.
celestia:show( <renderflagstring> )


  • Disable one or many rendering features. This method exists for backward compatibility with older scripts; celestia:setrenderflags() should be used instead.
    <renderflagstring> 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, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid.
celestia:hide( <renderflagstring> )


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 <renderflagstring> as keys, and booleans as values for each key.
    Multiple features can be enabled and disabled at once by giving multiple table keys.
    <renderflagstring> must be one of:
    • orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid.
-- Define and initialize renderflagstable first, before setting renderflags:
renderflagstable = { }
renderflagstable.<renderflagstring1> = true
renderflagstable.<renderflagstring2> = false
-- more renderflag keys may be initialized.
celestia:setrenderflags(renderflagstable)

-- OR --

-- Shorter notation, but note the curly braces.
celestia:setrenderflags{ <renderflagstring1> = true, <renderflagstring2> = 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