MCPcopy Create free account
hub / github.com/pyscript/pyscript / update_height_map

Function update_height_map

core/tests/manual/issue-2302/worker.py:33–42  ·  view source on GitHub ↗
(z)

Source from the content-addressed store, hash-verified

31]
32
33def update_height_map(z):
34 i = 0
35 for y in range(0, grid_h, grid_scale):
36 for x in range(0, grid_w, grid_scale):
37 # 3 octaves of noise
38 n = perlin3(x/noise_factor, y/noise_factor, z)
39 n += 0.50 * perlin3(2*x/noise_factor, 2*y/noise_factor, z)
40 n += 0.25 * perlin3(4*x/noise_factor, 4*y/noise_factor, z)
41 height_map[i] = n
42 i += 1
43
44def crossfade_height_map():
45 for y in range(grid_hs):

Callers 1

worker.pyFile · 0.85

Calls 1

perlin3Function · 0.90

Tested by

no test coverage detected