public ActionResult StarMap(ClientData clientData) { var top = clientData.Top > 1000 ? clientData.Top - 1000 : 1; var left = clientData.Left > 1000 ? clientData.Left - 1000 : 1; var width = clientData.Width + 1000; var height = clientData.Height + 1000; var visibleStars = CelestialManager.GetVisibleStars(top, left, width, height, new Position() { X = clientData.Left, Y = clientData.Top }); return(Json(visibleStars)); }
public ActionResult StarMap() { var homeSystemjson = CelestialManager.GetHomeSystem(); var star = JsonConvert.DeserializeObject <Star>(homeSystemjson); return(View(new ClusterInfo() { HomeSystemPosition = new Position() { X = star.X, Y = star.Y }, ClusterName = "test", HomeSystemName = star.Name })); }