MCPcopy Index your code
hub / github.com/pyscript/pyscript / crossfade_height_map

Function crossfade_height_map

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

Source from the content-addressed store, hash-verified

42 i += 1
43
44def crossfade_height_map():
45 for y in range(grid_hs):
46 for x in range(crossfade_range):
47 pos_i = y*grid_ws + x
48 neg_i = y*grid_ws + grid_ws - crossfade_range + x
49 weight = x/crossfade_range
50 old_pos = height_map[pos_i]
51 old_neg = height_map[neg_i]
52 height_map[neg_i] = height_map[pos_i] = weight * old_pos + (1.0 - weight) * old_neg
53
54
55def _crossfade_height_map():

Callers 1

worker.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected