RenderableDUMeshes
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The path to the SPECK file that contains information about the astronomical object being rendered. |
|
Value of type ‘String’ |
No |
|
Determines whether labels should be drawn or hidden. |
|
Value of type ‘Boolean’ |
Yes |
|
The path to the label file that contains information about the astronomical objects being rendered. |
|
Value of type ‘String’ |
Yes |
|
If the DU mesh is of wire type, this value determines the width of the lines. |
|
Value of type ‘Double’ |
Yes |
|
The defined colors for the meshes to be rendered. |
|
Yes |
|
|
The text color for the astronomical object. |
|
Value of type ‘Color3’ |
Yes |
|
The minimum and maximum size (in pixels) of the text for the labels for the astronomical objects being rendered. |
|
Value of type ‘Vector2 |
Yes |
|
Determines the transparency of the text label, where 1 is completely opaque and 0 fully transparent. |
|
Value of type ‘Double’ |
Yes |
|
The text size for the astronomical object labels. |
|
Value of type ‘Double’ |
Yes |
|
The unit used when interpreting the positions in the dataset. |
|
In list { m, Km, pc, Kpc, Mpc, Gpc, Gly } |
Yes |
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 MeshColor
The defined colors for the meshes to be rendered.
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
|
Value of type ‘Vector3 |
Yes |
Asset Examples
1local transforms = asset.require("scene/solarsystem/sun/transforms")
2local earth_transforms = asset.require("scene/solarsystem/planets/earth/transforms")
3
4
5
6local speck = asset.resource({
7 Name = "Star Orbits Speck Files",
8 Type = "HttpSynchronization",
9 Identifier = "digitaluniverse_starorbits_speck",
10 Version = 2
11})
12
13
14local SunOrbit = {
15 Identifier = "SunOrbit",
16 Renderable = {
17 Type = "RenderableDUMeshes",
18 Enabled = false,
19 Opacity = 1.0,
20 File = speck .. "starorbits-Sun.speck",
21 MeshColor = { { 1.0, 0.65, 0.0 } },
22 Unit = "pc"
23 },
24 GUI = {
25 Name = "Sun Orbit",
26 Path = "/Milky Way/Stars/Stars Orbits",
27 Focusable = false,
28 Description = [[Projected orbit of the Sun around the Milky Way over the next 1
29 billion years.]]
30 }
31}
32
33local BarnardsOrbit = {
34 Identifier = "BarnardsOrbit",
35 Renderable = {
36 Type = "RenderableDUMeshes",
37 Enabled = false,
38 Opacity = 1.0,
39 File = speck .. "starorbits-BarnardsStar.speck",
40 MeshColor = { { 0.39, 0.58, 0.93 } },
41 Unit = "pc"
42 },
43 GUI = {
44 Name = "Barnards Orbit",
45 Path = "/Milky Way/Stars/Stars Orbits",
46 Focusable = false,
47 Description = [[Projected orbit of Barnard's Star around the Milky Way over the next
48 1 billion years.]]
49 }
50}
51
52local KapteynsOrbit = {
53 Identifier = "KapteynsOrbit",
54 Renderable = {
55 Type = "RenderableDUMeshes",
56 Enabled = false,
57 Opacity = 1.0,
58 File = speck .. "starorbits-KapteynsStar.speck",
59 MeshColor = { { 0.6, 0.6, 0.6 } },
60 Unit = "pc"
61 },
62 GUI = {
63 Name = "Kapteyns Orbit",
64 Path = "/Milky Way/Stars/Stars Orbits",
65 Focusable = false,
66 Description = [[Projected orbit of Kapteyn's Star around the Milky Way over the next
67 1 billion years.]]
68 }
69}
70
71local Lacaille9352Orbit = {
72 Identifier = "Lacaille9352Orbit",
73 Renderable = {
74 Type = "RenderableDUMeshes",
75 Enabled = false,
76 Opacity = 1.0,
77 File = speck .. "starorbits-Lacaille9352.speck",
78 MeshColor = { { 0.58, 0.0, 0.83 } },
79 Unit = "pc"
80 },
81 GUI = {
82 Name = "Lacaille 9352 Orbit",
83 Path = "/Milky Way/Stars/Stars Orbits",
84 Focusable = false,
85 Description = [[Projected orbit of Lacaille9352 around the Milky Way over the next
86 1 billion years.]]
87 }
88}
89
90local LSR1826Orbit = {
91 Identifier = "LSR1826Orbit",
92 Renderable = {
93 Type = "RenderableDUMeshes",
94 Enabled = false,
95 Opacity = 1.0,
96 File = speck .. "starorbits-LSR1826+3014.speck",
97 MeshColor = { { 0.0, 0.39, 0.0 } },
98 Unit = "pc"
99 },
100 GUI = {
101 Name = "LSR1826+3014 Orbit",
102 Path = "/Milky Way/Stars/Stars Orbits",
103 Focusable = false,
104 Description = [[Projected orbit of LSR1826+3014 around the Milky Way over the next 1
105 billion years.]]
106 }
107}
108
109local LSRJ0822Orbit = {
110 Identifier = "LSRJ0822Orbit",
111 Renderable = {
112 Type = "RenderableDUMeshes",
113 Enabled = false,
114 Opacity = 1.0,
115 File = speck .. "starorbits-LSRJ0822+1700.speck",
116 MeshColor = { { 0.5, 1.0, 0.0 } },
117 Unit = "pc"
118 },
119 GUI = {
120 Name = "LSRJ0822+1700 Orbit",
121 Path = "/Milky Way/Stars/Stars Orbits",
122 Focusable = false,
123 Description = [[Projected orbit of LSRJ0822+1700 around the Milky Way over the next 1
124 billion years.]]
125 }
126}
127
128local PM_J13420Orbit = {
129 Identifier = "PM_J13420Orbit",
130 Renderable = {
131 Type = "RenderableDUMeshes",
132 Enabled = false,
133 Opacity = 1.0,
134 File = speck .. "starorbits-PM_J13420-3415.speck",
135 MeshColor = { { 0.70, 0.13, 0.13 } },
136 Unit = "pc"
137 },
138 GUI = {
139 Name = "PM_J13420-3415 Orbit",
140 Path = "/Milky Way/Stars/Stars Orbits",
141 Focusable = false,
142 Description = [[Projected orbit of PM_J13420-3415 around the Milky Way over the next
143 1 billion years.]]
144 }
145}
146
147
148asset.onInitialize(function()
149 openspace.addSceneGraphNode(SunOrbit)
150 openspace.addSceneGraphNode(BarnardsOrbit)
151 openspace.addSceneGraphNode(KapteynsOrbit)
152 openspace.addSceneGraphNode(Lacaille9352Orbit)
153 openspace.addSceneGraphNode(LSR1826Orbit)
154 openspace.addSceneGraphNode(LSRJ0822Orbit)
155 openspace.addSceneGraphNode(PM_J13420Orbit)
156end)
157
158asset.onDeinitialize(function()
159 openspace.removeSceneGraphNode(PM_J13420Orbit)
160 openspace.removeSceneGraphNode(LSRJ0822Orbit)
161 openspace.removeSceneGraphNode(LSR1826Orbit)
162 openspace.removeSceneGraphNode(Lacaille9352Orbit)
163 openspace.removeSceneGraphNode(KapteynsOrbit)
164 openspace.removeSceneGraphNode(BarnardsOrbit)
165 openspace.removeSceneGraphNode(SunOrbit)
166end)
167
168asset.export(SunOrbit)
169asset.export(BarnardsOrbit)
170asset.export(KapteynsOrbit)
171asset.export(Lacaille9352Orbit)
172asset.export(LSR1826Orbit)
173asset.export(LSRJ0822Orbit)
174asset.export(PM_J13420Orbit)
175
176
177
178asset.meta = {
179 Name = "Star Orbits",
180 Description = [[Projected star orbits for selected stars over the next 1 billion years. Census: 7 star orbits.]],
181 Author = "Brian Abbott, Zack Reeves (AMNH)",
182 URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
183 License = "AMNH Digital Universe"
184}