Accelerate hit-testing with a spatial index
Picking must stay O(log n) or better when thousands of bounds overlap the cursor. This example shows how a spatial index narrows candidates before precise tests, aligned with interaction work in Lesson 6 and performance tuning in Lesson 8.
Use it when debugging “missed clicks” or hover lag on large documents.
We can enhance picking performance with RBush, see: Performace optimazation
total: 0 culled: 0