local data = asset.syncedResource({
  Name = "Constellation Files",
  Type = "HttpSynchronization",
  Identifier = "digitaluniverse_constellations_data",
  Version = 1
})


local zodiacs = {
  "CNC", "TAU", "PSC", "ARI", "LIB", "AQR", "CAP", "SCO", "VIR", "SGR", "GEM", "LEO"
}

local Object = {
  Identifier = "ConstellationBounds",
  Renderable = {
    Type = "RenderableConstellationBounds",
    Enabled = false,
    File = data .. "bound_20.dat",
    NamesFile = data .. "constellations.dat",
    -- Selection = zodiacs
  },
  Transform = {
    Rotation = {
      Type = "SpiceRotation",
      SourceFrame = "J2000",
      DestinationFrame = "GALACTIC"
    },
    Scale = {
      Type = "StaticScale",
      Scale = 10e17
    }
  },
  GUI = {
    Name = "Constellation Bounds",
    Path = "/Milky Way/Constellations",
    Description = [[A Spherical mesh dividing the sky into regions that fit the
      constellations]]
  }
}


asset.onInitialize(function()
  openspace.addSceneGraphNode(Object)
end)

asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(Object)
end)

asset.export(Object)



asset.meta = {
  Name = "Constellation Bounds",
  Version = "1.2",
  Description = [[DU asset providing a Spherical mesh dividing the sky into regions that
    fit the constellations]],
  Author = "Brian Abbott (AMNH)",
  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
  License = "AMNH Digital Universe"
}
