microboard-temp 0.5.35 → 0.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.js +7 -8
- package/dist/cjs/index.js +7 -8
- package/dist/cjs/node.js +7 -8
- package/dist/esm/browser.js +7 -8
- package/dist/esm/index.js +7 -8
- package/dist/esm/node.js +7 -8
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -21044,14 +21044,13 @@ class SpatialIndex {
|
|
|
21044
21044
|
return this.Mbr;
|
|
21045
21045
|
}
|
|
21046
21046
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
21047
|
-
const
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
})
|
|
21053
|
-
|
|
21054
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
21047
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
21048
|
+
nearestItems.sort((aa, bb) => {
|
|
21049
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
21050
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
21051
|
+
return distA - distB;
|
|
21052
|
+
});
|
|
21053
|
+
return nearestItems.slice(0, maxItems);
|
|
21055
21054
|
}
|
|
21056
21055
|
list() {
|
|
21057
21056
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
package/dist/cjs/index.js
CHANGED
|
@@ -21044,14 +21044,13 @@ class SpatialIndex {
|
|
|
21044
21044
|
return this.Mbr;
|
|
21045
21045
|
}
|
|
21046
21046
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
21047
|
-
const
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
})
|
|
21053
|
-
|
|
21054
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
21047
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
21048
|
+
nearestItems.sort((aa, bb) => {
|
|
21049
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
21050
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
21051
|
+
return distA - distB;
|
|
21052
|
+
});
|
|
21053
|
+
return nearestItems.slice(0, maxItems);
|
|
21055
21054
|
}
|
|
21056
21055
|
list() {
|
|
21057
21056
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
package/dist/cjs/node.js
CHANGED
|
@@ -23516,14 +23516,13 @@ class SpatialIndex {
|
|
|
23516
23516
|
return this.Mbr;
|
|
23517
23517
|
}
|
|
23518
23518
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
23519
|
-
const
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
})
|
|
23525
|
-
|
|
23526
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
23519
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
23520
|
+
nearestItems.sort((aa, bb) => {
|
|
23521
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
23522
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
23523
|
+
return distA - distB;
|
|
23524
|
+
});
|
|
23525
|
+
return nearestItems.slice(0, maxItems);
|
|
23527
23526
|
}
|
|
23528
23527
|
list() {
|
|
23529
23528
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
package/dist/esm/browser.js
CHANGED
|
@@ -20890,14 +20890,13 @@ class SpatialIndex {
|
|
|
20890
20890
|
return this.Mbr;
|
|
20891
20891
|
}
|
|
20892
20892
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
20893
|
-
const
|
|
20894
|
-
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
})
|
|
20899
|
-
|
|
20900
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
20893
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
20894
|
+
nearestItems.sort((aa, bb) => {
|
|
20895
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
20896
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
20897
|
+
return distA - distB;
|
|
20898
|
+
});
|
|
20899
|
+
return nearestItems.slice(0, maxItems);
|
|
20901
20900
|
}
|
|
20902
20901
|
list() {
|
|
20903
20902
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
package/dist/esm/index.js
CHANGED
|
@@ -20883,14 +20883,13 @@ class SpatialIndex {
|
|
|
20883
20883
|
return this.Mbr;
|
|
20884
20884
|
}
|
|
20885
20885
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
20886
|
-
const
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
|
|
20891
|
-
})
|
|
20892
|
-
|
|
20893
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
20886
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
20887
|
+
nearestItems.sort((aa, bb) => {
|
|
20888
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
20889
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
20890
|
+
return distA - distB;
|
|
20891
|
+
});
|
|
20892
|
+
return nearestItems.slice(0, maxItems);
|
|
20894
20893
|
}
|
|
20895
20894
|
list() {
|
|
20896
20895
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
package/dist/esm/node.js
CHANGED
|
@@ -23350,14 +23350,13 @@ class SpatialIndex {
|
|
|
23350
23350
|
return this.Mbr;
|
|
23351
23351
|
}
|
|
23352
23352
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
23353
|
-
const
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
})
|
|
23359
|
-
|
|
23360
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
23353
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
23354
|
+
nearestItems.sort((aa, bb) => {
|
|
23355
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
23356
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
23357
|
+
return distA - distB;
|
|
23358
|
+
});
|
|
23359
|
+
return nearestItems.slice(0, maxItems);
|
|
23361
23360
|
}
|
|
23362
23361
|
list() {
|
|
23363
23362
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|