RenderableTravelSpeed
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
This value sets which scene graph node to target with the light speed indicator |
|
Value of type ‘String’ |
No |
|
This value determines the RGB color for the line |
|
Value of type ‘Vector3 |
Yes |
|
This value specifies the length of the faded tail of the light indicator set in light seconds |
|
Value of type ‘Double’ |
Yes |
|
This value specifies the length of the light indicator set in light seconds |
|
Value of type ‘Double’ |
Yes |
|
This value specifies the line width |
|
Value of type ‘Double’ |
Yes |
|
The speed of light is the default value |
|
Value of type ‘Double’ |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere |
|
Value of type ‘Boolean’ |
Yes |
|
This setting 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 |
|
This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step |
|
In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay } |
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 |
|
This tells the type of the renderable |
|
Value of type ‘String’ |
Yes |
Asset Examples
1local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
2local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
3local coreKernels = asset.require("spice/core")
4
5
6
7local TravelSpeedIndicator = {
8 Identifier = "TravelSpeedIndicator-2000",
9 --SunIAU adds an extra rotation. Using barycenter, then offsetting to SunIAU
10 Parent = sunTransforms.SolarSystemBarycenter.Identifier,
11 -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
12 -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
13 InteractionSphere = 695700000.0,
14 Transform = {
15 Translation = {
16 Type = "SpiceTranslation",
17 Target = coreKernels.ID.Sun,
18 Observer = coreKernels.ID.SolarSystemBarycenter
19 }
20 },
21 Renderable = {
22 Type = "RenderableTravelSpeed",
23 Target = earthTransforms.EarthCenter.Identifier,
24 LineWidth = 4,
25 IndicatorLength = 10,
26 FadeLength = 10
27 },
28 GUI = {
29 Path = "/Solar System/Heliosphere",
30 Name = "Speed indicator",
31 Description = "Speed of light indicator from sun to earth"
32 }
33}
34
35
36asset.onInitialize(function()
37 openspace.addSceneGraphNode(TravelSpeedIndicator)
38end)
39
40asset.onDeinitialize(function()
41 openspace.removeSceneGraphNode(TravelSpeedIndicator)
42end)
43
44asset.export(TravelSpeedIndicator)
45
46
47
48asset.meta = {
49 Name = "Light travel from sun to earth",
50 Version = "1.0",
51 Description = "Speed of light indicator from sun to earth",
52 Author = "CCMC, Christian Adamsson, Emilie Ho",
53 URL = "",
54 License = "MIT"
55}