Skip to content

Move isTouching logic to updateCPURenderAttributes #664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

adroitwhiz
Copy link
Contributor

Resolves

Resolves #663

Proposed Changes

This PR changes Drawable.isTouching to be reassigned to different functions by updateCPURenderAttributes depending on whether useNearest is true at the drawable's current scale.

Reason for Changes

This nearly doubles performance of "touching sprite" according to this project.

Test Coverage

All existing tests pass (hopefully)

Copy link
Contributor

@fsih fsih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"touching (sprite)" could be faster
3 participants