diff --git a/.gitignore b/.gitignore index fb76bcd..1abc014 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,6 @@ nosetests.xml *.lib punyverse/assets/textures/*_medium.* punyverse/assets/textures/*_small.* +punyverse/assets/textures/*/*_medium.* +punyverse/assets/textures/*/*_small.* temp diff --git a/punyverse/assets/textures/moons/callisto.jpg b/punyverse/assets/textures/moons/callisto.jpg new file mode 100644 index 0000000..d0e3059 Binary files /dev/null and b/punyverse/assets/textures/moons/callisto.jpg differ diff --git a/punyverse/assets/textures/moons/europa.jpg b/punyverse/assets/textures/moons/europa.jpg new file mode 100644 index 0000000..70db690 Binary files /dev/null and b/punyverse/assets/textures/moons/europa.jpg differ diff --git a/punyverse/assets/textures/moons/ganymede.jpg b/punyverse/assets/textures/moons/ganymede.jpg new file mode 100644 index 0000000..649c15c Binary files /dev/null and b/punyverse/assets/textures/moons/ganymede.jpg differ diff --git a/punyverse/assets/textures/moons/io.jpg b/punyverse/assets/textures/moons/io.jpg new file mode 100644 index 0000000..3a71fb7 Binary files /dev/null and b/punyverse/assets/textures/moons/io.jpg differ diff --git a/punyverse/gencheap.bat b/punyverse/gencheap.bat index 2fea383..7802046 100644 --- a/punyverse/gencheap.bat +++ b/punyverse/gencheap.bat @@ -10,6 +10,9 @@ call :convert jupiter.jpg jupiter_medium.jpg 2048x1024 call :convert jupiter.jpg jupiter_small.jpg 1024x512 call :convert saturn.jpg saturn_medium.jpg 2048x1024 call :convert saturn.jpg saturn_small.jpg 1024x512 +call :convert moons\io.jpg moons\io_small.jpg 1024x512 +call :convert moons\europa.jpg moons\europa_small.jpg 1024x512 +call :convert moons\ganymede.jpg moons\ganymede_small.jpg 1024x512 goto :eof :convert diff --git a/punyverse/world.json b/punyverse/world.json index 4abca48..8baf004 100644 --- a/punyverse/world.json +++ b/punyverse/world.json @@ -68,7 +68,46 @@ "mass": 1.8986e+27, "z": "5.2 * AU", "pitch": -90, - "yaw": 3.13 + "yaw": 3.13, + "comment": "satellites here are 3/10 the virtual distance than physical, and five times the size", + "satellites": { + "io": { + "texture": ["moons/io.jpg", "moons/io_small.jpg", [0.62, 0.56, 0.35, 1]], + "radius": "1821.3 * 5", + "distance": 126510, + "sma": 421700, + "pitch": -90, + "inclination": 2.21, + "eccentricity": 0.0041 + }, + "europa": { + "texture": ["moons/europa.jpg", "moons/europa_small.jpg", [0.77, 0.74, 0.65, 1]], + "radius": "1560.8 * 5", + "distance": 201270, + "sma": 670900, + "pitch": -90, + "inclination": 2.71, + "eccentricity": 0.009 + }, + "ganymede": { + "texture": ["moons/ganymede.jpg", "moons/ganymede_small.jpg", [0.52, 0.47, 0.46, 1]], + "radius": "2634.1 * 5", + "distance": 321120, + "sma": 1070400, + "pitch": -90, + "inclination": 2.51, + "eccentricity": 0.0013 + }, + "callisto": { + "texture": ["moons/callisto.jpg", "moons/callisto_small.jpg", [0.49, 0.43, 0.34, 1]], + "radius": "2410.3 * 5", + "distance": 564810, + "sma": 1882700, + "pitch": -90, + "inclination": 0.192, + "eccentricity": 0.0074 + } + } }, "saturn": { "texture": ["saturn.jpg", "saturn_medium.jpg", "saturn_small.jpg", [0.9, 0.8, 0.64, 1]], diff --git a/punyverse/world.py b/punyverse/world.py index b4d3105..94f1813 100644 --- a/punyverse/world.py +++ b/punyverse/world.py @@ -91,10 +91,11 @@ def load_world(file): 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, int(radius / 2), int(radius / 2), texture) + object_id = compile(colourball, radius, division, division, texture) else: - object_id = compile(sphere, radius, int(radius / 2), int(radius / 2), texture, lighting=lighting) + object_id = compile(sphere, radius, division, division, texture, lighting=lighting) elif 'model' in info: scale = info.get('scale', 1) object_id = model_list(load_model(info['model']), info.get('sx', scale), info.get('sy', scale), @@ -131,7 +132,8 @@ def load_world(file): cloud_texture = atmosphere_data.get('cloud_texture', None) cheap, _, cloud_texture = get_best_texture(cloud_texture) if not cheap: - cloudmap_id = compile(sphere, radius + 2, int(radius / 2), int(radius / 2), cloud_texture, + 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) if not cheap: