RenderableNodeLine
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The RGB color for the line. |
|
Value of type ‘Color3’ |
Yes |
|
The identifier of the node the line ends at. Defaults to ‘Root’ if not specified. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
Yes |
|
A distance to the end node at which the rendered line should end. By default it takes a value in meters, but if ‘UseRelativeOffsets’ is set to true it is read as a multiplier times the bounding sphere of the node. |
|
Value of type ‘Double’ |
Yes |
|
The width of the line. The larger number, the thicker the line. |
|
Value of type ‘Double’ |
Yes |
|
The identifier of the node the line starts from. Defaults to ‘Root’ if not specified. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
Yes |
|
A distance from the start node at which the rendered line should begin. By default it takes a value in meters, but if ‘UseRelativeOffsets’ is set to true it is read as a multiplier times the bounding sphere of the node. |
|
Value of type ‘Double’ |
Yes |
|
If true, the offset values are interpreted as relative values to be multiplied with the bounding sphere of the start/end node. If false, the value is interpreted as a distance in meters. |
|
Value of type ‘Boolean’ |
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 earth = asset.require("scene/solarsystem/planets/earth/earth")
2local mars = asset.require("scene/solarsystem/planets/mars/mars")
3
4
5
6local RenderableNodeLineExample = {
7 Identifier = "RenderableNodeLineExample",
8 Renderable = {
9 Type = "RenderableNodeLine",
10 StartNode = earth.Earth.Identifier,
11 EndNode = mars.Mars.Identifier,
12 Color = { 0.5, 0.5, 0.5 },
13 LineWidth = 2
14 },
15 GUI = {
16 Name = "RenderableNodeLine - Basic",
17 Path = "/Examples",
18 Description = "Draws a line between two nodes in the scene."
19 }
20}
21
22
23asset.onInitialize(function()
24 openspace.addSceneGraphNode(RenderableNodeLineExample)
25end)
26
27asset.onDeinitialize(function()
28 openspace.removeSceneGraphNode(RenderableNodeLineExample)
29end)
30
31asset.export(RenderableNodeLineExample)
32
33
34
35asset.meta = {
36 Name = "RenderableNodeLine Example asset",
37 Description = [[Example of a RenderableNodeLine, that can be used to draw an line
38 between two scene graph nodes.]],
39 Author = "OpenSpace Team",
40 URL = "http://openspaceproject.com",
41 License = "MIT license"
42}