local transforms = asset.require("./transforms")



local textures = asset.syncedResource({
  Name = "Bennu Textures",
  Type = "HttpSynchronization",
  Identifier = "bennu_textures",
  Version = 1
})


local BennuBodyId = "2101955"

local ImagePlane = {
  Identifier = "ImagePlaneBennu",
  Parent = transforms.BennuBarycenter.Identifier,
  Renderable = {
    Type = "RenderablePlaneProjection",
    Frame = "IAU_BENNU",
    DefaultTarget = BennuBodyId,
    Spacecraft = "OSIRIS-REX",
    Instrument = "ORX_OCAMS_POLYCAM",
    Moving = false,
    Texture = textures .. "defaultProj.png"
  },
  GUI = {
    Name = "OsirisREx Image Plane",
    Path = "/Solar System/Missions/OSIRIS REx"
  }
}


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

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

asset.export(ImagePlane)
