Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

examples/mask.py change default image to one with alpha channel#3111

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ankith26 merged 2 commits intopygame:mainfrombrccabral:patch-1
Apr 4, 2022

Conversation

@brccabral
Copy link
Contributor

chimp image has a red background. When calculating collisions, the red background is determining the collision, removing the red background from the chimp image the collisions happen only between chimps, not between backgrounds.

chimp image has a red background. When calculating collisions, the red background is determining the collision, removing the red background from the chimp image the collisions happen only between chimps, not between backgrounds.
Copy link
Contributor

@MyreMylarMyreMylar left a comment

Choose a reason for hiding this comment

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

this will only work for the current default chimp.png, not any other images supplied by a user to the example.

I think a better way to fix it right now is to swap the default image to one of the other example images that has an alpha channel rather than a colour key.

You can do this on line 207, changing it to:

imagename = os.path.join(main_dir, "data", "alien1.png")

@brccabral
Copy link
ContributorAuthor

Done, changed to alien1.png

Copy link
Contributor

@ankith26ankith26 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! 👍 🎉

@illumeillume added bug maskpygame.mask labelsOct 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@MyreMylarMyreMylarMyreMylar approved these changes

@ankith26ankith26ankith26 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

bugexamplesmaskpygame.mask

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

4 participants

@brccabral@MyreMylar@ankith26@illume

[8]ページ先頭

©2009-2025 Movatter.jp