mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 03:08:29 +02:00
fixed division by 0 error, minimum color will be a bit more white
This commit is contained in:
parent
a460298a12
commit
925ca86c8d
1 changed files with 5 additions and 1 deletions
|
@ -44,6 +44,10 @@ def get_display(scene_data: tuple) -> Image:
|
|||
|
||||
pix = glReadPixels(0, 0, *display, GL_RGB, GL_UNSIGNED_BYTE)
|
||||
image = Image.frombytes(mode="RGB", size=display, data=pix)
|
||||
|
||||
pygame.display.quit()
|
||||
pygame.quit()
|
||||
|
||||
return image
|
||||
|
||||
|
||||
|
@ -65,7 +69,7 @@ def draw_model(scene_scale, scene_trans, scene):
|
|||
elif height < min_height:
|
||||
min_height = height
|
||||
|
||||
min_height -= (max_height - min_height) // 4
|
||||
min_height -= (max_height - min_height) // 3
|
||||
|
||||
glBegin(GL_TRIANGLES)
|
||||
for face in mesh.faces:
|
||||
|
|
Loading…
Reference in a new issue