Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Astropulse/hexmap
/ functions
Functions
46 in github.com/Astropulse/hexmap
⨍
Functions
46
◇
Types & classes
1
↓ 16 callers
Function
noise_field
(cfg: Config, seed_off: int, scale: int, octaves: int, smooth: int = 0)
map.py:373
↓ 13 callers
Function
hex_neighbors
(r: int, c: int, rows: int, cols: int)
map.py:211
↓ 11 callers
Function
hash01
(seed: int, r: int, c: int, tag: str)
map.py:206
↓ 9 callers
Function
normalize01
(a: np.ndarray)
map.py:256
↓ 7 callers
Function
push
(r: int, c: int)
map.py:410
↓ 6 callers
Function
hex_bfs_distance
(mask_sources: np.ndarray)
map.py:387
↓ 4 callers
Function
ridged01
(n01: np.ndarray)
map.py:279
↓ 4 callers
Function
smooth_box
(a: np.ndarray, passes: int)
map.py:264
↓ 2 callers
Function
_rand_grid
(seed: int, gh: int, gw: int)
map.py:283
↓ 2 callers
Function
cluster_once
(cfg: Config, tilemap: np.ndarray, mask: np.ndarray, tag: str)
map.py:706
↓ 2 callers
Function
fbm
(shape: tuple[int, int], seed: int, base_scale: int, octaves: int, p: float, lac: float)
map.py:348
↓ 2 callers
Function
fbm_aniso
(shape: tuple[int, int], seed: int, base_sy: int, base_sx: int, octaves: int, p: float, lac: float)
map.py:360
↓ 2 callers
Function
neighbor_count
(mask: np.ndarray, r: int, c: int)
map.py:460
↓ 2 callers
Function
rdeg
(r: int, c: int)
map.py:634
↓ 2 callers
Function
warp_int
(a: np.ndarray, wx: np.ndarray, wy: np.ndarray)
map.py:378
↓ 1 callers
Function
_connected_components_hex
(mask: np.ndarray)
map.py:966
↓ 1 callers
Function
_hex_corners
(cx: float, cy: float, size: float, orientation: str)
map.py:1069
↓ 1 callers
Function
_pick_single_desert_seven
(cfg: Config, tilemap: np.ndarray)
map.py:990
↓ 1 callers
Function
_sample_catan_number_no7
(cfg: Config, r: int, c: int)
map.py:1017
↓ 1 callers
Function
add_dunes_in_sand_bodies
(cfg: Config, tilemap: np.ndarray, land_mask: np.ndarray)
map.py:735
↓ 1 callers
Function
add_lakes
(cfg: Config, elev: np.ndarray, land: np.ndarray, dist_to_water: np.ndarray, dist_to_mtn: np.ndarray)
map.py:569
↓ 1 callers
Function
apply_ocean_depths
(cfg: Config, tilemap: np.ndarray, ocean: np.ndarray, lakes: np.ndarray, dist_to_land: np.ndarray)
map.py:661
↓ 1 callers
Function
build_fields
(cfg: Config)
map.py:507
↓ 1 callers
Function
build_mountains
(cfg: Config, land: np.ndarray, elev: np.ndarray, peaks: np.ndarray, ridges: np.ndarray, temp: np.ndarray)
map.py:548
↓ 1 callers
Function
build_numbers
Numbers grid rules: - Tiles in NON_RESOURCE_TILES get number 0, except: - Exactly one (and only one) 7 exists, placed on a tile inside
map.py:1025
↓ 1 callers
Function
build_tilemap
(cfg: Config)
map.py:755
↓ 1 callers
Function
carve_rivers
(cfg: Config, elev: np.ndarray, land: np.ndarray, dist_to_water: np.ndarray, peaks: np.ndarray, ridges: np.nda
map.py:584
↓ 1 callers
Function
center_for
(r: int, c: int)
map.py:1163
↓ 1 callers
Function
cluster
(cfg: Config, tilemap: np.ndarray, land_mask: np.ndarray)
map.py:728
↓ 1 callers
Function
elevation_to_dy
(cfg: Config, e_smooth: float, is_ocean: bool)
map.py:891
↓ 1 callers
Function
enforce_dy_limit
(cfg: Config, dy: np.ndarray, ocean_only: np.ndarray)
map.py:899
↓ 1 callers
Function
flood_keep
(mask: np.ndarray, seeds: np.ndarray)
map.py:429
↓ 1 callers
Function
load_tiles
(folder: str = "Tiles")
map.py:223
↓ 1 callers
Function
main
()
map.py:1198
↓ 1 callers
Function
ocean_connected_hex
(water: np.ndarray)
map.py:405
↓ 1 callers
Function
pick_variant
(tiles: dict[str, list[Image.Image]], t: str, seed: int, r: int, c: int)
map.py:248
↓ 1 callers
Function
prune_rivers
(cfg: Config, river: np.ndarray, water: np.ndarray)
map.py:630
↓ 1 callers
Function
prune_specks
(cfg: Config, mask: np.ndarray, tag: str, passes: int, kill_prob: float = 0.70)
map.py:464
↓ 1 callers
Function
render_hex_map
(cfg: Config, tiles: dict[str, list[Image.Image]], tilemap: np.ndarray, dy: np.ndarray, out_path: str)
map.py:947
↓ 1 callers
Function
save_land_displacement_png
Render dy[land] as a grayscale hex map (L mode PNG). Higher displacement becomes lighter. Ocean (non-land) is 0 (black). orientation
map.py:1087
↓ 1 callers
Function
save_map_json
(cfg: Config, tilemap: np.ndarray, dy: np.ndarray, numbers: np.ndarray, path: str)
map.py:1051
↓ 1 callers
Function
swamp_variant
(seed: int, r: int, c: int)
map.py:451
↓ 1 callers
Function
thin_mountains
(cfg: Config, mtn: np.ndarray, ridges: np.ndarray)
map.py:485
↓ 1 callers
Function
value_noise_2d
(shape: tuple[int, int], seed: int, scale: int)
map.py:287
↓ 1 callers
Function
value_noise_2d_aniso
(shape: tuple[int, int], seed: int, sy: int, sx: int)
map.py:317
↓ 1 callers
Function
water_break
(cfg: Config)
map.py:446