Add habitable zone asset for our solar system

This commit is contained in:
Emma Broman
2021-01-15 11:02:04 +01:00
parent fd835688b5
commit c956795ac6
2 changed files with 36 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ asset.require('./base_blank')
-- Specifying which other assets should be loaded in this scene
asset.require('scene/solarsystem/sun/sun')
asset.require('scene/solarsystem/sun/glare')
asset.require('scene/solarsystem/sun/habitablezone')
asset.require('scene/solarsystem/sun/default_layers')
asset.require('scene/solarsystem/planets/planets')
asset.require('scene/solarsystem/planets/default_layers')
@@ -0,0 +1,35 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("./transforms")
local color = {0, 1, 0.81};
local texture = openspace.absPath(openspace.createPixelImage('sun_habitable_zone', color));
local HabitableZone = {
Identifier = "SunHabitableZone",
Parent = transforms.SunECLIPJ2000.Identifier,
Renderable = {
Type = "RenderableHabitableZone",
Enabled = false,
Texture = texture,
EffectiveTemperature = 5780, -- Kelvin
Luminosity = 1, -- solar
Opacity = 0.06
},
GUI = {
Name = "Sun Habitable Zone",
Path = "/Solar System/Sun",
Description = "Habitable zone for the sun in our solar system."
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { HabitableZone })
asset.meta = {
Name = "Sun Habitable Zone",
Version = "1.0",
Description = [[ The habitable zone around our sun]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"SunHabitableZone"}
}