local homespeck = asset.syncedResource({
  Name = "Home Speck File",
  Type = "HttpSynchronization",
  Identifier = "digitaluniverse_home_speck",
  Version = 1
})

local homeLabel = {
  Identifier = "HomeLabel",
  Renderable = {
    Type = "RenderableBillboardsCloud",
    Enabled = false,
    Color = { 1.0, 0.4, 0.2 },
    Opacity = 0.99,
    ScaleFactor = 500.0,
    DrawLabels = true,
    LabelFile = homespeck .. "home.label",
    Unit = "Mpc",
    TextColor = { 0.8, 0.8, 0.8 },
    TextSize = 20.50,
    TextMinMaxSize = { 16, 20 },
    TransformationMatrix = {
      -0.7357425748,    0.67726129641,  0.0,           0.0,
      -0.074553778365, -0.080991471307, 0.9939225904,  0.0,
      0.67314530211,    0.73127116582,  0.11008126223, 0.0,
      0.0,              0.0,            0.0,           1.0
    },
    FadeInDistances = { 0.05, 1.0 },
    BillboardMinMaxSize = { 0.0, 8.22 },
    EnablePixelSizeControl = true
  },
  GUI = {
    Name = "Home Label",
    Path = "/Universe/Galaxies",
    Description = "Label for the Milky Way titled 'Home', sided for the galactic level",
  }
}

asset.onInitialize(function()
  openspace.addSceneGraphNode(homeLabel)
end)
  
asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(homeLabel)
end)
  
asset.export(homeLabel)



asset.meta = {
  Name = "Home Label",
  Version = "1.1",
  Description = "Label for the Milky Way titled 'Home', sided for the galactic level",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
