mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add world generator level 2 (heightmaps)
This commit is contained in:
parent
8268176527
commit
8516cf4f7f
3 changed files with 17 additions and 10 deletions
|
|
@ -112,10 +112,10 @@ local function _generate_biome_parameters(x, y, w, h, seed, s)
|
|||
end
|
||||
|
||||
function generate_biome_parameters(x, y, w, h, seed)
|
||||
local bpd = 4
|
||||
local bpd = 8
|
||||
local tmap, hmap = _generate_biome_parameters(
|
||||
math.floor(x/bpd), math.floor(y/bpd),
|
||||
math.floor(w/bpd)+1, math.floor(h/bpd)+1, seed, bpd)
|
||||
math.floor(w/bpd)+1, math.floor(h/bpd)+1, seed, bpd)
|
||||
tmap:resize(w+bpd, h+bpd, 'linear')
|
||||
tmap:crop(0, 0, w, h)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue