extract obj_props return { make_ref_grid: (s, scaling) { ref_grid_off = [300, 900] ref_grid_main = ?g ref_grid_center = ?g $.add(obj { OBJ_ID: 211, SCALING: 0.3, X: ref_grid_off[0] + ((s - 1) / 2) * 30 * scaling, Y: ref_grid_off[1] + ((s - 1) / 2) * 30 * scaling, GROUPS: ref_grid_center, }) let ref_grid = [] for x in ..s { let column = [] for y in ..s { group = ?g $.add(obj { OBJ_ID: 211, SCALING: 0.3, X: ref_grid_off[0] + x * 30 * scaling, Y: ref_grid_off[1] + y * 30 * scaling, GROUPS: [group, ref_grid_main], }) column.push(group) } ref_grid.push(column) } return {ref_grid, ref_grid_main, ref_grid_center} }, make_follow_frame: (s) { let follow_frame = [] for x in ..s { let follow_column = [] for y in ..s { follow_column.push(?g) } follow_frame.push(follow_column) } return follow_frame } }