mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 13:11:57 -04:00
Attempts to maintain the balance between correctness and appearance.
Added mip mapping due to the increase in distance.
This commit is contained in:
parent
412387cc71
commit
fc7c8601e6
|
@ -159,9 +159,9 @@ class Applet(pyglet.window.Window):
|
|||
elif symbol == key.NUM_DIVIDE:
|
||||
self.speed -= 10
|
||||
elif symbol == key.PAGEUP:
|
||||
self.speed += 100
|
||||
self.speed += 1000
|
||||
elif symbol == key.PAGEDOWN:
|
||||
self.speed -= 100
|
||||
self.speed -= 1000
|
||||
elif symbol == key.I:
|
||||
self.info = not self.info
|
||||
elif symbol == key.D:
|
||||
|
|
|
@ -213,7 +213,7 @@ def load_texture(file):
|
|||
filter = GL_NEAREST if badcard else GL_LINEAR
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter)
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter)
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, mode, width, height, 0, mode2, GL_UNSIGNED_BYTE, texture)
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, len(raw.format), width, height, mode2, GL_UNSIGNED_BYTE, texture)
|
||||
|
||||
cache[file] = id
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"au": 10000,
|
||||
"planets": {
|
||||
"earth": {
|
||||
"texture": ["earth.jpg", "earth_medium.jpg", "earth_small.jpg", [0, 0.28, 1, 1]],
|
||||
"radius": 100,
|
||||
"z": "2 * AU",
|
||||
"z": "AU",
|
||||
"pitch": -90,
|
||||
"yaw": 23.4,
|
||||
"roll": -90,
|
||||
|
@ -15,8 +16,8 @@
|
|||
"satellites": {
|
||||
"moon": {
|
||||
"texture": ["moon.jpg", "moon_medium.jpg", "moon_small.jpg", [0.53, 0.53, 0.53, 1]],
|
||||
"radius": 25,
|
||||
"distance": 200,
|
||||
"radius": 27.25,
|
||||
"distance": 603.357,
|
||||
"orbit_speed": 1,
|
||||
"eccentricity": 0.0549,
|
||||
"inclination": 5.145,
|
||||
|
@ -25,41 +26,42 @@
|
|||
},
|
||||
"iss": {
|
||||
"model": "satellites/iss.obj",
|
||||
"inclination": 51.65,
|
||||
"distance": 110,
|
||||
"scale": 10
|
||||
"scale": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"mars": {
|
||||
"texture": ["mars.jpg", "mars_small.jpg", "mars_medium.jpg", [0.85, 0.47, 0.2, 1]],
|
||||
"radius": 80,
|
||||
"z": "4 * AU",
|
||||
"radius": 53.3,
|
||||
"z": "1.524 * AU",
|
||||
"pitch": -90,
|
||||
"yaw": 25.19
|
||||
},
|
||||
"jupiter": {
|
||||
"texture": ["jupiter.jpg", "jupiter_medium.jpg", "jupiter_small.jpg", [0.65, 0.36, 0.19, 1]],
|
||||
"radius": 150,
|
||||
"z": "6 * AU",
|
||||
"radius": 1120,
|
||||
"z": "5.2 * AU",
|
||||
"pitch": -90,
|
||||
"yaw": 3.13
|
||||
},
|
||||
"saturn": {
|
||||
"texture": ["saturn.jpg", "saturn_medium.jpg", "saturn_small.jpg", [0.9, 0.8, 0.64, 1]],
|
||||
"radius": 140,
|
||||
"z": "8 * AU",
|
||||
"radius": 945,
|
||||
"z": "9.58 * AU",
|
||||
"pitch": -90,
|
||||
"yaw": 26.73,
|
||||
"ring": {
|
||||
"texture": "ring_saturn.png",
|
||||
"distance": 200,
|
||||
"size": 150
|
||||
"distance": 1169,
|
||||
"size": 2247
|
||||
}
|
||||
},
|
||||
"uranus": {
|
||||
"texture": ["uranus.jpg", [0, 0.53, 0.84, 1]],
|
||||
"radius": 130,
|
||||
"z": "10 * AU",
|
||||
"radius": 400,
|
||||
"z": "19.23 * AU",
|
||||
"pitch": -90,
|
||||
"yaw": 97.77,
|
||||
"ring": {
|
||||
|
@ -67,14 +69,14 @@
|
|||
"pitch": 0,
|
||||
"yaw": 0,
|
||||
"roll": 90,
|
||||
"distance": 200,
|
||||
"size": 100
|
||||
"distance": 421,
|
||||
"size": 781
|
||||
}
|
||||
},
|
||||
"neptune": {
|
||||
"texture": ["neptune.jpg", [0.31, 0.49, 0.59, 1]],
|
||||
"radius": 120,
|
||||
"z": "12 * AU",
|
||||
"radius": 388,
|
||||
"z": "30.5 * AU",
|
||||
"pitch": -90,
|
||||
"yaw": 28.32
|
||||
},
|
||||
|
@ -91,7 +93,7 @@
|
|||
}
|
||||
},
|
||||
"start": {
|
||||
"z": "2 * AU - 400",
|
||||
"z": "AU - 400",
|
||||
"yaw": 180
|
||||
}
|
||||
}
|
|
@ -61,7 +61,7 @@ def load_world(file):
|
|||
root = json.load(f, object_pairs_hook=OrderedDict)
|
||||
|
||||
world = World()
|
||||
e = lambda x: eval(str(x), {'__builtins__': None}, {'AU': AU})
|
||||
e = lambda x: eval(str(x), {'__builtins__': None}, {'AU': root.get('au', 2000)})
|
||||
|
||||
if 'start' in root:
|
||||
info = root['start']
|
||||
|
|
Loading…
Reference in a new issue