local globeIdentifier = asset.require("../../jupiter").Jupiter.Identifier

local texturesPath = asset.syncedResource({
  Name = "Jupiter Textures",
  Type = "HttpSynchronization",
  Identifier = "jupiter_textures",
  Version = 2
})

local layer = {
  Identifier = "Texture",
  FilePath = texturesPath .. "jupiter_os.tif",
  Enabled = asset.enabled
}

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 = "Jupiter Texutre",
  Version = "2.0",
  Description = "Default texture for Jupiter",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
