local textures = asset.syncedResource({
  Name = "Galaxy Superclusters Textures",
  Type = "HttpSynchronization",
  Identifier = "digitaluniverse_superclusters_textures",
  Version = 2
})

local speck = asset.syncedResource({
  Name = "Galaxy Superclusters Speck Files",
  Type = "HttpSynchronization",
  Identifier = "digitaluniverse_superclusters_speck",
  Version = 2
})

local object = {
  Identifier = "GalaxySuperclusters",
  Renderable = {
    Type = "RenderableBillboardsCloud",
    Enabled = false,
    DrawElements = false,
    Color = { 1.0, 1.0, 1.0 },
    Opacity = 0.65,
    File = speck .. "superclust.speck",
    Texture = textures .. "point3A.png",
    LabelFile = speck .. "superclust.label",
    Unit = "Mpc",
    TextColor = { 0.9, 0.9, 0.9 },
    ScaleFactor = 531.0,
    TextSize = 22.44,
    TextMinMaxSize = { 8, 20 },
    DrawLabels = true,
    --BillboardMinMaxSize = { 0.0, 7.2 },
    EnablePixelSizeControl = true
  },
  GUI = {
    Name = "Galaxy Superclusters",
    Path = "/Universe/Galaxies",
    Description = [[Census: 33 labels. DU Version 1.3.<br> The superclusters dataset
      is a set of labels that mark the major galaxy superclusters in the local universe.
      They correspond to, and should be viewed with, the Abell clusters. Astronomers
      estimate there are 10 million superclusters in the observable universe.
      (Description from URL) <br><br> Data Reference: Superclusters of Abell and X-ray
      clusters (Einasto+, 2001)]]
  }
}

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



asset.meta = {
  Name = "Galaxy Superclusters",
  Version = "2.1",
  Description = "Digital Universe asset for Galaxy Superclusters",
  Author = "Brian Abbott (AMNH)",
  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
  License = "AMNH Digital Universe"
}
