Try to fix skeleton parsing
This commit is contained in:
@@ -87,6 +87,7 @@ def draw_rectangles(rectangles, grid, heightmap):
|
||||
image.putpixel((x, y), round(height_average))
|
||||
return image
|
||||
|
||||
|
||||
def area_of_rectangles(rectangles):
|
||||
area = 0
|
||||
for rectangle in rectangles:
|
||||
@@ -95,7 +96,6 @@ def area_of_rectangles(rectangles):
|
||||
return area
|
||||
|
||||
|
||||
|
||||
def generate_building(image: str | Image.Image, heightmap: str | Image.Image, output: str = './world_maker/data/building.png',
|
||||
number_of_try: int = 3, min_width: int = 10, max_width: int = 25):
|
||||
print("[Building] Start generating building position...")
|
||||
@@ -111,5 +111,3 @@ def generate_building(image: str | Image.Image, heightmap: str | Image.Image, ou
|
||||
rectangles_output = rectangles
|
||||
draw_rectangles(rectangles_output, grid, heightmap).save(output)
|
||||
return rectangles_output
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user