places all elements LtR TtB
use placeAll(number of elements)
This commit is contained in:
parent
3a784dc941
commit
65b9187911
|
|
@ -0,0 +1,22 @@
|
|||
zzzz204689123_array = Object.keys(elements);
|
||||
|
||||
function placeAll(limit=zzzz204689123_array.length) {
|
||||
paused = true;
|
||||
counterLol = 0;
|
||||
loop1:
|
||||
for(i = 1; i < height; i++) {
|
||||
loop2:
|
||||
for(j = 1; j < width; j++) {
|
||||
if(isEmpty(j,i)) {
|
||||
if(!zzzz204689123_array[counterLol] || counterLol > limit) {
|
||||
break loop1;
|
||||
};
|
||||
createPixel(zzzz204689123_array[counterLol],j,i);
|
||||
counterLol++;
|
||||
} else {
|
||||
break loop1;
|
||||
}
|
||||
};
|
||||
};
|
||||
paused = true;
|
||||
};
|
||||
Loading…
Reference in New Issue