feat: generateRegiments

This commit is contained in:
Azgaar 2022-11-04 01:18:37 +03:00
parent 3f7f0c4826
commit c3298ade47
13 changed files with 283 additions and 36 deletions

View file

@ -68,7 +68,7 @@ export function repackGrid(grid: IGrid) {
...cells,
p: newCells.p,
g: createTypedArray({maxValue: grid.points.length, from: newCells.g}),
q: d3.quadtree(newCells.p.map(([x, y], i) => [x, y, i])) as unknown as Quadtree,
q: d3.quadtree(newCells.p.map(([x, y], i) => [x, y, i])),
h: new Uint8Array(newCells.h),
area: createTypedArray({maxValue: UINT16_MAX, from: cells.i}).map(getCellArea)
}