The problem seems to be that the module expects the cells to be oriented the same. This, however isn't the case in the example, but it is also nowhere noted that the library expects this. If one fixes the orientation in the input (using e.g. var cells = [[0,1,2], [3,2,1]];), the expected result shows up.
The example given in the readme file does not work:
results in
but according to the reamde it should result in
The problem seems to be that the module expects the cells to be oriented the same. This, however isn't the case in the example, but it is also nowhere noted that the library expects this. If one fixes the orientation in the input (using e.g.
var cells = [[0,1,2], [3,2,1]];
), the expected result shows up.