RenderablePlaneImageLocal
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
This value specifies the size of the plane in meters |
|
Value of type ‘Double’, or Value of type ‘Vector2 |
No |
|
This value specifies an image that is loaded from disk and is used as a texture that is applied to this plane. This image has to be square |
|
Value of type ‘String’ |
No |
|
This value specifies whether the plane is a billboard, which means that it is always facing the camera. If this is false, it can be oriented using other transformations |
|
Value of type ‘Boolean’ |
Yes |
|
This determines the blending mode that is applied to this plane |
|
In list { Normal, Additive } |
Yes |
|
If this value is set to ‘true’, the image for this plane will not be loaded at startup but rather when image is shown for the first time. Additionally, if the plane is hidden, the image will automatically be unloaded |
|
Value of type ‘Boolean’ |
Yes |
|
If this value is set to false, the image plane will not be mirrored when looking from the backside. This is usually desirable when the image shows data at a specific location, but not if it is displaying text for example |
|
Value of type ‘Boolean’ |
Yes |
|
If set, the plane’s texture is multiplied with this color. Useful for applying a color grayscale images |
|
Value of type ‘Color3’ |
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("./moon")
2
3
4
5local texturesPath = asset.resource({
6 Name = "Moon Textures",
7 Type = "HttpSynchronization",
8 Identifier = "moon_textures",
9 Version = 3
10})
11
12
13local MoonMarker = {
14 Identifier = "MoonMarker",
15 Parent = transforms.Moon.Identifier,
16 Renderable = {
17 Type = "RenderablePlaneImageLocal",
18 Enabled = false,
19 Size = 3.0E7,
20 Origin = "Center",
21 Billboard = true,
22 Texture = texturesPath .. "marker.png",
23 BlendMode = "Additive"
24 },
25 GUI = {
26 Name = "Moon Marker",
27 Path = "/Solar System/Planets/Earth/Moon"
28 }
29}
30
31
32asset.onInitialize(function()
33 openspace.addSceneGraphNode(MoonMarker)
34end)
35
36asset.onDeinitialize(function()
37 openspace.removeSceneGraphNode(MoonMarker)
38end)
39
40asset.export(MoonMarker)
41
42
43
44asset.meta = {
45 Name = "Moon marker",
46 Version = "1.0",
47 Description = "Moon marker with name, sized for Earth view",
48 Author = "OpenSpace Team",
49 URL = "http://openspaceproject.com",
50 License = "MIT license"
51}