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

From Wikibooks, open books for an open world
Jump to navigation Jump to search

constellations[edit]

constellations { set|clear <name> }

Set the rendering of individual constellations defined in <name>,
-- OR --
Clear the rendering of individual constellations defined in <name>.


Notes:

  1. Besides setting or clearing the rendering of the constellation(s), this command also takes effect on the constellation name(s).
  2. The renderflags { set "constellations" } command must be given prior to this command to enable rendering of constellations.

Arguments:

set <name> -- OR -- clear <name>
A string which contains the name of the constellation on which the rendering change is applied.
Spedial value "all", to set or clear the rendering of all the constellations at once.
Otherwise must be one (or more, separated by a space) of:
  • "Andromeda", "Antlia", "Apus", "Aquarius", "Aquila", "Ara", "Aries", "Auriga", "Boötes", "Caelum", "Camelopardalis", "Cancer", "Canes Venatici", "Canis Major", "Canis Minor", "Capricornus", "Carina", "Cassiopeia", "Centaurus", "Cepheus", "Cetus", "Chamaeleon", "Circinus", "Columba", "Coma Berenices", "Corona Australis", "Corona Borealis", "Corvus", "Crater", "Crux", "Cygnus", "Delphinus", "Dorado", "Draco", "Equuleus", "Eridanus", "Fornax", "Gemini", "Grus", "Hercules", "Horologium", "Hydra", "Hydrus", "Indus", "Lacerta", "Leo", "Leo Minor", "Lepus", "Libra", "Lupus", "Lynx", "Lyra", "Mensa", "Microscopium", "Monoceros", "Musca", "Norma", "Octans", "Ophiuchus", "Orion", "Pavo", "Pegasus", "Perseus", "Phoenix", "Pictor", "Pisces", "Piscis Austrinus", "Puppis", "Pyxis", "Reticulum", "Sagitta", "Sagittarius", "Scorpius", "Sculptor", "Scutum", "Serpens Caput", "Serpens Cauda", "Sextans", "Taurus", "Telescopium", "Triangulum", "Triangulum Australe", "Tucana", "Ursa Major", "Ursa Minor", "Vela", "Virgo", "Volans", "Vulpecula".
  • If the asterisms.dat file in the ..\celestia\data directory contains alternative asterisms and/or constellation names, the mentioned names in this file can be used too in this parameter.


CELX equivalent:

Based on the 1.6.0 celestia:showconstellations() and 1.6.0 celestia:hideconstellations() methods.

  • Define a table containing the name(s) <name> of the constellation(s) on which the rendering change must be applied.
table = {"name1", "name2"}
  • Use celestia:showconstellations() method to enable rendering of the constellation name(s) table.
celestia:showconstellations(table)
  • Use celestia:hideconstellations() method to disable rendering of the constellation name(s) table.
celestia:hideconstellations(table)


Summarized:

table = {"name1", "name2"}
celestia:showconstellations(table)

-- OR --

table = {"name1", "name2"}
celestia:hideconstellations(table)


Example:
Only show the zodiacal constellations.

CEL:

renderflags { set "constellations" }
constellations { clear "all"}
constellations { set "Pisces Aries Taurus Gemini Cancer Leo Virgo Libra 
                      Scorpius Ophiuchus Sagittarius Capricornus Aquarius"}

CELX:

celestia:setrenderflags{constellations = true}
zodiac = {"Pisces", "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra",
          "Scorpius", "Ophiuchus", "Sagittarius", "Capricornus", "Aquarius"}
celestia:hideconstellations()
celestia:showconstellations(zodiac)


Back to CEL command index