diff --git a/punyverse/world.json b/punyverse/world.json index 685de2f..d03f033 100644 --- a/punyverse/world.json +++ b/punyverse/world.json @@ -23,6 +23,7 @@ "roll": -90, "mass": 5.97219e+24, "rotation": 86400, + "division": 70, "atmosphere": { "cloud_texture": "cloudmap.png", "diffuse_texture": "atmosphere_earth.png", @@ -35,6 +36,7 @@ "radius": 1738.14, "distance": 38439, "sma": 384399, + "division": 30, "eccentricity": 0.0549, "inclination": 5.145, "rotation": 0, @@ -59,6 +61,7 @@ "mass": 6.4185e+23, "rotation": 88643, "orbit_distance": "AU", + "division": 30, "satellites": { "phobos": { "distance": 9377, @@ -240,7 +243,8 @@ "texture": "sky.jpg", "optional": true, "lighting": false, - "radius": 190000, + "radius": 305000000, + "division": 30, "pitch": 90, "yaw": 30, "roll": 180, diff --git a/punyverse/world.py b/punyverse/world.py index dfafeef..7ec8a88 100644 --- a/punyverse/world.py +++ b/punyverse/world.py @@ -87,12 +87,12 @@ def load_world(file): radius = e(info.get('radius', length)) / length background = info.get('background', False) orbit_distance = e(info.get('orbit_distance', au)) + division = info.get('division', max(min(int(radius / 8), 60), 10)) if 'texture' in info: cheap, skip, texture = get_best_texture(info['texture'], optional=info.get('optional', False)) if skip: return - division = min(int(radius / 2), 100) if cheap: object_id = compile(colourball, radius, division, division, texture) else: @@ -137,7 +137,6 @@ def load_world(file): cloud_texture = atmosphere_data.get('cloud_texture', None) cheap, _, cloud_texture = get_best_texture(cloud_texture) if not cheap: - division = min(int(radius / 2), 100) cloudmap_id = compile(sphere, radius + 2, division, division, cloud_texture, lighting=False) cheap, _, atm_texture = get_best_texture(atm_texture)