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

local object = {
  Identifier = "GalaxyClusterLabels",
  Renderable = {
    Type = "RenderableBillboardsCloud",
    Enabled = false,
    Color = { 1.0, 1.0, 1.0 },
    Opacity = 0.65,
    LabelFile = speck .. "galclust.label",
    Unit = "Mpc",
    TextColor = { 1.0, 0.44, 0.0 },
    DrawLabels = true,
    TextSize = 22,
    TextMinMaxSize = { 8, 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
    },
  },
  GUI = {
    Name = "Galaxy Cluster Labels",
    Path = "/Universe/Galaxies",
    Description = [[Census 15 galaxy cluster labels. DU Version 1.2. <br>The Galaxy
      clusters dataset is a series of labels that mark where the large clusters of
      galaxies are in the nearby universe. These labels must be used in conjunction
      with the Tully galaxy group.(Description from URL) <br><br> Data Reference:
      Brian Abbott (AMNH)]],
  }
}

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



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