RenderableDUMeshes

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

File

The path to the SPECK file that contains information about the astronomical object being rendered

String

Value of type ‘String’

No

DrawLabels

Determines whether labels should be drawn or hidden

Boolean

Value of type ‘Boolean’

Yes

LabelFile

The path to the label file that contains information about the astronomical objects being rendered

String

Value of type ‘String’

Yes

LineWidth

If the DU mesh is of wire type, this value determines the width of the lines

Double

Value of type ‘Double’

Yes

MeshColor

The defined colors for the meshes to be rendered

Table

Table parameters

Yes

TextColor

The text color for the astronomical object

Color3

Value of type ‘Color3’

Yes

TextMinMaxSize

The minimum and maximum size (in pixels) of the text for the labels for the astronomical objects being rendered

Vector2<int>

Value of type ‘Vector2

Yes

TextOpacity

Determines the transparency of the text label, where 1 is completely opaque and 0 fully transparent

Double

Value of type ‘Double’

Yes

TextSize

The text size for the astronomical object labels

Double

Value of type ‘Double’

Yes

Unit

String

In list { m, Km, pc, Kpc, Mpc, Gpc, Gly }

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting determines whether this object will be visible or not

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

This tells the type of the renderable

String

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

*

Vector3<double>

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 = "Grids Speck Files",
  8  Type = "HttpSynchronization",
  9  Identifier = "digitaluniverse_starorbits_speck",
 10  Version = 1
 11})
 12
 13
 14local SunOrbit = {
 15  Identifier = "SunOrbit",
 16  --Parent = transforms.SolarSystemBarycenter.Name,
 17  Renderable = {
 18    Type = "RenderableDUMeshes",
 19    Enabled = false,
 20    Opacity = 1.0,
 21    File = speck .. "starorbits-Sun.speck",
 22    MeshColor = { { 1.0, 0.65, 0.0 } },
 23    --LabelFile = speck .. "1ld.label",
 24    -- TextColor = { 0.0, 0.2, 0.5 },
 25    -- TextMinMaxSize = { 0, 30 },
 26    Unit = "pc"
 27  },
 28  GUI = {
 29    Name = "Sun Orbit",
 30    Path = "/Milky Way/Stars/Stars Orbits",
 31    Description = "Orbits of the Sun around the Milky Way"
 32  }
 33}
 34
 35local BarnardsOrbit = {
 36  Identifier = "BarnardsOrbit",
 37  --Parent = transforms.SolarSystemBarycenter.Name,
 38  Renderable = {
 39    Type = "RenderableDUMeshes",
 40    Enabled = false,
 41    Opacity = 1.0,
 42    File = speck .. "starorbits-BarnardsStar.speck",
 43    MeshColor = { { 0.39, 0.58, 0.93 } },
 44    --LabelFile = speck .. "1ld.label",
 45    -- TextColor = { 0.0, 0.2, 0.5 },
 46    -- TextSize = 10.3,
 47    -- TextMinMaxSize = { 0, 30 },
 48    Unit = "pc"
 49  },
 50  GUI = {
 51    Name = "Barnards Orbit",
 52    Path = "/Milky Way/Stars/Stars Orbits",
 53    Description = "Orbits of Barnard's Star around the Milky Way"
 54  }
 55}
 56
 57local KapteynsOrbit = {
 58  Identifier = "KapteynsOrbit",
 59  --Parent = transforms.SolarSystemBarycenter.Name,
 60  Renderable = {
 61    Type = "RenderableDUMeshes",
 62    Enabled = false,
 63    Opacity = 1.0,
 64    File = speck .. "starorbits-KapteynsStar.speck",
 65    MeshColor = { { 0.6, 0.6, 0.6 } },
 66    --LabelFile = speck .. "1ld.label",
 67    -- TextColor = { 0.0, 0.2, 0.5 },
 68    -- TextSize = 10.3,
 69    -- TextMinMaxSize = { 0, 30 },
 70    Unit = "pc"
 71  },
 72  GUI = {
 73    Name = "Kapteyns Orbit",
 74    Path = "/Milky Way/Stars/Stars Orbits",
 75    Description = "Orbits of Kapteyn's Star around the Milky Way"
 76  }
 77}
 78
 79local Lacaille9352Orbit = {
 80  Identifier = "Lacaille9352Orbit",
 81  --Parent = transforms.SolarSystemBarycenter.Name,
 82  Renderable = {
 83    Type = "RenderableDUMeshes",
 84    Enabled = false,
 85    Opacity = 1.0,
 86    File = speck .. "starorbits-Lacaille9352.speck",
 87    MeshColor = { { 0.58, 0.0, 0.83 } },
 88    --LabelFile = speck .. "1ld.label",
 89    -- TextColor = { 0.0, 0.2, 0.5 },
 90    -- TextSize = 10.3,
 91    -- TextMinMaxSize = { 0, 30 },
 92    Unit = "pc"
 93  },
 94  GUI = {
 95    Name = "Lacaille 9352 Orbit",
 96    Path = "/Milky Way/Stars/Stars Orbits",
 97    Description = "Orbits of Lacaille9352 around the Milky Way"
 98  }
 99}
