-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
[2.1.3] Polygon.contains - Cannot read property 'y' of undefined #1267
Comments
pnstickne
added a commit
to pnstickne/phaser
that referenced
this issue
Oct 29, 2014
- Finished conversion of code to 'pairs' points, internally refered to as `_pairs`. - Removed double-usage of `points` and added deprecation in favor of `setTo/getPoints` which better expose the behavior. - Fixed/reverted 1e3c7cf (the toggle is required for this algorithm) - Updated/unified documentation
There was a little regression with the code; some of it had been updated to PIXI's new format, but not all of it. |
photonstorm
added a commit
that referenced
this issue
Oct 29, 2014
…issues (thanks @pnstickne for the original implementation #1267) Polygon.area is now only calculated when the Polygon points list is modified, rather than on every call. Phaser.Polygon can now accept the points list in a variety of formats: Arrays of Points, numbers, objects with public x/y properties or any combination of, or as a parameter list (thanks @pnstickne for the original implementation #1267) Polygon.contains now correctly calculates the result (thanks @pnstickne @BurnedToast #1267)
This is now fixed in the dev branch. Thanks for reporting! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I get an error that can be reproduced with the following snippet:
The error stack is;
Thats Polygon.js line 100
The text was updated successfully, but these errors were encountered: