mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-06 04:18:36 -06:00
Add Phobos and Deimos
This commit is contained in:
@@ -5,6 +5,8 @@ local sceneHelper = asset.require('util/scene_helper')
|
||||
asset.require('spice/base')
|
||||
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
|
||||
asset.require('scene/solarsystem/planets')
|
||||
-- asset.require('scene/solarsystem/planets/mars/moons/phobos')
|
||||
-- asset.require('scene/solarsystem/planets/mars/moons/deimos')
|
||||
-- asset.require('scene/solarsystem/planets/jupiter/minor_moons')
|
||||
-- asset.require('scene/solarsystem/planets/saturn/minor_moons')
|
||||
-- asset.require('scene/solarsystem/planets/uranus/minor_moons')
|
||||
|
||||
8
data/assets/scene/solarsystem/planets/mars/mar097.asset
Normal file
8
data/assets/scene/solarsystem/planets/mars/mar097.asset
Normal file
@@ -0,0 +1,8 @@
|
||||
local Kernels = asset.syncedResource({
|
||||
Name = "Mars Spice Kernels",
|
||||
Type = "TorrentSynchronization",
|
||||
Identifier = "mat097",
|
||||
Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
})
|
||||
|
||||
asset.export("Kernels", Kernels .. '/mar097.bsp')
|
||||
@@ -0,0 +1,62 @@
|
||||
local transforms = asset.require('../transforms')
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local kernels = asset.require('../mar097').Kernels
|
||||
|
||||
|
||||
-- local textures = asset.syncedResource({
|
||||
-- Name = "Mars Textures",
|
||||
-- Type = "HttpSynchronization",
|
||||
-- Identifier = "mars_textures",
|
||||
-- Version = 1
|
||||
-- })
|
||||
|
||||
|
||||
local Deimos = {
|
||||
Name = "Deimos",
|
||||
Parent = transforms.MarsBarycenter.Name,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "IAU_DEIMOS",
|
||||
DestinationFrame = "GALACTIC",
|
||||
Kernels = kernels
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "DEIMOS",
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = kernels
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 15, 12.2, 11 },
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {
|
||||
}
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GuiPath = "/Solar System/Planets/Mars"
|
||||
}
|
||||
|
||||
local DeimosTrail = {
|
||||
Name = "DeimosTrail",
|
||||
Parent = transforms.MarsBarycenter.Name,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "DEIMOS",
|
||||
Observer = "MARS BARYCENTER"
|
||||
},
|
||||
Color = { 1.0, 0.605, 0.420 },
|
||||
Period = 1.263,
|
||||
Resolution = 1000
|
||||
},
|
||||
Tag = { "moonTrail_solarSystem", "moonTrail_terrestrial", "moonTrail_mars" },
|
||||
GuiPath = "/Solar System/Planets/Mars"
|
||||
}
|
||||
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Deimos, DeimosTrail })
|
||||
@@ -0,0 +1,62 @@
|
||||
local transforms = asset.require('../transforms')
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local kernels = asset.require('../mar097').Kernels
|
||||
|
||||
|
||||
-- local textures = asset.syncedResource({
|
||||
-- Name = "Mars Textures",
|
||||
-- Type = "HttpSynchronization",
|
||||
-- Identifier = "mars_textures",
|
||||
-- Version = 1
|
||||
-- })
|
||||
|
||||
|
||||
local Phobos = {
|
||||
Name = "Phobos",
|
||||
Parent = transforms.MarsBarycenter.Name,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "IAU_PHOBOS",
|
||||
DestinationFrame = "GALACTIC",
|
||||
Kernels = kernels
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "PHOBOS",
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = kernels
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 27, 22, 18 },
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {
|
||||
}
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GuiPath = "/Solar System/Planets/Mars"
|
||||
}
|
||||
|
||||
local PhobosTrail = {
|
||||
Name = "PhobosTrail",
|
||||
Parent = transforms.MarsBarycenter.Name,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "PHOBOS",
|
||||
Observer = "MARS BARYCENTER"
|
||||
},
|
||||
Color = { 1.0, 0.605, 0.420 },
|
||||
Period = 0.31891023,
|
||||
Resolution = 1000
|
||||
},
|
||||
Tag = { "moonTrail_solarSystem", "moonTrail_terrestrial", "moonTrail_mars" },
|
||||
GuiPath = "/Solar System/Planets/Mars"
|
||||
}
|
||||
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Phobos, PhobosTrail })
|
||||
Reference in New Issue
Block a user