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

docs: Remove counterclockwise order requirement for PolygonComponent vertices #3352

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

maurovanetti
Copy link
Contributor

Description

The documentation used to require that lists of vertices in PolygonComponent (and its subclass PolygonHitbox) should be in counterclockwise order. This is no more necessary because the implementation is robust: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/geometry/polygon_component.dart#L122-L124

Moreover, the wording was a bit confusing (the example looks clockwise).

The paragraphs mentioning the vertex order were deleted altogether.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • [-] I have updated/added tests for ALL new/updated/fixed functionality.
  • [-] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [-] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Super! Could you update the example (https://github.com/flame-engine/flame/pull/3352/files#diff-69918961dcf0b9a380cc0a2d928308d19b63ce9ec8b6e69ee2e88d41792a03e2R1070-R1080) so that it has the correct "walls" in the comment too? Maybe the picture should be removed all together since that one is wrong too.

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Thanks!!

@spydon spydon enabled auto-merge (squash) October 24, 2024 15:14
@maurovanetti
Copy link
Contributor Author

Good. I didn't realise those bits were wrong actually. Now I get what confused me in the first place!

@spydon spydon merged commit 14b8801 into flame-engine:main Oct 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants