mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
* Add GlobeRotation and example * Put latitude before longitude in GlobeTranslation files
60 lines
1.4 KiB
Lua
60 lines
1.4 KiB
Lua
local assetHelper = asset.require('util/asset_helper')
|
|
local earth = asset.require('scene/solarsystem/planets/earth/earth')
|
|
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
|
|
|
local models = asset.syncedResource({
|
|
Name = "New Horizons Model",
|
|
Type = "HttpSynchronization",
|
|
Identifier = "newhorizons_model",
|
|
Version = 2
|
|
})
|
|
|
|
local Example_Fixed_Height = {
|
|
Identifier = "Example_Fixed_Height",
|
|
Parent = earth.Earth.Identifier,
|
|
Transform = {
|
|
Translation = {
|
|
Type = "GlobeTranslation",
|
|
Globe = earth.Earth.Identifier,
|
|
Latitude = 40.7128,
|
|
Longitude = -74.006,
|
|
Altitude = 100000.0
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableModel",
|
|
Body = "NEW HORIZONS",
|
|
GeometryFile = models .. "/NewHorizonsCleanModel.obj"
|
|
},
|
|
GUI = {
|
|
Path = "/Example"
|
|
}
|
|
}
|
|
|
|
local Example_Adaptive_Height = {
|
|
Identifier = "Example_Adaptive_Height",
|
|
Parent = earth.Earth.Identifier,
|
|
Transform = {
|
|
Translation = {
|
|
Type = "GlobeTranslation",
|
|
Globe = earth.Earth.Identifier,
|
|
Latitude = 40.7128,
|
|
Longitude = -74.006,
|
|
UseHeightmap = true
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableModel",
|
|
Body = "NEW HORIZONS",
|
|
GeometryFile = models .. "/NewHorizonsCleanModel.obj"
|
|
},
|
|
GUI = {
|
|
Path = "/Example"
|
|
}
|
|
}
|
|
|
|
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
|
Example_Fixed_Height,
|
|
Example_Adaptive_Height
|
|
})
|