RenderableCrawlingLine
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The colors used for the crawling line, given as one color at the start of the line and one at the end. |
|
No |
|
|
The SPICE name of the instrument that is used to render the crawling line. |
|
Value of type ‘String’ |
No |
|
The SPICE name of the source of the crawling line. For example, the spacecraft. |
|
Value of type ‘String’ |
No |
|
The SPICE name of the target of the crawling line. |
|
Value of type ‘String’ |
No |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0,1 ) |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
The type of the renderable. |
|
Value of type ‘String’ |
Yes |
Table parameters for Color
The colors used for the crawling line, given as one color at the start of the line and one at the end.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The color at the end of the line. |
|
Value of type ‘Color4’ |
No |
|
The color at the start of the line. |
|
Value of type ‘Color4’ |
No |
Asset Examples
1local transforms = asset.require("./transforms")
2local kernels = asset.require("./kernels")
3local coreKernels = asset.require("spice/core")
4
5
6
7local LorriOffset = { -6.626, -4.1, -3.23 }
8local RalphOffset = { -6.9, -4.6, 8.7 }
9local AliceOffset = { -7.9, -1.7, 8.3 }
10local RexOffset = { 0, 0, 0 }
11
12local Lorri = {
13 Identifier = "NH_LORRI",
14 Parent = transforms.NewHorizonsPosition.Identifier,
15 Transform = {
16 Translation = {
17 Type = "StaticTranslation",
18 Position = LorriOffset
19 }
20 },
21 Renderable = {
22 Type = "RenderableFov",
23 Body = kernels.ID.NewHorizons,
24 Frame = kernels.Frame.NewHorizons,
25 Color = { 0.8, 0.7, 0.7 },
26 Instrument = {
27 Name = kernels.Frame.Lorri,
28 Aberration = "NONE"
29 },
30 PotentialTargets = {
31 kernels.ID.Pluto,
32 kernels.ID.Charon
33 }
34 },
35 GUI = {
36 Name = "LORRI",
37 Path = "/Solar System/Missions/New Horizons/Instruments",
38 Focusable = false
39 }
40}
41
42local RalphLeisa = {
43 Identifier = "NH_RALPH_LEISA",
44 Parent = transforms.NewHorizonsPosition.Identifier,
45 Transform = {
46 Translation = {
47 Type = "StaticTranslation",
48 Position = RalphOffset
49 }
50 },
51 Renderable = {
52 Type = "RenderableFov",
53 Body = kernels.ID.NewHorizons,
54 Frame = kernels.Frame.NewHorizons,
55 RGB = { 0.8, 0.7, 0.7 },
56 Instrument = {
57 Name = kernels.Frame.RalphLeisa,
58 Aberration = "NONE"
59 },
60 PotentialTargets = {
61 kernels.ID.Pluto,
62 kernels.ID.Charon
63 }
64 },
65 GUI = {
66 Name = "RALPH LEISA",
67 Path = "/Solar System/Missions/New Horizons/Instruments",
68 Focusable = false
69 }
70}
71
72local RalphMvicPan1 = {
73 Identifier = "NH_RALPH_MVIC_PAN1",
74 Parent = transforms.NewHorizonsPosition.Identifier,
75 Transform = {
76 Translation = {
77 Type = "StaticTranslation",
78 Position = RalphOffset
79 }
80 },
81 Renderable = {
82 Type = "RenderableFov",
83 Body = kernels.ID.NewHorizons,
84 Frame = kernels.Frame.NewHorizons,
85 RGB = { 0.8, 0.7, 0.7 },
86 Instrument = {
87 Name = kernels.Frame.RalphMvicPan1,
88 Aberration = "NONE"
89 },
90 PotentialTargets = {
91 kernels.ID.Pluto,
92 kernels.ID.Charon
93 }
94 },
95 GUI = {
96 Name = "RALPH MVIC PAN 1",
97 Path = "/Solar System/Missions/New Horizons/Instruments",
98 Focusable = false
99 }
100}
101
102local RalphMvicPan2 = {
103 Identifier = "NH_RALPH_MVIC_PAN2",
104 Parent = transforms.NewHorizonsPosition.Identifier,
105 Transform = {
106 Translation = {
107 Type = "StaticTranslation",
108 Position = RalphOffset
109 }
110 },
111 Renderable = {
112 Type = "RenderableFov",
113 Body = kernels.ID.NewHorizons,
114 Frame = kernels.Frame.NewHorizons,
115 RGB = { 0.8, 0.7, 0.7 },
116 Instrument = {
117 Name = kernels.Frame.RalphMvicPan2,
118 Aberration = "NONE"
119 },
120 PotentialTargets = {
121 kernels.ID.Pluto,
122 kernels.ID.Charon
123 }
124 },
125 GUI = {
126 Name = "RALPH MVIC PAN 2",
127 Path = "/Solar System/Missions/New Horizons/Instruments",
128 Focusable = false
129 }
130}
131
132local RalphMvicRed = {
133 Identifier = "NH_RALPH_MVIC_RED",
134 Parent = transforms.NewHorizonsPosition.Identifier,
135 Transform = {
136 Translation = {
137 Type = "StaticTranslation",
138 Position = RalphOffset
139 }
140 },
141 Renderable = {
142 Type = "RenderableFov",
143 Body = kernels.ID.NewHorizons,
144 Frame = kernels.Frame.NewHorizons,
145 RGB = { 0.8, 0.7, 0.7 },
146 Instrument = {
147 Name = kernels.Frame.RalphMvicRed,
148 Aberration = "NONE"
149 },
150 PotentialTargets = {
151 kernels.ID.Pluto,
152 kernels.ID.Charon
153 }
154 },
155 GUI = {
156 Name = "RALPH MVIC RED",
157 Path = "/Solar System/Missions/New Horizons/Instruments",
158 Focusable = false
159 }
160}
161
162local RalphMvicBlue = {
163 Identifier = "NH_RALPH_MVIC_BLUE",
164 Parent = transforms.NewHorizonsPosition.Identifier,
165 Transform = {
166 Translation = {
167 Type = "StaticTranslation",
168 Position = RalphOffset
169 }
170 },
171 Renderable = {
172 Type = "RenderableFov",
173 Body = kernels.ID.NewHorizons,
174 Frame = kernels.Frame.NewHorizons,
175 RGB = { 0.8, 0.7, 0.7 },
176 Instrument = {
177 Name = kernels.Frame.RalphMvicBlue,
178 Aberration = "NONE"
179 },
180 PotentialTargets = {
181 kernels.ID.Pluto,
182 kernels.ID.Charon
183 }
184 },
185 GUI = {
186 Name = "RALPH MVIC BLUE",
187 Path = "/Solar System/Missions/New Horizons/Instruments",
188 Focusable = false
189 }
190}
191
192local RalphMvicFt = {
193 Identifier = "NH_RALPH_MVIC_FT",
194 Parent = transforms.NewHorizonsPosition.Identifier,
195 Transform = {
196 Translation = {
197 Type = "StaticTranslation",
198 Position = RalphOffset
199 }
200 },
201 Renderable = {
202 Type = "RenderableFov",
203 Body = kernels.ID.NewHorizons,
204 Frame = kernels.Frame.NewHorizons,
205 RGB = { 0.8, 0.7, 0.7 },
206 Instrument = {
207 Name = kernels.Frame.RalphMvicFT,
208 Aberration = "NONE"
209 },
210 PotentialTargets = {
211 kernels.ID.Pluto,
212 kernels.ID.Charon
213 }
214 },
215 GUI = {
216 Name = "RALPH MVIC FT",
217 Path = "/Solar System/Missions/New Horizons/Instruments",
218 Focusable = false
219 }
220}
221
222local RalphMvicMethane = {
223 Identifier = "NH_RALPH_MVIC_METHANE",
224 Parent = transforms.NewHorizonsPosition.Identifier,
225 Transform = {
226 Translation = {
227 Type = "StaticTranslation",
228 Position = RalphOffset
229 }
230 },
231 Renderable = {
232 Type = "RenderableFov",
233 Body = kernels.ID.NewHorizons,
234 Frame = kernels.Frame.NewHorizons,
235 RGB = { 0.8, 0.7, 0.7 },
236 Instrument = {
237 Name = kernels.Frame.RalphMvicMethane,
238 Aberration = "NONE"
239 },
240 PotentialTargets = {
241 kernels.ID.Pluto,
242 kernels.ID.Charon
243 }
244 },
245 GUI = {
246 Name = "RALPH MVIC METHANE",
247 Path = "/Solar System/Missions/New Horizons/Instruments",
248 Focusable = false
249 }
250}
251
252local RalphMvicNir = {
253 Identifier = "NH_RALPH_MVIC_NIR",
254 Parent = transforms.NewHorizonsPosition.Identifier,
255 Transform = {
256 Translation = {
257 Type = "StaticTranslation",
258 Position = RalphOffset
259 }
260 },
261 Renderable = {
262 Type = "RenderableFov",
263 Body = kernels.ID.NewHorizons,
264 Frame = kernels.Frame.NewHorizons,
265 RGB = { 0.8, 0.7, 0.7 },
266 Instrument = {
267 Name = kernels.Frame.RalphMvicNIR,
268 Aberration = "NONE"
269 },
270 PotentialTargets = {
271 kernels.ID.Pluto,
272 kernels.ID.Charon
273 }
274 },
275 GUI = {
276 Name = "RALPH MVIC NIR",
277 Path = "/Solar System/Missions/New Horizons/Instruments",
278 Focusable = false
279 }
280}
281
282local AliceAirglow = {
283 Identifier = "NH_ALICE_AIRGLOW",
284 Parent = transforms.NewHorizonsPosition.Identifier,
285 Transform = {
286 Translation = {
287 Type = "StaticTranslation",
288 Position = AliceOffset
289 }
290 },
291 Renderable = {
292 Type = "RenderableFov",
293 Body = kernels.ID.NewHorizons,
294 Frame = kernels.Frame.NewHorizons,
295 RGB = { 0.8, 0.7, 0.7 },
296 Instrument = {
297 Name = kernels.Frame.AliceAirglow,
298 Aberration = "NONE"
299 },
300 PotentialTargets = {
301 kernels.ID.Pluto,
302 kernels.ID.Charon
303 },
304 SimplifyBounds = true
305 },
306 GUI = {
307 Name = "ALICE AIRGLOW",
308 Path = "/Solar System/Missions/New Horizons/Instruments",
309 Focusable = false
310 }
311}
312
313local AliceSoc = {
314 Identifier = "NH_ALICE_SOC",
315 Parent = transforms.NewHorizonsPosition.Identifier,
316 Transform = {
317 Translation = {
318 Type = "StaticTranslation",
319 Position = AliceOffset
320 }
321 },
322 Renderable = {
323 Type = "RenderableFov",
324 Body = kernels.ID.NewHorizons,
325 Frame = kernels.Frame.NewHorizons,
326 RGB = { 0.8, 0.7, 0.7 },
327 Instrument = {
328 Name = kernels.Frame.AliceSOC,
329 Aberration = "NONE"
330 },
331 PotentialTargets = {
332 kernels.ID.Pluto,
333 kernels.ID.Charon
334 }
335 },
336 GUI = {
337 Name = "ALICE SOC",
338 Path = "/Solar System/Missions/New Horizons/Instruments",
339 Focusable = false
340 }
341}
342
343local Rex = {
344 Identifier = "NH_REX",
345 Parent = transforms.NewHorizonsPosition.Identifier,
346 Transform = {
347 Translation = {
348 Type = "StaticTranslation",
349 Position = RexOffset
350 },
351 Rotation = {
352 Type = "StaticRotation",
353 Rotation = { -math.pi / 2, 0.0, -math.pi / 2 }
354 }
355 },
356 Renderable = {
357 Type = "RenderableCrawlingLine",
358 Source = kernels.ID.Rex,
359 Target = coreKernels.ID.Earth,
360 Instrument = kernels.Frame.Rex,
361 Color = {
362 Start = { 1.0, 0.7, 0.0, 1.0 },
363 End = { 0.0, 0.0, 0.0, 0.0 }
364 }
365 },
366 GUI = {
367 Name = "REX",
368 Path = "/Solar System/Missions/New Horizons/Instruments",
369 Focusable = false
370 }
371}
372
373
374asset.onInitialize(function()
375 openspace.addSceneGraphNode(Lorri)
376 openspace.addSceneGraphNode(RalphLeisa)
377 openspace.addSceneGraphNode(RalphMvicPan1)
378 openspace.addSceneGraphNode(RalphMvicPan2)
379 openspace.addSceneGraphNode(RalphMvicRed)
380 openspace.addSceneGraphNode(RalphMvicBlue)
381 openspace.addSceneGraphNode(RalphMvicFt)
382 openspace.addSceneGraphNode(RalphMvicMethane)
383 openspace.addSceneGraphNode(RalphMvicNir)
384 openspace.addSceneGraphNode(AliceAirglow)
385 openspace.addSceneGraphNode(AliceSoc)
386 openspace.addSceneGraphNode(Rex)
387end)
388
389asset.onDeinitialize(function()
390 openspace.removeSceneGraphNode(Rex)
391 openspace.removeSceneGraphNode(AliceSoc)
392 openspace.removeSceneGraphNode(AliceAirglow)
393 openspace.removeSceneGraphNode(RalphMvicNir)
394 openspace.removeSceneGraphNode(RalphMvicMethane)
395 openspace.removeSceneGraphNode(RalphMvicFt)
396 openspace.removeSceneGraphNode(RalphMvicBlue)
397 openspace.removeSceneGraphNode(RalphMvicRed)
398 openspace.removeSceneGraphNode(RalphMvicPan2)
399 openspace.removeSceneGraphNode(RalphMvicPan1)
400 openspace.removeSceneGraphNode(RalphLeisa)
401 openspace.removeSceneGraphNode(Lorri)
402end)
403
404asset.export(Lorri)
405asset.export(RalphLeisa)
406asset.export(RalphMvicPan1)
407asset.export(RalphMvicPan2)
408asset.export(RalphMvicRed)
409asset.export(RalphMvicBlue)
410asset.export(RalphMvicFt)
411asset.export(RalphMvicMethane)
412asset.export(RalphMvicNir)
413asset.export(AliceAirglow)
414asset.export(AliceSoc)
415asset.export(Rex)