Radial tree + Forces
This commit is contained in:
@@ -23,7 +23,7 @@ export interface Leaf {
|
||||
export function buildSpatialIndex(
|
||||
xs: Float32Array,
|
||||
ys: Float32Array
|
||||
): { sorted: Float32Array; leaves: Leaf[] } {
|
||||
): { sorted: Float32Array; leaves: Leaf[]; order: Uint32Array } {
|
||||
const n = xs.length;
|
||||
const order = new Uint32Array(n);
|
||||
for (let i = 0; i < n; i++) order[i] = i;
|
||||
@@ -109,5 +109,5 @@ export function buildSpatialIndex(
|
||||
sorted[i * 2 + 1] = ys[src];
|
||||
}
|
||||
|
||||
return { sorted, leaves };
|
||||
return { sorted, leaves, order };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user