Skip to content

Instantly share code, notes, and snippets.

View Lucent's full-sized avatar

Michael Dayah Lucent

View GitHub Profile
@Lucent
Lucent / declutter_logic.js
Last active August 21, 2018 01:23
Create lists of nonoverlapping plane datablocks
function move_overlaps_higher(overlaps) {
cycle_list[0] = overlaps;
var another_row_needed = true;
for (var cyclerow = 0; another_row_needed; cyclerow++) {
another_row_needed = false;
var this_row = cycle_list[cyclerow];
for (var ident = 0; ident < this_row.length; ident++) {
for (var x = ident - 1; x >= 0; x--) {
if (x < 0) continue;