100
101local LSR1826Orbit = {
102  Identifier = "LSR1826Orbit",
103  --Parent = transforms.SolarSystemBarycenter.Name,
104  Renderable = {
105    Type = "RenderableDUMeshes",
106    Enabled = false,
107    Opacity = 1.0,
108    File = speck .. "starorbits-LSR1826+3014.speck",
109    MeshColor = { { 0.0, 0.39, 0.0 } },
110    --LabelFile = speck .. "1ld.label",
111    -- TextColor = { 0.0, 0.2, 0.5 },
112    -- TextSize = 10.3,
113    -- TextMinMaxSize = { 0, 30 },
114    Unit = "pc"
115  },
116  GUI = {
117    Name = "LSR1826+3014 Orbit",
118    Path = "/Milky Way/Stars/Stars Orbits",
119    Description = "Orbits of LSR1826+3014 around the Milky Way"
120  }
121}
122
123local LSRJ0822Orbit = {
124  Identifier = "LSRJ0822Orbit",
125  --Parent = transforms.SolarSystemBarycenter.Name,
126  Renderable = {
127    Type = "RenderableDUMeshes",
128    Enabled = false,
129    Opacity = 1.0,
130    File = speck .. "starorbits-LSRJ0822+1700.speck",
131    MeshColor = { { 0.5, 1.0, 0.0 } },
132    --LabelFile = speck .. "1ld.label",
133    -- TextColor = { 0.0, 0.2, 0.5 },
134    -- TextSize = 10.3,
135    -- TextMinMaxSize = { 0, 30 },
136    Unit = "pc"
137  },
138  GUI = {
139    Name = "LSRJ0822+1700 Orbit",
140    Path = "/Milky Way/Stars/Stars Orbits",
141    Description = "Orbits of LSRJ0822+1700 around the Milky Way"
142  }
143}
144
145local PM_J13420Orbit = {
146  Identifier = "PM_J13420Orbit",
147  --Parent = transforms.SolarSystemBarycenter.Name,
148  Renderable = {
149    Type = "RenderableDUMeshes",
150    Enabled = false,
151    Opacity = 1.0,
152    File = speck .. "starorbits-PM_J13420-3415.speck",
153    MeshColor = { { 0.70, 0.13, 0.13 } },
154    --LabelFile = speck .. "1ld.label",
155    -- TextColor = { 0.0, 0.2, 0.5 },
156    -- TextSize = 10.3,
157    -- TextMinMaxSize = { 0, 30 },
158    Unit = "pc"
159  },
160  GUI = {
161    Name = "PM_J13420-3415 Orbit",
162    Path = "/Milky Way/Stars/Stars Orbits",
163    Description = "Orbits of PM_J13420-3415 around the Milky Way"
164  }
165}
166
167
168asset.onInitialize(function()
169  openspace.addSceneGraphNode(SunOrbit)
170  openspace.addSceneGraphNode(BarnardsOrbit)
171  openspace.addSceneGraphNode(KapteynsOrbit)
172  openspace.addSceneGraphNode(Lacaille9352Orbit)
173  openspace.addSceneGraphNode(LSR1826Orbit)
174  openspace.addSceneGraphNode(LSRJ0822Orbit)
175  openspace.addSceneGraphNode(PM_J13420Orbit)
176end)
177
178asset.onDeinitialize(function()
179  openspace.removeSceneGraphNode(PM_J13420Orbit)
180  openspace.removeSceneGraphNode(LSRJ0822Orbit)
181  openspace.removeSceneGraphNode(LSR1826Orbit)
182  openspace.removeSceneGraphNode(Lacaille9352Orbit)
183  openspace.removeSceneGraphNode(KapteynsOrbit)
184  openspace.removeSceneGraphNode(BarnardsOrbit)
185  openspace.removeSceneGraphNode(SunOrbit)
186end)
187
188asset.export(SunOrbit)
189asset.export(BarnardsOrbit)
190asset.export(KapteynsOrbit)
191asset.export(Lacaille9352Orbit)
192asset.export(LSR1826Orbit)
193asset.export(LSRJ0822Orbit)
194asset.export(PM_J13420Orbit)
195
196
197
198asset.meta = {
199  Name = "Star Orbits",
200  Version = "1.1",
201  Description = [[Select Star Orbital paths that delineate their trajectory around the
202    Milky Way over 1 billion years into the future. Included: Sun, Barnards, Kapteyns,
203    Lacaille 9352, LSR1826+3014, LSRJ0822+1700, PM_J13420-3415. <br><br> Data
204    Reference: Sebastien Lepine (AMNH)]],
205  Author = "Brian Abbott (AMNH)",
206  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
207  License = "AMNH Digital Universe"
208}