local globeIdentifier = asset.require("../../mercury").Mercury.Identifier

local texturesPath = asset.syncedResource({
  Name = "Mercury Textures",
  Type = "HttpSynchronization",
  Identifier = "mercury_abundance_textures",
  Version = 1
})

local layer = {
  Name = "Magnesium Abundance",
  Identifier = "mgsimap_02122015",
  Enabled = asset.enabled,
  FilePath = texturesPath .. "mgsimap_02122015.png",
  Settings = { 
    Gamma = 1.33,
    Multiplier = 1.15
  },
  BlendMode = "Multiply",
}

asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.export("layer", layer)



asset.meta = {
  Name = "Mercury Magnesium Abundance",
  Version = "1.0",
  Description = "Magnesium Abundance layer for Mercury globe",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
