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

The unit used when interpreting the positions in the dataset.

String

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

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

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

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker 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

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 = "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    Description = [[Projected orbit of the Sun around the Milky Way over the next 1
 28      billion years.]]
 29  }
 30}
 31
 32local BarnardsOrbit = {
 33  Identifier = "BarnardsOrbit",
 34  Renderable = {
 35    Type = "RenderableDUMeshes",
 36    Enabled = false,
 37    Opacity = 1.0,
 38    File = speck .. "starorbits-BarnardsStar.speck",
 39    MeshColor = { { 0.39, 0.58, 0.93 } },
 40    Unit = "pc"
 41  },
 42  GUI = {
 43    Name = "Barnards Orbit",
 44    Path = "/Milky Way/Stars/Stars Orbits",
 45    Description = [[Projected orbit of Barnard's Star around the Milky Way over the next
 46      1 billion years.]]
 47  }
 48}
 49
 50local KapteynsOrbit = {
 51  Identifier = "KapteynsOrbit",
 52  Renderable = {
 53    Type = "RenderableDUMeshes",
 54    Enabled = false,
 55    Opacity = 1.0,
 56    File = speck .. "starorbits-KapteynsStar.speck",
 57    MeshColor = { { 0.6, 0.6, 0.6 } },
 58    Unit = "pc"
 59  },
 60  GUI = {
 61    Name = "Kapteyns Orbit",
 62    Path = "/Milky Way/Stars/Stars Orbits",
 63    Description = [[Projected orbit of Kapteyn's Star around the Milky Way over the next
 64      1 billion years.]]
 65  }
 66}
 67
 68local Lacaille9352Orbit = {
 69  Identifier = "Lacaille9352Orbit",
 70  Renderable = {
 71    Type = "RenderableDUMeshes",
 72    Enabled = false,
 73    Opacity = 1.0,
 74    File = speck .. "starorbits-Lacaille9352.speck",
 75    MeshColor = { { 0.58, 0.0, 0.83 } },
 76    Unit = "pc"
 77  },
 78  GUI = {
 79    Name = "Lacaille 9352 Orbit",
 80    Path = "/Milky Way/Stars/Stars Orbits",
 81    Description = [[Projected orbit of Lacaille9352 around the Milky Way over the next
 82      1 billion years.]]
 83  }
 84}
 85
 86local LSR1826Orbit = {
 87  Identifier = "LSR1826Orbit",
 88  Renderable = {
 89    Type = "RenderableDUMeshes",
 90    Enabled = false,
 91    Opacity = 1.0,
 92    File = speck .. "starorbits-LSR1826+3014.speck",
 93    MeshColor = { { 0.0, 0.39, 0.0 } },
 94    Unit = "pc"
 95  },
 96  GUI = {
 97    Name = "LSR1826+3014 Orbit",
 98    Path = "/Milky Way/Stars/Stars Orbits",
 99    Description = [[Projected orbit of LSR1826+3014 around the Milky Way over the next 1
100      billion years.]]
101  }
102}
103
104local LSRJ0822Orbit = {
105  Identifier = "LSRJ0822Orbit",
106  Renderable = {
107    Type = "RenderableDUMeshes",
108    Enabled = false,
109    Opacity = 1.0,
110    File = speck .. "starorbits-LSRJ0822+1700.speck",
111    MeshColor = { { 0.5, 1.0, 0.0 } },
112    Unit = "pc"
113  },
114  GUI = {
115    Name = "LSRJ0822+1700 Orbit",
116    Path = "/Milky Way/Stars/Stars Orbits",
117    Description = [[Projected orbit of LSRJ0822+1700 around the Milky Way over the next 1
118      billion years.]]
119  }
120}
121
122local PM_J13420Orbit = {
123  Identifier = "PM_J13420Orbit",
124  Renderable = {
125    Type = "RenderableDUMeshes",
126    Enabled = false,
127    Opacity = 1.0,
128    File = speck .. "starorbits-PM_J13420-3415.speck",
129    MeshColor = { { 0.70, 0.13, 0.13 } },
130    Unit = "pc"
131  },
132  GUI = {
133    Name = "PM_J13420-3415 Orbit",
134    Path = "/Milky Way/Stars/Stars Orbits",
135    Description = [[Projected orbit of PM_J13420-3415 around the Milky Way over the next
136      1 billion years.]]
137  }
138}
139
140
141asset.onInitialize(function()
142  openspace.addSceneGraphNode(SunOrbit)
143  openspace.addSceneGraphNode(BarnardsOrbit)
144  openspace.addSceneGraphNode(KapteynsOrbit)
145  openspace.addSceneGraphNode(Lacaille9352Orbit)
146  openspace.addSceneGraphNode(LSR1826Orbit)
147  openspace.addSceneGraphNode(LSRJ0822Orbit)
148  openspace.addSceneGraphNode(PM_J13420Orbit)
149end)
150
151asset.onDeinitialize(function()
152  openspace.removeSceneGraphNode(PM_J13420Orbit)
153  openspace.removeSceneGraphNode(LSRJ0822Orbit)
154  openspace.removeSceneGraphNode(LSR1826Orbit)
155  openspace.removeSceneGraphNode(Lacaille9352Orbit)
156  openspace.removeSceneGraphNode(KapteynsOrbit)
157  openspace.removeSceneGraphNode(BarnardsOrbit)
158  openspace.removeSceneGraphNode(SunOrbit)
159end)
160
161asset.export(SunOrbit)
162asset.export(BarnardsOrbit)
163asset.export(KapteynsOrbit)
164asset.export(Lacaille9352Orbit)
165asset.export(LSR1826Orbit)
166asset.export(LSRJ0822Orbit)
167asset.export(PM_J13420Orbit)
168
169
170
171asset.meta = {
172  Name = "Star Orbits",
173  Description = [[Projected star orbits for selected stars over the next 1 billion years. Census: 7 star orbits.]],
174  Author = "Brian Abbott, Zack Reeves (AMNH)",
175  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
176  License = "AMNH Digital Universe"
177}