Skip to content
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

Update ArcadeColliderType.js #7095

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ospira
Copy link
Contributor

@ospira ospira commented Apr 2, 2025

This PR

  • Updates the Documentation
  • Fixes a bug

Describe the changes below:

ArcadeColliderType typedef/jsdoc is mildly incorrect. The array versions of this type do not need to be of a single type (see collider code here for example) but rather if it's an array that array can be a mix of any of the various single types, as https://github.com/phaserjs/phaser/blob/master/src/physics/arcade/World.js#L1934 is going to test each member of the array anyway. Note, this still works if you pass an array of a single type, it just doesn't force you to do that, as it isn't actually necessary.

@ospira
Copy link
Contributor Author

ospira commented Apr 2, 2025

note in the diff also some of the individual types were not carried over to the array types prior to this change, i believe that is also incorrect. the array type is now simply an array that can have any of the preceding types of ArcadeColliderType as a member...

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.

2 participants