RenderableLabel
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
This determines the blending mode that is applied to the renderable |
|
In list { Normal, Additive } |
Yes |
|
The label text color |
|
Value of type ‘Color3’ |
Yes |
|
Enable/Disable the Fade-in effect |
|
Value of type ‘Boolean’ |
Yes |
|
The distance range in which the labels should be fully opaque, specified in the chosen unit. The distance from the position of the label to the camera |
|
Value of type ‘Vector2 |
Yes |
|
Distance unit for fade-in/-out distance calculations. Defaults to “au” |
|
In list { m, Km, Mm, Gm, Tm, Pm, au, pc, Kpc, Mpc, Gpc, Gly } |
Yes |
|
The distances over which the fading takes place, given in the specified unit. The first value is the distance before the closest distance and the second the one after the furthest distance. For example, with the unit Parsec (pc), a value of {1, 2} will make the label being fully faded out 1 Parsec before the closest distance and 2 Parsec away from the furthest distance |
|
Value of type ‘Vector2 |
Yes |
|
The font size (in points) for the label |
|
Value of type ‘Double’ |
Yes |
|
The minimum and maximum size (in pixels) of the label |
|
Value of type ‘Vector2 |
Yes |
|
Label orientation rendering mode |
|
In list { Camera View Direction, Camera Position Normal } |
Yes |
|
This value affects the size scale of the label |
|
Value of type ‘Double’ |
Yes |
|
The text that will be displayed on screen |
|
Value of type ‘String’ |
Yes |
|
Transformation matrix to be applied to the label |
|
Value of type ‘Matrix4x4 |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere |
|
Value of type ‘Boolean’ |
Yes |
|
This setting 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 |
|
This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay 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 |
|
This tells the type of the renderable |
|
Value of type ‘String’ |
Yes |
Asset Examples
1local transforms = asset.require("./transforms")
2
3
4
5local Label = {
6 Identifier = "ErisLabel",
7 Parent = transforms.Position.Identifier,
8 Renderable = {
9 Type = "RenderableLabel",
10 Enabled = asset.enabled,
11 Text = "Eris",
12 FontSize = 70.0,
13 Size = 9.10,
14 MinMaxSize = { 1, 100 },
15 BlendMode = "Additive",
16 OrientationOption = "Camera View Direction",
17 EnableFading = true,
18 FadeUnit = "au",
19 FadeDistances = { 2.0, 120.0 },
20 FadeWidths = { 1.0, 150.0 }
21 },
22 Tag = { "solarsystem_labels" },
23 GUI = {
24 Name = "Eris Label",
25 Path = "/Solar System/Dwarf Planets/Eris",
26 Description = "Label for Eris, visible at the solarsystem overview zoom level"
27 }
28}
29
30
31asset.onInitialize(function()
32 openspace.addSceneGraphNode(Label)
33end)
34
35asset.onDeinitialize(function()
36 openspace.removeSceneGraphNode(Label)
37end)
38
39asset.export("Label", Label)
40
41
42
43asset.meta = {
44 Name = "Eris Label",
45 Version = "1.0",
46 Description = [[Label of Eris]],
47 Author = "OpenSpace Team",
48 URL = "https://www.openspaceproject.com",
49 License = "MIT"
50}