mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-30 07:49:31 -05:00
Pull merge before committing nullptr access guard in globebrowsing
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
--apollo.scene
|
||||
asset.require('./base')
|
||||
local propertyHelper = asset.require('util/property_helper')
|
||||
local sceneHelper = asset.require('util/scene_helper')
|
||||
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
local a8Asset = asset.require('scene/solarsystem/missions/apollo/apollo8.asset')
|
||||
|
||||
-- Custom Keybindings
|
||||
local Keybindings = {
|
||||
-- {
|
||||
-- Key = "SHIFT+E",
|
||||
-- Command = "openspace.time.setPause(true);" ..
|
||||
-- "openspace.time.setTime('1968 DEC 24 16:37:19');",
|
||||
-- Documentation = "Jump to time pre earthrise",
|
||||
-- Local = false
|
||||
-- },
|
||||
|
||||
{
|
||||
Key = "E",
|
||||
Command = "openspace.time.setPause(true);" ..
|
||||
"openspace.setPropertyValue('*Trail.Renderable.Enabled', false)"..
|
||||
"openspace.setPropertyValue('Scene.Apollo8LaunchTrail.Renderable.Enabled', false)"..
|
||||
'openspace.sessionRecording.startPlayback("apollo8")',
|
||||
Documentation = "Jump to right before the earthrise photo",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "U",
|
||||
Command = "openspace.time.setTime('1968-12-21T12:51:37.00')" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Apollo8LaunchTrail.Renderable.Enabled', true);",
|
||||
Documentation = "Jump to time right before A8 liftoff",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "K",
|
||||
Command = propertyHelper.invert('Scene.Moon.Renderable.Layers.ColorLayers.Kaguya_Utah.Enabled'),
|
||||
Documentation = "Toggles Moon Kaguya color layer",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "T",
|
||||
Command = propertyHelper.invert('Scene.Apollo8MoonTrail.Renderable.Enabled'),
|
||||
Documentation = "Toggles the trails of the Apollo8 orbits",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "SHIFT+T",
|
||||
Command = propertyHelper.invert('Scene.Apollo8LaunchTrail.Renderable.Enabled'),
|
||||
Documentation = "Toggles the trails of the Apollo8 Launch",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "CTRL+T",
|
||||
Command = propertyHelper.invert('Scene.Apollo8EarthBarycenterTrail.Renderable.Enabled'),
|
||||
Documentation = "Toggles the trails of the full Apollo8",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "S",
|
||||
Command = propertyHelper.invert('Scene.Moon.RenderableGlobe.PerformShading'),
|
||||
Documentation = "Toggles shading for the moon",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "PAGE_UP",
|
||||
Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo8');",
|
||||
Documentation = "Focus on apollo 8",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "PAGE_DOWN",
|
||||
Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Moon');",
|
||||
Documentation = "Focus on moon",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "HOME",
|
||||
Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');",
|
||||
Documentation = "Focus on earth",
|
||||
Local = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.time.setTime("1968-12-21T12:51:51.0")
|
||||
-- Earthrise:
|
||||
-- openspace.time.setTime("1968-12-24T16:37:19.0")
|
||||
|
||||
openspace.markInterestingNodes({
|
||||
"Earth", "Moon", "Apollo8", "Apollo8Launch"
|
||||
})
|
||||
|
||||
openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.MinimumAllowedDistance', 0.000000);
|
||||
openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 24.0);
|
||||
|
||||
openspace.navigation.setCameraState({
|
||||
Anchor = earthAsset.Earth.Identifier,
|
||||
Position = { 0, 0, 0 },
|
||||
Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 },
|
||||
})
|
||||
|
||||
openspace.globebrowsing.goToGeo(20, -60, 15000000)
|
||||
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
openspace.removeInterestingNodes({
|
||||
"Earth", "Moon", "Apollo8",
|
||||
})
|
||||
end)
|
||||
@@ -0,0 +1,149 @@
|
||||
--moonrocks.scene
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sceneHelper = asset.require('util/scene_helper')
|
||||
local propertyHelper = asset.require('util/property_helper')
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
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/dwarf_planets/pluto/system')
|
||||
assetHelper.requestAll(asset, 'scene/digitaluniverse')
|
||||
|
||||
-- Load default key bindings applicable to most scenes
|
||||
asset.require('util/default_keybindings')
|
||||
asset.require('util/default_dashboard')
|
||||
asset.require('util/default_joystick')
|
||||
|
||||
asset.request('customization/globebrowsing')
|
||||
asset.require('util/webgui')
|
||||
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
-- local station2 = asset.require('scene/solarsystem/missions/apollo/bouldersstation2')
|
||||
-- local station6 = asset.require('scene/solarsystem/missions/apollo/bouldersstation6')
|
||||
-- local station7 = asset.require('scene/solarsystem/missions/apollo/bouldersstation7')
|
||||
local a11lem = asset.require('scene/solarsystem/missions/apollo/a11_lem')
|
||||
local a17lem = asset.require('scene/solarsystem/missions/apollo/a17_lem')
|
||||
local layers = asset.require('scene/solarsystem/missions/apollo/apollo_globebrowsing')
|
||||
local flipbook = asset.require('scene/solarsystem/missions/apollo/apollo_11_lem_flipbook')
|
||||
|
||||
local Keybindings = {
|
||||
{
|
||||
Key = "m",
|
||||
Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Moon'); " ..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
|
||||
Documentation = "Focus on Moon",
|
||||
Name = "Focus on Moon",
|
||||
GuiPath = "/Missions/Apollo",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F9",
|
||||
Command = "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', false);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', false)",
|
||||
Documentation = "Disable site when switching",
|
||||
Name = "Disable apollo site",
|
||||
GuiPath = "/Missions/Apollo/11",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F11",
|
||||
Command = "openspace.time.setTime('1969 JUL 20 20:17:40');" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.11);" ..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo11Lem');"..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
|
||||
Documentation = "Setup for A11 site",
|
||||
Name = "Setup A11 site",
|
||||
GuiPath = "/Missions/Apollo/11",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F7",
|
||||
Command = "openspace.time.setTime('1972 DEC 12 19:47:11');" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0.000000);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', true);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', true);"..
|
||||
-- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station6a.Enabled', true);"..
|
||||
-- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station6a.BlendMode', 0.000000);"..
|
||||
-- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station2.Enabled', true);"..
|
||||
-- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station2.BlendMode', 0.000000);"..
|
||||
-- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.Enabled', true);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', true);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.BlendMode', 0.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', true);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.BlendMode', 0.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.17);" ..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo17Lem'); "..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.BlendMode', 0.000000);",
|
||||
Documentation = "Setup for A17 site",
|
||||
Name = "Setup A17 site",
|
||||
GuiPath = "/Missions/Apollo/17",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "SHIFT+F7",
|
||||
Command = "openspace.setPropertyValue('Scene.Moon.Renderable.Layers.ColorLayers.A17_*.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.117);",
|
||||
Documentation = "Setup for A17 site",
|
||||
Name = "Setup A17 layers",
|
||||
GuiPath = "/Missions/Apollo/17",
|
||||
Local = false
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
local now = openspace.time.currentWallTime()
|
||||
-- Jump back one day to show a complete planet
|
||||
openspace.time.setTime("1972 DEC 12 19:47:11")
|
||||
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.markInterestingNodes({
|
||||
"Apollo11Lem", "Apollo17Lem"
|
||||
})
|
||||
|
||||
-- To enable both sites by default, uncomment these lines
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0.000000);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', true);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', true);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', true);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.BlendMode', 0.000000);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', true);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.BlendMode', 0.000000);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.BlendMode', 0.000000);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true);
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true);
|
||||
|
||||
openspace.navigation.setCameraState({
|
||||
Anchor = moonAsset.Moon.Identifier,
|
||||
Position = { 0, 0, 0 },
|
||||
Rotation = { 0, 0, 0, 0 },
|
||||
})
|
||||
openspace.globebrowsing.goToGeo(20, -60, 15000000)
|
||||
|
||||
openspace.setPropertyValueSingle("Scene.Moon.Renderable.PerformShading", false)
|
||||
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
|
||||
openspace.removeInterestingNodes({
|
||||
"Apollo11Lem", "Apollo17Lem"
|
||||
})
|
||||
end)
|
||||
@@ -0,0 +1,116 @@
|
||||
--a11_lem.asset
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
local lem = asset.require('./apollo_lem')
|
||||
|
||||
local Apollo11Lem = {
|
||||
Identifier = "Apollo11Lem",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+23.47306,
|
||||
Latitude = 0.67402,
|
||||
FixedAltitude = -1927.65,
|
||||
UseFixedAltitude = true
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1.0
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 11 Lem",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local Apollo11LemModel = {
|
||||
Identifier = "Apollo11LemModel",
|
||||
Parent = Apollo11Lem.Identifier,
|
||||
GUI = {
|
||||
Hidden = true,
|
||||
Name = "Apollo 11 Lem Model",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- local Apollo17LemPosition = {
|
||||
-- Identifier = "Apollo17LemPosition",
|
||||
-- Parent = moonAsset.Moon.Identifier,
|
||||
-- Transform = {
|
||||
-- Translation = {
|
||||
-- Type = "GlobeTranslation",
|
||||
-- Globe = moonAsset.Moon.Identifier,
|
||||
-- Longitude = -360+30.77170,
|
||||
-- Latitude = 20.19092,
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
-- local Apollo17Lem = {
|
||||
-- Identifier = "Apollo17Lem",
|
||||
-- Parent = Apollo17LemPosition.Identifier,
|
||||
-- Transform = {
|
||||
-- Scale = {
|
||||
-- Type = "StaticScale",
|
||||
-- Scale = 1.0
|
||||
-- },
|
||||
-- },
|
||||
-- GUI = {
|
||||
-- Name = "Apollo 17 Lem",
|
||||
-- Path = "/Solar System/Missions/Apollo/17/Lem"
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Apollo11Lem,
|
||||
Apollo11LemModel,
|
||||
})
|
||||
|
||||
lem.registerLem(asset, Apollo11LemModel.Identifier)
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
-- openspace.setPropertyValueSingle('Scene.Apollo17Lem.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
|
||||
-- openspace.setPropertyValueSingle('Scene.Apollo11LemModel.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-texture_lem_flag.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-texture_lem_unitedstates.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-booster.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-bright_white.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-black.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-blue_glass.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-dark_grey_dish.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-dull_white.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-gold.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-light_grey.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-mid_grey.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-orange.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo11LemModel-yellow_buttons.Renderable.RotationVector', {73.074631,89.194031,8.545990});
|
||||
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_texture_lem_flag7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_texture_lem_unitedstates7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_booster7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_bright_white7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_Black7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_blue_glass7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_dark_grey_dish7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_dull_white7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_gold7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_light_grey7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_mid_grey7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_orange7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
-- openspace.setPropertyValueSingle('Scene.Lem_Part_yellow_buttons7.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,203 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
asset.require('spice/base')
|
||||
|
||||
--asset.require('scene/solarsystem/missions/apollo/a15kernels')
|
||||
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo 15 Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_models",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_spice",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Kernels = {
|
||||
kernels .. "/apollo15.0001.tsc",
|
||||
|
||||
-- kernels .. '/AS15-P_v01.bc',
|
||||
kernels .. '/apollo15.0001.tf',
|
||||
kernels .. '/apollo15MetricAddendum002.ti',
|
||||
-- kernels .. '/apollo15PanoramicAddendum001.ti',
|
||||
kernels .. '/apollo15_metric.0002.ti',
|
||||
-- kernels .. '/apollo15_panoramic.0001.ti',
|
||||
kernels .. '/apollo15-1.bsp',
|
||||
kernels .. '/AS15-M_v01.bc',
|
||||
-- kernels .. '/AS15-M_v01.bsp',
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- local Apollo15Kernels = {
|
||||
-- --sclk
|
||||
-- ApolloKernels .. "/apollo15.0001.tsc",
|
||||
|
||||
-- --pck
|
||||
-- ApolloKernels .. "/moon_080317.tf",
|
||||
-- ApolloKernels .. "/moon_assoc_me.tf",
|
||||
|
||||
-- --ik
|
||||
-- ApolloKernels .. "/apollo15_metric_v2.0001.ti",
|
||||
-- ApolloKernels .. "/apollo15_panoramic.0001.ti",
|
||||
|
||||
-- --tspk
|
||||
-- ApolloKernels .. "/de421.bsp",
|
||||
-- ApolloKernels .. "/moon_pa_de421_1900-2050.bpc",
|
||||
|
||||
-- --iak
|
||||
-- ApolloKernels .. "/apollo15MetricAddendum002.ti",
|
||||
-- ApolloKernels .. "/apolloPanAddendum001.ti",
|
||||
|
||||
-- --fk
|
||||
-- ApolloKernels .. "/apollo15_v2.0001.tf",
|
||||
-- ApolloKernels .. "/apollo15_v2.0002.tf",
|
||||
|
||||
-- --spk
|
||||
-- ApolloKernels .. "/AS15_M_REV23_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV4.bsp ",
|
||||
-- ApolloKernels .. "/AS15_M_REV70_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV04_v2.bsp ",
|
||||
-- ApolloKernels .. "/AS15_M_REV27_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV44_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV15_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV33_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV50_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V02.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV15_v2.bsp ",
|
||||
-- ApolloKernels .. "/AS15_M_REV34_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV60_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV72_v2.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV16_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V02.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV62_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV22_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV38_SMITHED_V01.bsp",
|
||||
-- ApolloKernels .. "/AS15_M_REV63_SMITHED_V01.bsp",
|
||||
|
||||
-- --ck
|
||||
-- ApolloKernels .. "/AS15_M_REV04_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV15_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV16_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV22_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV23_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV27_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV33_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV34_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV35_SMITHED_V02.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV38_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV44_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV50_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV60_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV62_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV63_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV70_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V01.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV71_SMITHED_V02.bc",
|
||||
-- ApolloKernels .. "/AS15_M_REV72_v2.bc",
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
|
||||
local LightSources = {
|
||||
{
|
||||
Type = "SceneGraphLightSource",
|
||||
Identifier = "Sun",
|
||||
Node = sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
Intensity = 1.0
|
||||
},
|
||||
-- {
|
||||
-- Identifier = "Camera",
|
||||
-- Type = "CameraLightSource",
|
||||
-- Intensity = 0.5,
|
||||
-- Enabled = false
|
||||
-- }
|
||||
}
|
||||
|
||||
|
||||
local Apollo15 = {
|
||||
Identifier = "Apollo15",
|
||||
Parent = "Moon",
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "APOLLO 15",
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = Kernels
|
||||
},
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "A15_METRIC",
|
||||
DestinationFrame = "GALACTIC"
|
||||
}
|
||||
},
|
||||
TimeFrame = { -- Using Spice kernels for 1850-2150
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1971-07-30T02:22:00.00",
|
||||
End = "1971-08-01T18:05:00.00"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 15",
|
||||
Path = "/Solar System/Missions/Apollo 15"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo15Main = {
|
||||
Identifier = "Apollo15Main",
|
||||
Parent = Apollo15.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
-- GeometryFile = models .. "/Apollo_Spacecraft.obj"
|
||||
GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_doubble_size.obj"
|
||||
},
|
||||
ColorTexture = models .. "/gray.png",
|
||||
LightSources = LightSources,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 15 Main",
|
||||
Path = "/Solar System/Missions/Apollo 15"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo15Trail = {
|
||||
Identifier = "Apollo15Trail",
|
||||
Parent = "Moon",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "APOLLO 15",
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = Kernels
|
||||
},
|
||||
Color = { 0.70, 0.50, 0.20 },
|
||||
StartTime = "1971 JUL 26",
|
||||
EndTime = "1971 AUG 01 14:30:41.680",
|
||||
SampleInterval = 2
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 15 Trail",
|
||||
Path = "/Solar System/Missions/Apollo 15"
|
||||
}
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Apollo15,
|
||||
Apollo15Main,
|
||||
Apollo15Trail
|
||||
})
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
local ApolloKernels = asset.syncedResource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_spice",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Apollo15Kernels = {
|
||||
|
||||
|
||||
|
||||
--sclk
|
||||
ApolloKernels .. "apollo15.0001.tsc",
|
||||
|
||||
--pck
|
||||
ApolloKernels .. "moon_080317.tf",
|
||||
ApolloKernels .. "moon_assoc_me.tf",
|
||||
|
||||
--ik
|
||||
ApolloKernels .. "apollo15_metric_v2.0001.ti",
|
||||
ApolloKernels .. "apollo15_panoramic.0001.ti",
|
||||
|
||||
--tspk
|
||||
ApolloKernels .. "de421.bsp",
|
||||
ApolloKernels .. "moon_pa_de421_1900-2050.bpc",
|
||||
|
||||
--iak
|
||||
ApolloKernels .. "apollo15MetricAddendum002.ti",
|
||||
ApolloKernels .. "apolloPanAddendum001.ti",
|
||||
|
||||
--fk
|
||||
ApolloKernels .. "apollo15_v2.0001.tf",
|
||||
ApolloKernels .. "apollo15_v2.0002.tf",
|
||||
|
||||
--spk
|
||||
ApolloKernels .. "AS15_M_REV23_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV4.bsp ",
|
||||
ApolloKernels .. "AS15_M_REV70_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV04_v2.bsp ",
|
||||
ApolloKernels .. "AS15_M_REV27_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV44_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV71_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV15_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV33_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV50_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV71_SMITHED_V02.bsp",
|
||||
ApolloKernels .. "AS15_M_REV15_v2.bsp ",
|
||||
ApolloKernels .. "AS15_M_REV34_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV60_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV72_v2.bsp",
|
||||
ApolloKernels .. "AS15_M_REV16_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV35_SMITHED_V02.bsp",
|
||||
ApolloKernels .. "AS15_M_REV62_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV22_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV38_SMITHED_V01.bsp",
|
||||
ApolloKernels .. "AS15_M_REV63_SMITHED_V01.bsp",
|
||||
|
||||
--ck
|
||||
ApolloKernels .. "AS15_M_REV04_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV15_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV16_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV22_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV23_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV27_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV33_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV34_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV35_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV35_SMITHED_V02.bc",
|
||||
ApolloKernels .. "AS15_M_REV38_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV44_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV50_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV60_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV62_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV63_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV70_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV71_SMITHED_V01.bc",
|
||||
ApolloKernels .. "AS15_M_REV71_SMITHED_V02.bc",
|
||||
ApolloKernels .. "AS15_M_REV72_v2.bc",
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
--asset.export("ApolloKernels", Kernels)
|
||||
asset.export("Apollo15Kernels", Apollo15Kernels)
|
||||
@@ -0,0 +1,66 @@
|
||||
--a11_lem.asset
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
local lem = asset.require('./apollo_lem')
|
||||
|
||||
local Apollo17Lem = {
|
||||
Identifier = "Apollo17Lem",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.77170,
|
||||
Latitude = 20.19092,
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1.0
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 17 Lem",
|
||||
Path = "/Solar System/Missions/Apollo/17"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local Apollo17LemModel = {
|
||||
Identifier = "Apollo17LemModel",
|
||||
Parent = Apollo17Lem.Identifier,
|
||||
GUI = {
|
||||
Hidden = true,
|
||||
Name = "Apollo 17 Lem Model",
|
||||
Path = "/Solar System/Missions/Apollo/17"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Apollo17Lem,
|
||||
Apollo17LemModel,
|
||||
})
|
||||
|
||||
lem.registerLem(asset, Apollo17LemModel.Identifier)
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
-- openspace.setPropertyValueSingle('Scene.Apollo17LemModel.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-texture_lem_flag.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-texture_lem_unitedstates.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-booster.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-bright_white.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-black.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-blue_glass.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-dark_grey_dish.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-dull_white.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-gold.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-light_grey.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-mid_grey.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-orange.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
openspace.setPropertyValueSingle('Scene.Apollo17LemModel-yellow_buttons.Renderable.RotationVector', {68.031502,68.031502,8.545990});
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,234 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local csm = asset.require('./apollo_csm')
|
||||
|
||||
asset.require('spice/base')
|
||||
|
||||
local kernelsFolder = asset.syncedResource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_spice",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local kernels = {
|
||||
kernelsFolder .. "/moon_080317.tf",
|
||||
kernelsFolder .. "/apollo8.tf",
|
||||
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
|
||||
kernelsFolder .. '/apollo8.tsc',
|
||||
kernelsFolder .. '/apollo8.bsp',
|
||||
kernelsFolder .. '/apollo8_earthrise.bc',
|
||||
}
|
||||
|
||||
local apolloSpiceId = "-908"
|
||||
|
||||
local Apollo8Launch = {
|
||||
Identifier = "Apollo8Launch",
|
||||
Parent = "Earth",
|
||||
TimeFrame = { -- Using Spice kernels for 1850-2150
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1968 DEC 21",
|
||||
End = "1968 DEC 28"
|
||||
},
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "EARTH",
|
||||
Frame = "IAU_EARTH",
|
||||
Kernels = kernels
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8 Launch Capsule",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local Apollo8 = {
|
||||
Identifier = "Apollo8",
|
||||
Parent = "EarthBarycenter",
|
||||
TimeFrame = { -- Using Spice kernels for 1850-2150
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1968 DEC 21",
|
||||
End = "1968 DEC 28"
|
||||
},
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "EARTH BARYCENTER",
|
||||
Frame = "GALACTIC",
|
||||
Kernels = kernels
|
||||
},
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "A8_EARTHRISE",
|
||||
DestinationFrame = "GALACTIC",
|
||||
TimeFrame = {
|
||||
-- The orientation of Apollo 8 is only
|
||||
-- available during the few minutes when
|
||||
-- the famous Earthrise picture was taken.
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1968 DEC 24 16:37:19",
|
||||
End = "1968 DEC 24 16:40:15"
|
||||
}
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo8LaunchModel = {
|
||||
Identifier = "Apollo8LaunchModel",
|
||||
Parent = Apollo8Launch.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
-- The scale of the model is in cm; OpenSpace is in m
|
||||
Scale = 0.01
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = {0.0, 0.0, -3.1415/2}
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Hidden = true,
|
||||
Name = "Apollo 8 Launch Model",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo8Model = {
|
||||
Identifier = "Apollo8Model",
|
||||
Parent = Apollo8.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
-- The scale of the model is in cm; OpenSpace is in m
|
||||
Scale = 0.01
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = {0.0, 0.0, -3.1415/2}
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Hidden = true,
|
||||
Name = "Apollo 8 Model",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local PivotOffset = { 0, 2.5, 0}
|
||||
|
||||
-- The pivot node is used for navigation inside the spacecraft
|
||||
|
||||
local Apollo8Pivot = {
|
||||
Identifier = "Apollo8Pivot",
|
||||
Parent = Apollo8.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = PivotOffset
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8 Pivot",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local Apollo8LaunchTrail = {
|
||||
Identifier = "Apollo8LaunchTrail",
|
||||
Parent = "Earth",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "EARTH",
|
||||
Frame = "IAU_EARTH",
|
||||
Kernels = kernels
|
||||
},
|
||||
Color = { 0.70, 0.50, 0.20 },
|
||||
StartTime = "1968 DEC 21 12:51:00",
|
||||
EndTime = "1968 DEC 21 23:23:22",
|
||||
SampleInterval = 30
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8 Launch Trail",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo8MoonTrail = {
|
||||
Identifier = "Apollo8MoonTrail",
|
||||
Parent = "Moon",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = kernels
|
||||
},
|
||||
Color = { 0.70, 0.50, 0.20 },
|
||||
StartTime = "1968 DEC 23",
|
||||
EndTime = "1968 DEC 26",
|
||||
SampleInterval = 30,
|
||||
Enabled = false,
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8 Moon Trail",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo8EarthBarycenterTrail = {
|
||||
Identifier = "Apollo8EarthBarycenterTrail",
|
||||
Parent = "EarthBarycenter",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "EARTH BARYCENTER",
|
||||
Frame = "GALACTIC",
|
||||
Kernels = kernels
|
||||
},
|
||||
Color = { 1, 0.0, 0.0 },
|
||||
StartTime = "1968 DEC 21",
|
||||
EndTime = "1968 DEC 28",
|
||||
SampleInterval = 30,
|
||||
Enabled = false,
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 8 Earth Barycenter Trail",
|
||||
Path = "/Solar System/Missions/Apollo"
|
||||
}
|
||||
}
|
||||
|
||||
local exportList = {
|
||||
Apollo8,
|
||||
Apollo8Model,
|
||||
Apollo8Launch,
|
||||
Apollo8LaunchModel,
|
||||
Apollo8Pivot,
|
||||
|
||||
Apollo8LaunchTrail,
|
||||
Apollo8MoonTrail,
|
||||
Apollo8EarthBarycenterTrail
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, exportList)
|
||||
-- Registering Command and Service module needs to happen fter the export list
|
||||
-- has been registered, since it depends on the Apollo8Model scene graph node.
|
||||
csm.registerCsm(asset, Apollo8Model.Identifier)
|
||||
csm.registerCsm(asset, Apollo8LaunchModel.Identifier)
|
||||
@@ -0,0 +1,55 @@
|
||||
--apollo_11_lem_flipbook.asset
|
||||
local helper = asset.require('util/vrt_flipbook_helper')
|
||||
|
||||
local assetPrefix = "A11flip";
|
||||
local assetGlobe = "Moon";
|
||||
local flipbookCount = 19;
|
||||
|
||||
local flipbook = nil;
|
||||
|
||||
local vrts = asset.syncedResource({
|
||||
Name = "Apollo 11 Flipbook",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_11_flipbook",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
openspace.printDebug("set up assetfor vrts:" .. vrts);
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
|
||||
-- openspace.setPropertyValueSingle("Scene.Moon.Renderable.Layers.ColorLayers.LRO_NAC_Apollo_11.Enabled", true)
|
||||
-- openspace.setPropertyValueSingle("Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled", true)
|
||||
-- openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.Aim", '')
|
||||
-- openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.Anchor", 'Moon')
|
||||
-- openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.RetargetAnchor", nil)
|
||||
-- openspace.globebrowsing.goToGeo(0.6782993, 23.4664611, 2000)
|
||||
|
||||
openspace.globebrowsing.addBlendingLayersFromDirectory(vrts, assetGlobe);
|
||||
|
||||
flipbook = helper.createFlipbook(assetPrefix, assetGlobe, 19);
|
||||
|
||||
function nextFlip()
|
||||
openspace.printDebug("Goto next flip" .. flipbook.CurrentFlipIndex)
|
||||
helper.nextFlipbookPage(flipbook);
|
||||
end
|
||||
|
||||
function previousFlip()
|
||||
helper.previousFlipbookPage(flipbook);
|
||||
end
|
||||
|
||||
openspace.bindKey("RIGHT", "nextFlip()")
|
||||
openspace.bindKey("LEFT", "previousFlip()")
|
||||
|
||||
end)
|
||||
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
|
||||
flipbook = nil;
|
||||
|
||||
openspace.clearKey("RIGHT")
|
||||
openspace.clearKey("LEFT")
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,280 @@
|
||||
-- This asset exports a function to create an Apollo Command and Service Module (CSM).
|
||||
-- Instead of hard-coding the scene graph node parent,
|
||||
-- client assets can decide which object that the CSM should be attached to.
|
||||
-- Usage example: registerCsm(asset, Apollo8.Idenfitier)
|
||||
-- ...where Apollo8 is the scene graph node identifier to attach the CSM to.
|
||||
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_models",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local partsInfo = {
|
||||
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
|
||||
|
||||
-- Exterior
|
||||
{"AP08_cone_command_module", "Command_module_diff.png", true},
|
||||
{"AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true},
|
||||
{"AP08_cone_vent_ports_black", "black.png", true},
|
||||
{"AP08_cone_vent_ports_red", "red.png", true},
|
||||
{"AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false},
|
||||
|
||||
{"AP08_service_black", "black.png", true},
|
||||
{"AP08_service_brown", "brown.png", true},
|
||||
{"AP08_service_grey", "gray.png", true},
|
||||
{"AP08_service_high_gain_antenna", "Antenna_diff.png", true},
|
||||
{"AP08_service_module", "Service_module_diff.png", true},
|
||||
{"AP08_service_nozzle", "Nozzle_diff.png", true},
|
||||
{"AP08_service_pink", "pink.png", true},
|
||||
{"AP08_service_red", "red.png", true},
|
||||
{"AP08_service_scratched_metal", "scratched_metal_gloss.png", true},
|
||||
{"AP08_service_white", "white.png", true},
|
||||
|
||||
-- Interior
|
||||
-- {"AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false},
|
||||
-- {"AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false},
|
||||
-- {"AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false},
|
||||
-- {"AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false},
|
||||
-- {"AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false},
|
||||
-- {"AP11_interior_box_back_01", "box_back_01_paint_v001.png", false},
|
||||
-- {"AP11_interior_box_back_02", "box_back_02_paint_v001.png", false},
|
||||
-- {"AP11_interior_box_back_04", "box_back_04_paint_v001.png", false},
|
||||
-- {"AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false},
|
||||
-- {"AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false},
|
||||
-- {"AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false},
|
||||
-- {"AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false},
|
||||
-- {"AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false},
|
||||
-- {"AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false},
|
||||
-- {"AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false},
|
||||
-- {"AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false},
|
||||
-- {"AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false},
|
||||
-- {"AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false},
|
||||
-- {"AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false},
|
||||
-- {"AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false},
|
||||
-- {"AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false},
|
||||
-- {"AP11_interior_grey", "gray.png", false},
|
||||
-- {"AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false},
|
||||
-- {"AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false},
|
||||
-- {"AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false},
|
||||
-- {"AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false},
|
||||
-- {"AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false},
|
||||
-- {"AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_pole_end_02", "pole_end_02.png", false},
|
||||
-- {"AP11_interior_pole_end_03", "pole_end_03.png", false},
|
||||
-- {"AP11_interior_pole_tex_03", "pole_tex_03.png", false},
|
||||
-- {"AP11_interior_pole_tex_04", "pole_tex_04.png", false},
|
||||
-- {"AP11_interior_pole_tex_05", "pole_tex_05.png", false},
|
||||
-- {"AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false},
|
||||
-- {"AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false},
|
||||
-- {"AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false},
|
||||
-- {"AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false},
|
||||
-- {"AP11_interior_red", "red.png", false},
|
||||
-- {"AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false},
|
||||
-- {"AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false},
|
||||
-- {"AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false},
|
||||
-- {"AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false},
|
||||
-- {"AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false},
|
||||
-- {"AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false},
|
||||
-- {"AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false}
|
||||
}
|
||||
|
||||
|
||||
local partsInfoFull = {
|
||||
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
|
||||
|
||||
-- Exterior
|
||||
{"AP08_cone_command_module", "Command_module_diff.png", true},
|
||||
{"AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true},
|
||||
{"AP08_cone_vent_ports_black", "black.png", true},
|
||||
{"AP08_cone_vent_ports_red", "red.png", true},
|
||||
{"AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false},
|
||||
|
||||
{"AP08_service_black", "black.png", true},
|
||||
{"AP08_service_brown", "brown.png", true},
|
||||
{"AP08_service_grey", "gray.png", true},
|
||||
{"AP08_service_high_gain_antenna", "Antenna_diff.png", true},
|
||||
{"AP08_service_module", "Service_module_diff.png", true},
|
||||
{"AP08_service_nozzle", "Nozzle_diff.png", true},
|
||||
{"AP08_service_pink", "pink.png", true},
|
||||
{"AP08_service_red", "red.png", true},
|
||||
{"AP08_service_scratched_metal", "scratched_metal_gloss.png", true},
|
||||
{"AP08_service_white", "white.png", true},
|
||||
|
||||
-- Interior
|
||||
{"AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false},
|
||||
{"AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false},
|
||||
{"AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false},
|
||||
{"AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false},
|
||||
{"AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false},
|
||||
{"AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false},
|
||||
{"AP11_interior_box_back_01", "box_back_01_paint_v001.png", false},
|
||||
{"AP11_interior_box_back_02", "box_back_02_paint_v001.png", false},
|
||||
{"AP11_interior_box_back_04", "box_back_04_paint_v001.png", false},
|
||||
{"AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false},
|
||||
{"AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false},
|
||||
{"AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false},
|
||||
{"AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false},
|
||||
{"AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false},
|
||||
{"AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false},
|
||||
{"AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false},
|
||||
{"AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false},
|
||||
{"AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false},
|
||||
{"AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false},
|
||||
{"AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false},
|
||||
{"AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false},
|
||||
{"AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false},
|
||||
{"AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false},
|
||||
{"AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false},
|
||||
{"AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false},
|
||||
{"AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false},
|
||||
{"AP11_interior_grey", "gray.png", false},
|
||||
{"AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false},
|
||||
{"AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false},
|
||||
{"AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false},
|
||||
{"AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false},
|
||||
{"AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false},
|
||||
{"AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false},
|
||||
{"AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false},
|
||||
{"AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false},
|
||||
{"AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_pole_end_02", "pole_end_02.png", false},
|
||||
{"AP11_interior_pole_end_03", "pole_end_03.png", false},
|
||||
{"AP11_interior_pole_tex_03", "pole_tex_03.png", false},
|
||||
{"AP11_interior_pole_tex_04", "pole_tex_04.png", false},
|
||||
{"AP11_interior_pole_tex_05", "pole_tex_05.png", false},
|
||||
{"AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false},
|
||||
{"AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false},
|
||||
{"AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false},
|
||||
{"AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false},
|
||||
{"AP11_interior_red", "red.png", false},
|
||||
{"AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false},
|
||||
{"AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false},
|
||||
{"AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false},
|
||||
{"AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false},
|
||||
{"AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false},
|
||||
{"AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false},
|
||||
{"AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false},
|
||||
{"AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false},
|
||||
{"AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false},
|
||||
{"AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false}
|
||||
}
|
||||
|
||||
|
||||
|
||||
asset.export("registerCsm", function (asset, parentNodeIdentifier)
|
||||
local parts = {}
|
||||
for i, info in ipairs(partsInfo) do
|
||||
parts[#parts + 1] = assetHelper.createModelPart(
|
||||
parentNodeIdentifier,
|
||||
sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
models,
|
||||
info[1],
|
||||
info[2],
|
||||
info[3]
|
||||
)
|
||||
end
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
asset.export("registerCsmFull", function (asset, parentNodeIdentifier)
|
||||
local parts = {}
|
||||
for i, info in ipairs(partsInfoFull) do
|
||||
parts[#parts + 1] = assetHelper.createModelPart(
|
||||
parentNodeIdentifier,
|
||||
sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
models,
|
||||
info[1],
|
||||
info[2],
|
||||
info[3]
|
||||
)
|
||||
end
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
|
||||
end)
|
||||
@@ -0,0 +1,38 @@
|
||||
--apollo_globebrowsing.asset
|
||||
|
||||
|
||||
local heightmaps = asset.syncedResource({
|
||||
Name = "Apollo Globebrowsing",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_globebrowsing_heightmaps",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local basemaps = asset.syncedResource({
|
||||
Name = "Apollo Globebrowsing",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_globebrowsing_basemaps",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local naclighting = asset.syncedResource({
|
||||
Name = "Apollo Globebrowsing",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_globebrowsing_naclighting",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local stations = asset.syncedResource({
|
||||
Name = "Apollo Globebrowsing",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_globebrowsing_stations",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
asset.onInitialize(function ()
|
||||
openspace.globebrowsing.addBlendingLayersFromDirectory(heightmaps,"Moon")
|
||||
openspace.globebrowsing.addBlendingLayersFromDirectory(basemaps,"Moon")
|
||||
openspace.globebrowsing.addBlendingLayersFromDirectory(naclighting,"Moon")
|
||||
openspace.globebrowsing.addBlendingLayersFromDirectory(stations,"Moon")
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,53 @@
|
||||
--apollo_lem.asset (hopefull title)
|
||||
|
||||
|
||||
-- This asset exports a function to create an Apollo Command and Service Module (CSM).
|
||||
-- Instead of hard-coding the scene graph node parent,
|
||||
-- client assets can decide which object that the CSM should be attached to.
|
||||
-- Usage example: registerCsm(asset, Apollo8.Idenfitier)
|
||||
-- ...where Apollo8 is the scene graph node identifier to attach the CSM to.
|
||||
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_lem_model",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local partsInfo = {
|
||||
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
|
||||
-- Exterior
|
||||
{"black", "black.png", true},
|
||||
{"blue_glass", "blue_glass.png", true},
|
||||
{"booster", "booster3.png", true},
|
||||
{"bright_white", "white.png", true},
|
||||
{"dark_grey_dish", "dark_gray.png", true},
|
||||
{"dull_white", "dull_white.png", true},
|
||||
{"gold", "gold.png", true},
|
||||
{"light_grey", "light_gray.png", true},
|
||||
{"mid_grey", "gray.png", true},
|
||||
{"orange", "orange.png", true},
|
||||
{"texture_lem_flag", "texture_lem_flag.png", true},
|
||||
{"texture_lem_unitedstates", "texture_lem_unitedstates.png", true},
|
||||
{"yellow_buttons", "yellow.png", true},
|
||||
}
|
||||
|
||||
|
||||
asset.export("registerLem", function (asset, parentNodeIdentifier)
|
||||
local parts = {}
|
||||
for i, info in ipairs(partsInfo) do
|
||||
parts[#parts + 1] = assetHelper.createModelPart(
|
||||
parentNodeIdentifier,
|
||||
sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
models,
|
||||
info[1],
|
||||
info[2],
|
||||
info[3]
|
||||
)
|
||||
end
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, parts)
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_boulders",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local LightSources = {
|
||||
{
|
||||
Type = "SceneGraphLightSource",
|
||||
Identifier = "Sun",
|
||||
Node = sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
Intensity = 1.0
|
||||
},
|
||||
{
|
||||
Identifier = "Camera",
|
||||
Type = "CameraLightSource",
|
||||
Intensity = 0.5
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder1Holder = {
|
||||
Identifier = "Station_2_Boulder1",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.5294692,
|
||||
Latitude = 20.098824,
|
||||
FixedAltitude = -2442.8,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 1",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder1Model = {
|
||||
Identifier = "Station2Boulder1Model",
|
||||
Parent = Station2Boulder1Holder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.06
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/b1-v2.obj"
|
||||
},
|
||||
ColorTexture = models .. "/b1-v2_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 1 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder2Holder = {
|
||||
Identifier = "Station_2_Boulder2",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.5287892,
|
||||
Latitude = 20.098240,
|
||||
FixedAltitude = -2434.6,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 2",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder2Model = {
|
||||
Identifier = "Station2Boulder2Model",
|
||||
Parent = Station2Boulder2Holder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.06
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/b2model.obj"
|
||||
},
|
||||
ColorTexture = models .. "/b2model_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 2 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder3Holder = {
|
||||
Identifier = "Station_2_Boulder3",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.5294692,
|
||||
Latitude = 20.098610,
|
||||
FixedAltitude = -2441.55,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 3",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
local Station2Boulder3Model = {
|
||||
Identifier = "Station2Boulder3Model",
|
||||
Parent = Station2Boulder3Holder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.06
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/b3model.obj"
|
||||
},
|
||||
ColorTexture = models .. "/b3model_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 2 Boulder 3 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 2"
|
||||
}
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Station2Boulder1Holder, Station2Boulder1Model,
|
||||
Station2Boulder2Holder, Station2Boulder2Model,
|
||||
Station2Boulder3Holder, Station2Boulder3Model
|
||||
})
|
||||
|
||||
asset.onInitialize(function ()
|
||||
openspace.setPropertyValueSingle(
|
||||
'Scene.Station2Boulder1Model.Renderable.RotationVector',
|
||||
{ 243.243256 ,206.270264, 309.677429 }
|
||||
);
|
||||
|
||||
openspace.setPropertyValueSingle(
|
||||
'Scene.Station2Boulder3Model.Renderable.RotationVector',
|
||||
{ 161.513519 ,243.243256, 65.806450 }
|
||||
);
|
||||
|
||||
openspace.setPropertyValueSingle(
|
||||
'Scene.Station2Boulder2Model.Renderable.RotationVector',
|
||||
{ 66.162155, 7.783780, 114.193550 }
|
||||
);
|
||||
end)
|
||||
@@ -0,0 +1,182 @@
|
||||
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_boulders",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
|
||||
local LightSources = {
|
||||
{
|
||||
Type = "SceneGraphLightSource",
|
||||
Identifier = "Sun",
|
||||
Node = sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
Intensity = 1.0
|
||||
},
|
||||
{
|
||||
Identifier = "Camera",
|
||||
Type = "CameraLightSource",
|
||||
Intensity = 0.5
|
||||
}
|
||||
}
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
|
||||
local Station6Frag1Holder = {
|
||||
Identifier = "Station_6_Fragment1",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.80068,
|
||||
Latitude = 20.2903,
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 6 Fragment 1",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 6"
|
||||
}
|
||||
}
|
||||
|
||||
local Station6Frag1Model = {
|
||||
Identifier = "Station6Frag1Model",
|
||||
Parent = Station6Frag1Holder.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.8007,
|
||||
Latitude = 20.2903,
|
||||
}
|
||||
},
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.1
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/A17-S6-frag1.obj"
|
||||
},
|
||||
ColorTexture = models .. "/A17-S6-frag1.png",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 6 Fragment 1 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 6"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
local Station6Frag23Holder = {
|
||||
Identifier = "Station_6_Fragments_2_3",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
GUI = {
|
||||
Name = "Station 6 Fragments 2 & 3 Holder",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 6"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local Station6Frag2Model = {
|
||||
Identifier = "A17S6F5",
|
||||
Parent = Station6Frag23Holder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.14
|
||||
},
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.80055,
|
||||
Latitude = 20.289808,
|
||||
FixedAltitude = -2566.5,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/station6_boulder_frag2.obj"
|
||||
},
|
||||
ColorTexture = models .. "/frag2crop_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true,
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 6 Fragment 2 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 6"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
local Station6Frag3Model = {
|
||||
Identifier = "A17S6F3",
|
||||
Parent = Station6Frag23Holder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.14
|
||||
},
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.80053,
|
||||
Latitude = 20.29030,
|
||||
FixedAltitude = -2563.0,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/station6_boulder_frag3.obj"
|
||||
},
|
||||
ColorTexture = models .. "/frag3crop_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 6 Fragment 3 Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 6"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Station6Frag1Holder, Station6Frag1Model, Station6Frag23Holder, Station6Frag2Model, Station6Frag3Model,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
|
||||
openspace.setPropertyValueSingle('Scene.Station6Frag1Model.Renderable.RotationVector', {235.909088,165.000000,286.299194});
|
||||
openspace.setPropertyValueSingle('Scene.A17S6F5.Renderable.RotationVector', {336.959991,210.239990,325.984253});
|
||||
openspace.setPropertyValueSingle('Scene.A17S6F3.Renderable.RotationVector', {293.181824,255.000000,4.090910});
|
||||
openspace.setPropertyValueSingle('Scene.Station6Frag1Model.Renderable.PerformShading', false);
|
||||
openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.MinimumAllowedDistance", 0.050000)
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Apollo Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_boulders",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local LightSources = {
|
||||
{
|
||||
Type = "SceneGraphLightSource",
|
||||
Identifier = "Sun",
|
||||
Node = sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
Intensity = 1.0
|
||||
},
|
||||
{
|
||||
Identifier = "Camera",
|
||||
Type = "CameraLightSource",
|
||||
Intensity = 0.5
|
||||
}
|
||||
}
|
||||
|
||||
local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon')
|
||||
|
||||
local Station7BoulderHolder = {
|
||||
Identifier = "Station_7_Boulder",
|
||||
Parent = moonAsset.Moon.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "GlobeTranslation",
|
||||
Globe = moonAsset.Moon.Identifier,
|
||||
Longitude = -360+30.8165882,
|
||||
Latitude = 20.2908556,
|
||||
FixedAltitude = -2593.5,
|
||||
UseFixedAltitude = true
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 7 Boulder",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 7"
|
||||
}
|
||||
}
|
||||
|
||||
local Station7BoulderModel = {
|
||||
Identifier = "Station7BoulderModel",
|
||||
Parent = Station7BoulderHolder.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.1
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/b7model.obj"
|
||||
},
|
||||
ColorTexture = models .. "/b7model_u1_v1.jpeg",
|
||||
LightSources = LightSources,
|
||||
PerformShading = false,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Station 7 Boulder Model",
|
||||
Path = "/Solar System/Missions/Apollo/17/Station 7"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
||||
Station7BoulderHolder, Station7BoulderModel
|
||||
})
|
||||
|
||||
asset.onInitialize(function ()
|
||||
openspace.setPropertyValueSingle('Scene.Station7BoulderModel.Renderable.RotationVector', {1.945950,274.378387,212.903214});
|
||||
end)
|
||||
@@ -142,6 +142,38 @@ local getDefaultLightSources = function (solarSystemBarycenterIdentifier)
|
||||
end
|
||||
|
||||
|
||||
local createModelPart = function (parent, sunLightSourceNode, models, geometry, texture, performShading)
|
||||
local lightSources = {}
|
||||
if performShading then
|
||||
lightSources[1] = {
|
||||
Type = "SceneGraphLightSource",
|
||||
Identifier = "Sun",
|
||||
Node = sunLightSourceNode,
|
||||
Intensity = 1.0
|
||||
}
|
||||
end
|
||||
return {
|
||||
Identifier = parent .. "-" .. geometry,
|
||||
Parent = parent,
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = models .. "/" .. geometry .. ".obj"
|
||||
},
|
||||
ColorTexture = models .. "/" .. texture,
|
||||
LightSources = lightSources,
|
||||
PerformShading = performShading,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Hidden = true
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
|
||||
asset.export("registerSceneGraphNodes", registerSceneGraphNodes)
|
||||
asset.export("registerSceneGraphNodesAndExport", registerSceneGraphNodesAndExport)
|
||||
asset.export("registerSpiceKernels", registerSpiceKernels)
|
||||
@@ -149,3 +181,4 @@ asset.export("registerDashboardItems", registerDashboardItems)
|
||||
asset.export("requireAll", requireAll)
|
||||
asset.export("requestAll", requestAll)
|
||||
asset.export("getDefaultLightSources", getDefaultLightSources)
|
||||
asset.export("createModelPart", createModelPart)
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--vrt_slideshow_helper.asset
|
||||
local createFlipbook = function (assetPrefix, assetGlobe, count)
|
||||
return {
|
||||
AssetPrefix = assetPrefix,
|
||||
AssetGlobe = assetGlobe,
|
||||
TotalCount = count,
|
||||
CurrentFlipIndex = -1,
|
||||
}
|
||||
end
|
||||
|
||||
local nextFlipbookPage = function (flipbook)
|
||||
|
||||
if (flipbook.CurrentFlipIndex >= 0) then
|
||||
local assetSring = flipbook.AssetPrefix .. flipbook.CurrentFlipIndex;
|
||||
openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", false)
|
||||
end
|
||||
|
||||
if (flipbook.CurrentFlipIndex < flipbook.TotalCount - 1) then
|
||||
flipbook.CurrentFlipIndex = flipbook.CurrentFlipIndex + 1;
|
||||
local assetSring = flipbook.AssetPrefix .. flipbook.CurrentFlipIndex;
|
||||
openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", true)
|
||||
end
|
||||
end
|
||||
|
||||
local previousFlipbookPage = function (flipbook)
|
||||
|
||||
if (localIndex == -1) then
|
||||
return
|
||||
end
|
||||
|
||||
local localIndex = flipbook.CurrentFlipIndex;
|
||||
|
||||
local assetSring = flipbook.AssetPrefix .. localIndex;
|
||||
openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", false)
|
||||
localIndex = localIndex - 1;
|
||||
|
||||
if (localIndex >= 0 ) then
|
||||
assetSring = flipbook.AssetPrefix .. localIndex;
|
||||
openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", true)
|
||||
end
|
||||
|
||||
if (localIndex < -1) then
|
||||
localIndex = -1
|
||||
end
|
||||
flipbook.CurrentFlipIndex = localIndex;
|
||||
|
||||
end
|
||||
|
||||
asset.export('nextFlipbookPage', nextFlipbookPage)
|
||||
asset.export('previousFlipbookPage', previousFlipbookPage)
|
||||
asset.export('createFlipbook', createFlipbook)
|
||||
@@ -85,6 +85,12 @@ namespace {
|
||||
"of the Sun."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo DisableFaceCullingInfo = {
|
||||
"DisableFaceCulling",
|
||||
"Disable Face Culling",
|
||||
"Disable OpenGL automatic face culling optimization."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo ModelTransformInfo = {
|
||||
"ModelTransform",
|
||||
"Model Transform",
|
||||
@@ -92,6 +98,12 @@ namespace {
|
||||
"all other transformations are applied."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo RotationVecInfo = {
|
||||
"RotationVector",
|
||||
"Rotation Vector",
|
||||
"Rotation Vector using degrees"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo LightSourcesInfo = {
|
||||
"LightSources",
|
||||
"Light Sources",
|
||||
@@ -143,12 +155,24 @@ documentation::Documentation RenderableModel::Documentation() {
|
||||
Optional::Yes,
|
||||
ShadingInfo.description
|
||||
},
|
||||
{
|
||||
DisableFaceCullingInfo.identifier,
|
||||
new BoolVerifier,
|
||||
Optional::Yes,
|
||||
DisableFaceCullingInfo.description
|
||||
},
|
||||
{
|
||||
ModelTransformInfo.identifier,
|
||||
new DoubleMatrix3Verifier,
|
||||
Optional::Yes,
|
||||
ModelTransformInfo.description
|
||||
},
|
||||
{
|
||||
RotationVecInfo.identifier,
|
||||
new DoubleVector3Verifier,
|
||||
Optional::Yes,
|
||||
RotationVecInfo.description
|
||||
},
|
||||
{
|
||||
LightSourcesInfo.identifier,
|
||||
new TableVerifier({
|
||||
@@ -172,7 +196,9 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
|
||||
, _diffuseIntensity(DiffuseIntensityInfo, 1.f, 0.f, 1.f)
|
||||
, _specularIntensity(SpecularIntensityInfo, 1.f, 0.f, 1.f)
|
||||
, _performShading(ShadingInfo, true)
|
||||
, _modelTransform(ModelTransformInfo, glm::mat3(1.f))
|
||||
, _disableFaceCulling(DisableFaceCullingInfo, false)
|
||||
, _modelTransform(ModelTransformInfo, glm::dmat3(1.0), glm::dmat3(-1.0), glm::dmat3(1.0))
|
||||
, _rotationVec(RotationVecInfo, glm::dvec3(0), glm::dvec3(0), glm::dvec3(360))
|
||||
, _lightSourcePropertyOwner({ "LightSources", "Light Sources" })
|
||||
{
|
||||
documentation::testSpecificationAndThrow(
|
||||
@@ -214,6 +240,10 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
|
||||
_performShading = dictionary.value<bool>(ShadingInfo.identifier);
|
||||
}
|
||||
|
||||
if (dictionary.hasKey(DisableFaceCullingInfo.identifier)) {
|
||||
_disableFaceCulling = dictionary.value<bool>(DisableFaceCullingInfo.identifier);
|
||||
}
|
||||
|
||||
if (dictionary.hasKey(LightSourcesInfo.identifier)) {
|
||||
const ghoul::Dictionary& lsDictionary =
|
||||
dictionary.value<ghoul::Dictionary>(LightSourcesInfo.identifier);
|
||||
@@ -238,6 +268,17 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
|
||||
addProperty(_diffuseIntensity);
|
||||
addProperty(_specularIntensity);
|
||||
addProperty(_performShading);
|
||||
addProperty(_disableFaceCulling);
|
||||
addProperty(_modelTransform);
|
||||
addProperty(_rotationVec);
|
||||
|
||||
_rotationVec.onChange([this]() {
|
||||
glm::vec3 degreeVector = _rotationVec;
|
||||
glm::vec3 radianVector = glm::vec3(glm::radians(degreeVector.x),
|
||||
glm::radians(degreeVector.y), glm::radians(degreeVector.z));
|
||||
_modelTransform = glm::mat4_cast(
|
||||
glm::quat(radianVector));
|
||||
});
|
||||
}
|
||||
|
||||
bool RenderableModel::isReady() const {
|
||||
@@ -361,8 +402,16 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
|
||||
_texture->bind();
|
||||
_program->setUniform(_uniformCache.texture, unit);
|
||||
|
||||
if (_disableFaceCulling) {
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
_geometry->render();
|
||||
|
||||
if (_disableFaceCulling) {
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
_program->deactivate();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#include <openspace/properties/scalar/floatproperty.h>
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
#include <memory>
|
||||
#include <openspace/properties/matrix/dmat4property.h>
|
||||
#include <openspace/properties/vector/vec3property.h>
|
||||
|
||||
|
||||
|
||||
namespace ghoul::opengl {
|
||||
class ProgramObject;
|
||||
@@ -73,11 +77,14 @@ private:
|
||||
properties::StringProperty _colorTexturePath;
|
||||
|
||||
properties::FloatProperty _ambientIntensity;
|
||||
|
||||
properties::FloatProperty _diffuseIntensity;
|
||||
properties::FloatProperty _specularIntensity;
|
||||
|
||||
properties::BoolProperty _performShading;
|
||||
properties::Mat3Property _modelTransform;
|
||||
properties::BoolProperty _disableFaceCulling;
|
||||
properties::DMat4Property _modelTransform;
|
||||
properties::Vec3Property _rotationVec;
|
||||
|
||||
ghoul::opengl::ProgramObject* _program = nullptr;
|
||||
UniformCache(opacity, nLightSources, lightDirectionsViewSpace, lightIntensities,
|
||||
|
||||
@@ -46,6 +46,12 @@ namespace {
|
||||
"This value specifies the destination frame that is used for the coordinate "
|
||||
"transformation. This has to be a valid SPICE name."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo TimeFrameInfo = {
|
||||
"TimeFrame",
|
||||
"Time Frame",
|
||||
"The time frame in which the spice kernels are valid."
|
||||
};
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
@@ -80,7 +86,13 @@ documentation::Documentation SpiceRotation::Documentation() {
|
||||
"A single kernel or list of kernels that this SpiceTranslation depends "
|
||||
"on. All provided kernels will be loaded before any other operation is "
|
||||
"performed."
|
||||
}
|
||||
},
|
||||
{
|
||||
TimeFrameInfo.identifier,
|
||||
new ReferencingVerifier("core_time_frame"),
|
||||
Optional::Yes,
|
||||
TimeFrameInfo.description
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -113,6 +125,16 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
}
|
||||
|
||||
if (dictionary.hasKey(TimeFrameInfo.identifier)) {
|
||||
ghoul::Dictionary timeFrameDictionary;
|
||||
dictionary.getValue(TimeFrameInfo.identifier, timeFrameDictionary);
|
||||
_timeFrame = TimeFrame::createFromDictionary(timeFrameDictionary);
|
||||
if (_timeFrame == nullptr) {
|
||||
throw ghoul::RuntimeError("Invalid dictionary for TimeFrame.");
|
||||
}
|
||||
addPropertySubOwner(_timeFrame.get());
|
||||
}
|
||||
|
||||
addProperty(_sourceFrame);
|
||||
addProperty(_destinationFrame);
|
||||
|
||||
@@ -121,6 +143,9 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
|
||||
glm::dmat3 SpiceRotation::matrix(const UpdateData& data) const {
|
||||
if (_timeFrame && !_timeFrame->isActive(data.time)) {
|
||||
return glm::dmat3(1.0);
|
||||
}
|
||||
return SpiceManager::ref().positionTransformMatrix(
|
||||
_sourceFrame,
|
||||
_destinationFrame,
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <openspace/scene/rotation.h>
|
||||
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/scene/timeframe.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -45,6 +46,7 @@ public:
|
||||
private:
|
||||
properties::StringProperty _sourceFrame;
|
||||
properties::StringProperty _destinationFrame;
|
||||
std::unique_ptr<TimeFrame> _timeFrame;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -47,6 +47,8 @@ Asset = "default"
|
||||
-- Asset = "juno"
|
||||
-- Asset = "messenger"
|
||||
-- Asset = "insight"
|
||||
-- Asset = "apollo8"
|
||||
-- Asset = "apollo_sites"
|
||||
|
||||
-- These scripts are executed after the initialization of each scene, thus making
|
||||
-- it possible to have global overrides to default values or execute other scripts
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user