RenderablePrism

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Segments

The number of segments the shape of the prism should have.

Integer

Value of type ‘Integer’

No

BaseRadius

The radius of the base of the prism’s shape, in meters. By default it is given the same radius as the outer shape.

Double

Value of type ‘Double’

Yes

Color

The RGB color of the line.

Color3

Value of type ‘Color3’

Yes

Length

The length of the prism in meters.

Double

Value of type ‘Double’

Yes

Lines

The number of lines connecting the two shapes of the prism. They will be evenly distributed around the bounding circle that makes up the shape of the prism.

Integer

Value of type ‘Integer’

Yes

LineWidth

The width of the lines. The larger number, the thicker the lines.

Double

Value of type ‘Double’

Yes

Radius

The radius of the prism’s shape in meters.

Double

Value of type ‘Double’

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

Asset Examples

 1local transforms = asset.require("./transforms")
 2local model = asset.require("./model")
 3
 4
 5
 6local JWSTFov = {
 7  Identifier = "JWSTFov",
 8  Parent = model.JWSTModel.Identifier,
 9  TimeFrame = {
10    Type = "TimeFrameInterval",
11    Start = transforms.LaunchTime
12  },
13  Renderable = {
14    Type = "RenderablePrism",
15    Enabled = asset.enabled,
16    Segments = 6,
17    Lines = 3,
18    Radius = 3.25,
19    LineWidth = 1.0,
20    Color = { 1.0, 1.0, 1.0 },
21    Length = 9.2E15
22  },
23  Transform = {
24    Rotation = {
25      Type = "StaticRotation",
26      Rotation = { 0, 0, math.rad(30) }
27    }
28  },
29  Tag = { "mission_jwst_fov" },
30  GUI = {
31    Name = "JWST Field of View",
32    Path = "/Solar System/Telescopes/JWST",
33    Description = [[
34      The field of view for the James Webb Space Telescope at its current position.
35    ]]
36  }
37}
38
39
40asset.onInitialize(function()
41  openspace.addSceneGraphNode(JWSTFov)
42end)
43
44asset.onDeinitialize(function()
45  openspace.removeSceneGraphNode(JWSTFov)
46end)
47
48asset.export(JWSTFov)
49
50
51
52asset.meta = {
53  Name = "JWST Field of View",
54  Description = [[
55    The field of view for the James Webb Space Telescope at its current position.
56  ]],
57  Author = "OpenSpace Team",
58  URL = "http://openspaceproject.com",
59  License = "MIT license"
60}