-
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:zouyaoji/vue-cesium into dev
- Loading branch information
Showing
5 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
* @Date: 2023-05-26 13:30:22 | ||
* @Description: Do not edit | ||
* @LastEditors: zouyaoji [email protected] | ||
* @LastEditTime: 2023-07-28 14:58:36 | ||
* @FilePath: \vue-cesium@next\packages\shared\src\PrimitiveCluster.ts | ||
* @LastEditTime: 2024-04-02 00:43:38 | ||
* @FilePath: \vue-cesium\packages\shared\src\PrimitiveCluster.ts | ||
*/ | ||
import { defaultValue } from '@vue-cesium/utils/util' | ||
import KDBush from 'kdbush' | ||
|
@@ -633,7 +633,11 @@ function createDeclutterCallback(entityCluster) { | |
let collection | ||
let collectionIndex | ||
|
||
const index = new KDBush(points, getX, getY, 64, Int32Array) | ||
const index = new KDBush(points.length, 64, Int32Array) | ||
for (let i = 0; i < points.length; i++) { | ||
index.add(points[i].coord.x, points[i].coord.y) | ||
} | ||
index.finish() | ||
|
||
if (currentHeight < previousHeight) { | ||
length = clusters.length | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters