-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The main win here is reducing the number of allocations. hit() was also doing an intermediate check between the broad-phase search and the _SAT collision test. I believe this increases the amount of work in the common case - Allow results object to be passed to hit() - Flatten the results of _SAT to reduce allocations a bit when hits are found. - Optimize hit a bit to reduce the amount of work done - Remove an intermediate overlap check; it's unnecessary when we're already using broad-phase + SAT - Assume that the collision component always has map - Return as early as possible
- Loading branch information
Showing
2 changed files
with
80 additions
and
67 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