RenderableTimeVaryingSphere
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
A directory containing images that are loaded from disk and used for texturing the sphere. The images are expected to be equirectangular projections. |
|
Value of type ‘Directory’ |
No |
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 propertyHelper = asset.require("util/property_helper")
2local transforms = asset.require("./transforms")
3
4
5
6local textureSourcePath = asset.resource({
7 Type = "HttpSynchronization",
8 Name = "euv_textures_bastille_event",
9 Identifier = "euv_textures_bastille_event",
10 Version = 1
11})
12
13
14local EUVLayer = {
15 Identifier = "EUV-Layer-bastille-day-2000",
16 Parent = transforms.SunIAU.Identifier,
17 -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
18 -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
19 InteractionSphere = 696000000,
20 Renderable = {
21 Type = "RenderableTimeVaryingSphere",
22 Size = 6.96E8, -- Slightly bigger than the sun renderable,
23 Enabled = true,
24 TextureSource = textureSourcePath,
25 Opacity = 1,
26 Segments = 132
27 },
28 GUI = {
29 Name = "EUV Layer",
30 Path = "/Solar System/Sun",
31 Description = [[Texture sequence of an extreme ultra violet (EUV) simulation, during
32 the CME. This asset contains data from 2000-07-14 08:38 to 2000-07-14 19:48]]
33 }
34}
35
36local ToggleEuv = {
37 Identifier = "os.solarsystem.ToggleEuv",
38 Name = "Toggle EUV layer",
39 Command = [[
40 if openspace.propertyValue("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled") then
41 openspace.setPropertyValueSingle(
42 "Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
43 0.0,
44 openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
45 "Linear",
46 'openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", false)'
47 )
48 else
49 openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", true)
50 openspace.setPropertyValueSingle(
51 "Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
52 1.0,
53 openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
54 "Linear"
55 )
56 end
57 ]],
58 Documentation = "Toggle EUV layer of sun",
59 GuiPath = "/Bastille-Day 2000",
60 IsLocal = false
61}
62
63
64asset.onInitialize(function()
65 openspace.action.registerAction(ToggleEuv)
66 openspace.addSceneGraphNode(EUVLayer)
67end)
68
69asset.onDeinitialize(function()
70 openspace.removeSceneGraphNode(EUVLayer)
71 openspace.action.removeAction(ToggleEuv)
72end)
73
74asset.export("ToggleEuv", ToggleEuv.Identifier)
75asset.export(EUVLayer)
76
77
78
79asset.meta = {
80 Name = "Predictive Science Inc. EUV texture sequence Bastille Days",
81 Description = [[Texture sequence of an extreme ultraviolet (EUV) simulation during the CME]],
82 Author = "CCMC, OpenSpace team",
83 URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
84 License = "CC-BY"
85}