Render the selected planets solar system (#8875)

* Solar systems render based on the selected planet

* Remove unnecessary setter

* Compatibility
This commit is contained in:
Idontuse
2023-08-01 16:52:23 +01:00
committed by GitHub
parent e3d3167b13
commit 12b6604143
2 changed files with 6 additions and 4 deletions

View File

@@ -18,10 +18,11 @@ public class PlanetParams{
public Vec3 camUp = new Vec3(0f, 1f, 0f);
/** the unit length direction vector of the camera **/
public Vec3 camDir = new Vec3(0, 0, -1);
/** The sun/main planet of the solar system from which everything is rendered. */
public Planet solarSystem = Planets.sun;
/** The sun/main planet of the solar system from which everything is rendered. Deprecated use planet.solarSystem instead */
public @Deprecated Planet solarSystem = Planets.sun;
/** Planet being looked at. */
public Planet planet = Planets.serpulo;
/** Zoom relative to planet. */
public float zoom = 1f;
/** Alpha of orbit rings and other UI elements. */

View File

@@ -102,8 +102,9 @@ public class PlanetRenderer implements Disposable{
Events.fire(Trigger.universeDraw);
renderPlanet(params.solarSystem, params);
renderTransparent(params.solarSystem, params);
Planet solarSystem = params.planet.solarSystem;
renderPlanet(solarSystem, params);
renderTransparent(solarSystem, params);
bloom.render();