RenderablePrism
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The number of segments the shape of the prism should have. |
|
Value of type ‘Integer’ |
No |
|
The radius of the base of the prism’s shape, in meters. By default it is given the same radius as the outer shape. |
|
Value of type ‘Double’ |
Yes |
|
The RGB color of the line. |
|
Value of type ‘Color3’ |
Yes |
|
The length of the prism in meters. |
|
Value of type ‘Double’ |
Yes |
|
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. |
|
Value of type ‘Integer’ |
Yes |
|
The width of the lines. The larger number, the thicker the lines. |
|
Value of type ‘Double’ |
Yes |
|
The radius of the prism’s shape in meters. |
|
Value of type ‘Double’ |
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, 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 |
|
The type of the renderable. |
|
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}