mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-21 22:49:44 +01:00
rename
This commit is contained in:
parent
7c613930d5
commit
a0d4d732a7
@ -154,7 +154,7 @@ function tilemap_wf(tm) = tm[3];
|
||||
function check_compatibilities(compatibilities, tile1, tile2, direction) =
|
||||
hashset_has(compatibilities, [tile1, tile2, direction]);
|
||||
|
||||
function tilemap_propagate(w, h, compatibilities, wf, x, y) =
|
||||
function propagate(w, h, compatibilities, wf, x, y) =
|
||||
_propagate(
|
||||
w,
|
||||
h,
|
||||
@ -204,15 +204,15 @@ function _doDirs(compatibilities, wf, stack, cx, cy, current_tiles, dirs, leng,
|
||||
)
|
||||
_doDirs(compatibilities, wf_stack[0], wf_stack[1], cx, cy, current_tiles, dirs, leng, i + 1);
|
||||
|
||||
function _generate(w, h, compatibilities, wf, notCollaspedCoords) =
|
||||
function generate(w, h, compatibilities, wf, notCollaspedCoords) =
|
||||
len(notCollaspedCoords) == 0 ? collapsed_tiles(wf) :
|
||||
let(
|
||||
min_coord = wf_coord_min_entropy(wf, notCollaspedCoords),
|
||||
x = min_coord.x,
|
||||
y = min_coord.y,
|
||||
nwf = tilemap_propagate(w, h, compatibilities, wf_collapse(wf, x, y), x, y)
|
||||
nwf = propagate(w, h, compatibilities, wf_collapse(wf, x, y), x, y)
|
||||
)
|
||||
_generate(w, h, compatibilities, nwf, wf_not_collapsed_coords(nwf));
|
||||
generate(w, h, compatibilities, nwf, wf_not_collapsed_coords(nwf));
|
||||
|
||||
|
||||
function neighbor_dirs(x, y, width, height) = [
|
||||
|
@ -11,7 +11,7 @@ function tile_wfc(size, sample) =
|
||||
w = tilemap_width(tm),
|
||||
h = tilemap_height(tm),
|
||||
compatibilities = tilemap_compatibilities(tm),
|
||||
first_collasped_propagated = tilemap_propagate(
|
||||
first_collasped_propagated = propagate(
|
||||
w,
|
||||
h,
|
||||
compatibilities,
|
||||
@ -21,7 +21,7 @@ function tile_wfc(size, sample) =
|
||||
),
|
||||
notCollapsedCoords = wf_not_collapsed_coords(first_collasped_propagated)
|
||||
)
|
||||
_generate(w, h, compatibilities, first_collasped_propagated, notCollapsedCoords);
|
||||
generate(w, h, compatibilities, first_collasped_propagated, notCollapsedCoords);
|
||||
|
||||
/*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user