You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: remove rbush dependency
Removes the `rbush` dependency and all related logic from the codebase.
This includes:
- Deleting the `RBushNode` component.
- Removing `rbush` logic from `CanvasRendererPlugin` and `SelectablePlugin`.
- Updating documentation to remove mentions of `rbush`.
* fix(lint): fix linting errors
Removes unused imports from `CanvasRendererPlugin.ts` and fixes a Prettier error.
* chore: fix lint error
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: wang1212 <mrwang1212@126.com>
Copy file name to clipboardExpand all lines: site/docs/api/builtin-objects/document.en.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,7 +190,7 @@ Area queries, especially boundingbox-based detection, are particularly useful in
190
190
- Dirty rectangle rendering for determining the affected area
191
191
- Rectangle swiping for batch selection of graphics
192
192
193
-
This type of wraparound box-based detection does not need to be too precise, and is fast with spatial indexing like internal RBush.
193
+
This type of wraparound box-based detection does not need to be too precise, and is fast.
194
194
195
195
This method is synchronous and accepts the enclosing box description `minX, minY, maxX, maxY` coordinates (under [Canvas coordinate system](/en/api/canvas/coordinates#canvas)).
In the above intersection and region query, we can reuse the optimizations in the culling scheme, such as the acceleration structure. In the implementation we use [RBush](https://github.com/mourner/rbush).
70
+
In the above intersection and region query, we can reuse the optimizations in the culling scheme, such as the acceleration structure.
71
71
72
72
Obviously, when the number of dynamically changing objects is too large, this optimization becomes meaningless, as the "dirty rectangle" is almost equal to the whole canvas after some calculations, so it is better to just empty and redraw all objects. So 2D game rendering engines like Pixi.js, for example, are [not considered built-in](https://github.com/pixijs/pixi.js/issues/3503).
0 commit comments