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