mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-17 12:10:47 +02:00
refactor
This commit is contained in:
@@ -202,15 +202,12 @@ function neighbor_compatibilities(sample, x, y, width, height) =
|
|||||||
[for(dir = neighbor_dirs(x, y, width, height)) [me, sample[y + dir[1]][x + dir[0]], dir]];
|
[for(dir = neighbor_dirs(x, y, width, height)) [me, sample[y + dir[1]][x + dir[0]], dir]];
|
||||||
|
|
||||||
function compatibilities_of_tiles(sample, width, height) =
|
function compatibilities_of_tiles(sample, width, height) =
|
||||||
let(
|
hashset([
|
||||||
neighbor_compatibilities_lt = [
|
for(y = [0:height - 1])
|
||||||
for(y = [0:height - 1])
|
for(x = [0:width - 1])
|
||||||
for(x = [0:width - 1])
|
for(c = neighbor_compatibilities(sample, x, y, width, height))
|
||||||
for(c = neighbor_compatibilities(sample, x, y, width, height))
|
c
|
||||||
c
|
]);
|
||||||
]
|
|
||||||
)
|
|
||||||
hashset(neighbor_compatibilities_lt);
|
|
||||||
|
|
||||||
width = len(sample[0]);
|
width = len(sample[0]);
|
||||||
height = len(sample);
|
height = len(sample);
|
||||||
|
Reference in New Issue
Block a user