seems better...
This commit is contained in:
parent
0839b30015
commit
3fd7bbbc71
BIN
1564079479.png
Normal file
BIN
1564079479.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
1564198335.png
Normal file
BIN
1564198335.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
@ -56,36 +56,6 @@ merge = (A, B, d) ->
|
|||||||
love.load = ->
|
love.load = ->
|
||||||
love.window.setMode size, size
|
love.window.setMode size, size
|
||||||
|
|
||||||
for h = 0, size
|
|
||||||
colors[h] = {}
|
|
||||||
for t = 0, size
|
|
||||||
colors[h][t] = { 0, 0, 0, 1 }
|
|
||||||
|
|
||||||
max = 0
|
|
||||||
for name, biome in pairs biomes
|
|
||||||
for h = 0, size
|
|
||||||
for t = 0, size
|
|
||||||
v = 1 - math.sqrt d2({biome.h, biome.t}, {h/size, t/size})
|
|
||||||
color = colors[h][t]
|
|
||||||
color[1] += biome[1] * v
|
|
||||||
color[2] += biome[2] * v
|
|
||||||
color[3] += biome[3] * v
|
|
||||||
max = color[1] if color[1] > max
|
|
||||||
max = color[2] if color[2] > max
|
|
||||||
max = color[3] if color[3] > max
|
|
||||||
-- print color[1], color[2], color[3], color[4]
|
|
||||||
|
|
||||||
for h = 0, size
|
|
||||||
for t = 0, size
|
|
||||||
color = colors[h][t]
|
|
||||||
color[1] /= max
|
|
||||||
color[2] /= max
|
|
||||||
color[3] /= max
|
|
||||||
|
|
||||||
if true return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for h = 0, size
|
for h = 0, size
|
||||||
colors[h] = {}
|
colors[h] = {}
|
||||||
for t = 0, size
|
for t = 0, size
|
||||||
|
Loading…
Reference in New Issue
Block a user