Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Jan 18, 2025
1 parent 5a0bc0e commit eb28d87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/generate_map_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

# pylint: disable=R0911
def _get_color(height: float, max_height: float):
# NOTE: if you generate multiple chunks:
# make sure to set this 'max_height' once for the whole map so the colors match

factor = 255 / max(1, max_height)
h = height * factor

Expand Down

0 comments on commit eb28d87

Please sign in to comment.