Skip to content

用空间索引加速拾取

当光标附近有大量包围盒重叠时,拾取需要接近 O(log n) 的候选筛选,再去做精确判断。本示例对应 第 6 课 — 事件系统第 8 课 — 性能优化 中的交互与调优思路。

适合用来排查「点不中」或悬浮卡顿等问题。

我们可以使用 RBush 加速拾取,详见:性能优化

total: 0   culled: 0   Add 500 circles

Released under the MIT License.