RenderableRadialGrid
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The number of segments that is used to render each circle in the grid. |
|
Value of type ‘Integer’ |
Yes |
|
The color used for the grid lines. |
|
Value of type ‘Color3’ |
Yes |
|
Specifies the number of segments for the grid, in the radial and angular direction respectively. |
|
Value of type ‘Vector2 |
Yes |
|
The labels for the grid. |
|
Yes |
|
|
The width of the grid lines. The larger number, the thicker the lines. |
|
Value of type ‘Double’ |
Yes |
|
The radii values that determine the size of the circular grid. The first value is the radius of the inmost ring and the second is the radius of the outmost ring. |
|
Value of type ‘Vector2 |
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 AU = 149597870700 -- 1 AU
2
3local Circle = {
4 Identifier = "ExampleCircle",
5 Transform = {
6 Scale = {
7 Type = "StaticScale",
8 Scale = AU
9 }
10 },
11 Renderable = {
12 Type = "RenderableRadialGrid",
13 Color = { 0.6, 0.6, 0.8 },
14 LineWidth = 3.0,
15 GridSegments = { 1, 1 },
16 CircleSegments = 64,
17 Radii = { 0.0, 1.0 }
18 },
19 GUI = {
20 Name = "Example Circle",
21 Path = "/Examples/Primitives"
22 }
23}
24
25local Ellipse = {
26 Identifier = "ExampleEllipse",
27 Transform = {
28 Scale = {
29 Type = "NonUniformStaticScale",
30 Scale = { 1.5, 1.0, 1.0 }
31 }
32 },
33 Renderable = {
34 Type = "RenderableRadialGrid",
35 Color = { 0.6, 0.8, 0.6 },
36 LineWidth = 3.0,
37 GridSegments = { 1, 1 },
38 CircleSegments = 64,
39 Radii = { 0.0, AU }
40 },
41 GUI = {
42 Name = "Example Ellipse",
43 Path = "/Examples/Primitives"
44 }
45}
46
47
48asset.onInitialize(function()
49 openspace.addSceneGraphNode(Circle)
50 openspace.addSceneGraphNode(Ellipse)
51end)
52
53asset.onDeinitialize(function()
54 openspace.removeSceneGraphNode(Ellipse)
55 openspace.removeSceneGraphNode(Circle)
56end)
57
58asset.export(Circle)
59asset.export(Ellipse)
60
61
62
63asset.meta = {
64 Name = "Primitives Example",
65 Description = [[Examples of different simple rendered primitives, such as circles
66 and ellipses.]],
67 Author = "OpenSpace Team",
68 URL = "http://openspaceproject.com",
69 License = "MIT license"
70}