start_nl.cel
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:16k
源码类别:

OpenGL

开发平台:

Visual C++

  1. {
  2. # ... Beginning of script
  3. #****************************************************************************
  4. #                                                                           *
  5. #                 START.CEL - Startup script for Celestia                   *
  6. #                             (version 2.1)                                 *
  7. #                                                                           *
  8. #---------------------------------------------------------------------------*
  9. #                                                                           *
  10. #  This script is run automatically, every time you run Celestia.           *
  11. #                                                                           *
  12. #  NOTE: Do not remove the curly braces located as the first and last       *
  13. #        characters of this file. They define this file as a CEL script.    *
  14. #                                                                           *
  15. #  You can modify this script in many ways, to suit your specific needs.    *
  16. #  Simply uncomment one or more of the lines below, as noted. Each line or  *
  17. #  section of code contains comments describing what it does. To UNcomment  *
  18. #  a line of code, simply remove the "#" character from the beginning of    *
  19. #  that line.                                                               *
  20. #                                                                           *
  21. #  If you decide to modify this script, please copy it to a safe place      *
  22. #  BEFORE you begin, so you will have it to refer to at a later date.       *
  23. #                                                                           *
  24. #****************************************************************************
  25.   preloadtex { object "Sol/Earth" }
  26.   preloadtex { object "Sol/Earth/Moon" }
  27.   select {object "Sol"}
  28.   goto   {time 3.0 distance 30}
  29.   wait   {duration 3.0}
  30.   select {object "Sol/Earth"}
  31.   follow {}
  32.   goto   {time 3.0  distance 6.0}
  33.   wait   {duration 2.0}
  34.   print  {text "Welkom bij Celestia!"  row -3  column 1  duration 3}
  35.   wait   {duration 3.0}
  36. #****************************************************************************
  37. #  The lines of code above are the entire start.cel script. Below, is a     *
  38. #  description of what each command does. We go to Sol first, so that when  *
  39. #  we go to Earth, it will be displaying it's sunny side, regardless of     *
  40. #  what your local time might be...                                         *
  41. #                                                                           *
  42. #  preloadtex: Tells Celestia to load the textures for the named object.    *
  43. #          Otherwise Celestia would load the texture when the object        *
  44. #          comes into view, which would be noticeable as a small delay.     *
  45. #                                                                           *
  46. #  select: Tells Celestia what object (planet, moon, spacecraft, etc.) to   *
  47. #          define as the currently selected object. Sol defines our solar   *
  48. #          system, the "/" character is merely a hierarchy divider, Earth   *
  49. #          is the object we want to select. If you wanted to select our     *
  50. #          Moon, the select command would look like the following:          *
  51. #            select {object "Sol/Earth/Moon"}                               *
  52. #                                                                           *
  53. #  goto:   Tells Celestia to travel to the currently selected object, just  *
  54. #          like pressing the "G" key on the keyboard. The time parameter    *
  55. #          defines how many seconds it should take to travel there. The     *
  56. #          distance parameter defines how far away from the object to be    *
  57. #          positioned, in units of the object's radius, plus 1. For         *
  58. #          example, if the object's radius is 10000 km, and you specify     *
  59. #          6.0 for distance, you will be positioned 50000 km from the       *
  60. #          center of the object.                                            *
  61. #                                                                           *
  62. #  wait:   Since the goto command is telling Celestia to take some time to  *
  63. #          do something, we need to give Celestia that same amount of time  *
  64. #          to actually DO it. When going to Sol, the wait command tells     *
  65. #          Celestia to wait for 3 seconds while the goto takes place (for   *
  66. #          3 seconds). The duration parameter value is normally the same    *
  67. #          as the time parameter in the goto command. However, there are    *
  68. #          always exceptions (grin).                                        *
  69. #                                                                           *
  70. #          When we are going to Earth, the wait command after the goto,     *
  71. #          waits for only 2 seconds. The next command is a print command,   *
  72. #          which displays some text on the screen and has another wait      *
  73. #          command after it, that waits for another 3 seconds. It's all     *
  74. #          just a matter of timing. The goto command allows us to display   *
  75. #          some text on-screen WHILE it is executing. So, we simply make    *
  76. #          sure that the total number of wait duration values, listed       *
  77. #          after a goto, adds up to AT LEAST the time value specified in    *
  78. #          the goto command. It can be longer, if desired.                  *
  79. #                                                                           *
  80. #  follow: Tells Celestia to follow the selected object through space,      *
  81. #          just like pressing the "F" key on the keyboard. You could        *
  82. #          replace the follow {} command with synchronous {}, which allows  *
  83. #          you to remain in a stationary, or geosynchronous orbit above     *
  84. #          the selected object.                                             *
  85. #                                                                           *
  86. #   print: Tells Celestia to display (print) some text on the screen. The   *
  87. #          text parameter defines the text to be displayed. The row         *
  88. #          parameter defines how many rows from the bottom of the window to *
  89. #          start displaying the text at. The column parameter defines how   *
  90. #          many columns from the left edge of the window to start           *
  91. #          displaying the text. The duration parameter defines how many     *
  92. #          seconds the text should be displayed on the screen. Which is     *
  93. #          then followed by the wait command, as described above.           *
  94. #****************************************************************************
  95. #****************************************************************************
  96. #  If you want to be positioned above YOUR specific location on Earth, use  *
  97. #  the gotolonglat command shown below. Step-by-step instructions...        *
  98. #                                                                           *
  99. #  * Copy the entire line of code.                                          *
  100. #                                                                           *
  101. #  * Paste it below the "goto" command above.                               *
  102. #                                                                           *
  103. #  * Remove the "#" character at the beginning of the line. This UNcomments *
  104. #    the line of code so it will be executed.                               *
  105. #                                                                           *
  106. #  * Add a "#" character to the beginning of the original goto command.     *
  107. #    This turns the line of code into a comment, so it will NOT be run.     *
  108. #                                                                           *
  109. #  * Change the longitude and latitude values to those of your location.    *
  110. #                                                                           *
  111. #  * Since you are going to a specific position on the Earth, it might not  *
  112. #    be daytime there, so you could comment-out the following lines of      *
  113. #    code by adding a "#" character to the beginning of each line...        *
  114. #      select {object "Sol"}                                                *
  115. #      goto   {time 3.0 distance 30}                                        *
  116. #      wait   {duration 3.0}                                                *
  117. #    If you WANT to display your location in the daytime, use the time      *
  118. #    command described next.                                                *
  119. #****************************************************************************
  120. #  gotolonglat {time 5.0  distance 4.0  longitude 0.0  latitude 0.0}
  121. #****************************************************************************
  122. #  If you would like Celestia to always start at a specific date/time, use  *
  123. #  the time command, as shown below.                                        *
  124. #                                                                           *
  125. #  WARNING: Starting Celestia with a pre-determined date/time requires that *
  126. #           you physically press the "!" (exclamation mark) key in order to *
  127. #           RESET the time to "current time", whenever you want to do some  *
  128. #           exploring -- IF the actual time makes a difference.             *
  129. #                                                                           *
  130. #  Step-by-step instructions...                                             *
  131. #                                                                           *
  132. #  * Determine if you want to set the date via a calendar UTC date/time     *
  133. #    string, or a Julian day (see below).                                   *
  134. #                                                                           *
  135. #  * Copy the one line of code with the time command you want to use.       *
  136. #                                                                           *
  137. #  * Paste it above the "goto" command above (top of file).                 *
  138. #                                                                           *
  139. #  * Remove the "#" character at the beginning of the line. This UNcomments *
  140. #    the line of code so it will be executed.                               *
  141. #                                                                           *
  142. #  * Change the date/time value to YOUR required date/time.                 *
  143. #****************************************************************************
  144. # Set the time via a calendar UTC date/time string...
  145. #  time { utc "2003-08-11T09:29:24.0000" }
  146. #              YYYY-MM-DDTHH:MM:SS.SSSS
  147. #  Note the "T" .........^ ... (this is required)
  148. # Set the time via a Julian day value...
  149. #  time { jd JulianDate }
  150. #    U.S. Navy Calendar Date/Time to Julian Date/Time converter:
  151. #    http://aa.usno.navy.mil/data/docs/JulianDate.html
  152. #****************************************************************************
  153. #  The commands listed below allow you to define several of Celestia's      *
  154. #  settings, that will be set every time you start Celestia. Modify any of  *
  155. #  the settings you want to.                                                *
  156. #****************************************************************************
  157. # Field of View (UNcomment / modify to meet your needs)...
  158. # Default is 25 degrees, at a screen resolution of 1024 x 768
  159. #  set {name "FOV" value 25.0}
  160. # Ambient light level (UNcomment / modify to meet your needs)...
  161. # 0.0 to 0.5 is a good Lo-Hi range
  162. #  set {name "AmbientLightLevel" value 0.1}
  163. # Faintest visible star magnitude (brightness)...
  164. # (UNcomment / modify to meet your needs)
  165. # Celestia UI: 0.8 to 15.2, default is 6.0
  166. #
  167. #  setvisibilitylimit {magnitude 6.0}
  168. # Faintest auto-magnitude brightness, at 45 degrees, Default is 8.5...
  169. # (UNcomment / modify to meet your needs)
  170. #  setfaintestautomag45deg {magnitude 8.5}
  171. # Items to be displayed (rendered):
  172. # Do NOT render the following objects (UNcomment to suit your needs)...
  173. #  renderflags {clear "atmospheres"}
  174. #  renderflags {clear "automag"}
  175. #  renderflags {clear "boundaries"}
  176. #  renderflags {clear "cloudmaps"}
  177. #  renderflags {clear "comettails"}
  178. #  renderflags {clear "constellations"}
  179. #  renderflags {clear "eclipseshadows"}
  180. #  renderflags {clear "galaxies"}
  181. #  renderflags {clear "grid"}
  182. #  renderflags {clear "markers"}
  183. #  renderflags {clear "nightmaps"}
  184. #  renderflags {clear "orbits"}
  185. #  renderflags {clear "planets"}
  186. #  renderflags {clear "pointstars"}
  187. #  renderflags {clear "ringshadows"}
  188. #  renderflags {clear "stars"}
  189. #  renderflags {clear "partialtrajectories"}
  190. # Items to be displayed (rendered):
  191. # DO render the following objects (UNcomment to suit your needs)...
  192. #  renderflags {set "atmospheres"}
  193. #  renderflags {set "automag"}
  194. #  renderflags {set "boundaries"}
  195. #  renderflags {set "cloudmaps"}
  196. #  renderflags {set "comettails"}
  197. #  renderflags {set "constellations"}
  198. #  renderflags {set "eclipseshadows"}
  199. #  renderflags {set "galaxies"}
  200. #  renderflags {set "grid"}
  201. #  renderflags {set "markers"}
  202. #  renderflags {set "nightmaps"}
  203. #  renderflags {set "orbits"}
  204. #  renderflags {set "planets"}
  205. #  renderflags {set "pointstars"}
  206. #  renderflags {set "ringshadows"}
  207. #  renderflags {set "stars"}
  208. #  renderflags {set "partialtrajectories"}
  209. # Text labels:
  210. # Do NOT label the following objects (UNcomment to suit your needs)...
  211. #  labels {clear "asteroids"}
  212. #  labels {clear "constellations"}
  213. #  labels {clear "galaxies"}
  214. #  labels {clear "moons"}
  215. #  labels {clear "planets"}
  216. #  labels {clear "spacecraft"}
  217. #  labels {clear "stars"}
  218. # Text labels:
  219. # DO label the following objects (UNcomment to suit your needs)...
  220. #  labels {set "asteroids"}
  221. #  labels {set "constellations"}
  222. #  labels {set "galaxies"}
  223. #  labels {set "moons"}
  224. #  labels {set "planets"}
  225. #  labels {set "spacecraft"}
  226. #  labels {set "stars"}
  227. # Marker control:
  228. # Unmark any objects that are currently Marked and disable Marker display...
  229. # (UNcomment to suit your needs)
  230. #  unmarkall { }
  231. # Minimum orbit diameter to be rendered (in pixels)...
  232. # (UNcomment / modify  to suit your needs)
  233. #  set {name "MinOrbitSize"  value 1.0}
  234. # Furthest visible star distance, default is 1000000...
  235. # (UNcomment / modify to suit your needs)
  236. #  set {name "StarDistanceLimit"  value 1000000}
  237. # Time rate (1x, 100x, 1000x, etc.)...
  238. # (UNcomment / modify to suit your needs)
  239. #    Negative value = Reverse Time
  240. #               0   = Pause Time
  241. #               1.0 = Real Time (default)
  242. #            1000.0 = Good moon orbit motion
  243. #
  244. #  timerate {rate 1.0}
  245. #****************************************************************************
  246. #  If you are using large textures, you can have Celestia pre-load them     *
  247. #  into your graphics card memory by listing them below.                    *
  248. #****************************************************************************
  249. # Examples...
  250. #  preloadtex {object "earth.*"}
  251. #  preloadtex {object "earth.png"}
  252. #****************************************************************************
  253. #  orbit is a fun command to play with. The axis is specified in [X Y Z]    *
  254. #  order, and each axis can be either 0 or 1. rate = how fast, duration =   *
  255. #  number of seconds. Just make sure you have an object selected.           *
  256. #****************************************************************************
  257. #  orbit {axis [0 1 0]  rate 10.0  duration 7.0}
  258. #****************************************************************************
  259. #  To learn more about scripting in Celestia, visit:                        *
  260. #                                                                           *
  261. #   * Scripting forum: (http://www.shatters.net/forum/viewforum.php?f=9)    *
  262. #   * Don G's Celestia page: (http://www.donandcarla.com/Celestia/)         *
  263. #   * Harald's Celestia page: (http://www.h-schmidt.net/celestia/)          *
  264. #                                                                           *
  265. #  Don G's page includes a guide for CEL scripting. Harald's page includes  *
  266. #  a guide for CELX (Lua) scripting. Both also have example scripts and     *
  267. #  other goodies.                                                           *
  268. #****************************************************************************
  269. # End of script...
  270. }