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

fix: force strict check for group variable in UniformGroup #9454

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

miltoncandelero
Copy link
Contributor

Description of change

This aims to solve #9414 where safari invented the group method in arrays and that made it so arrays now were detected as UniformGroups.

I achieved this by trying to find every place that a UniformGroup is used and where we check for the group variable and forced an strict check with true. By doing this, truthy values are not enough, we must have that value set to true.

I would like for somebody with more knowledge on UniformGroup code to see if I missed anything and if my solution makes sense.

This aims to solve pixijs#9414 where safari invented the group method in arrays and that made it so arrays now were detected as UniformGroups
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 2, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c1bff66:

Sandbox Source
pixi.js-sandbox Configuration

@bigtimebuddy
Copy link
Member

Nice fix. Could you add an inline comment about this? === true is not typical stylistically, so would help someone not stomp on this change in the future.

@bigtimebuddy bigtimebuddy added this to the v7.3.0 milestone Jun 2, 2023
Copy link
Member

@bigtimebuddy bigtimebuddy left a comment

Choose a reason for hiding this comment

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

LGTM, would like to @GoodBoyDigital to weigh-in as he understands the uniform stuff most deeply.

Copy link
Member

@GoodBoyDigital GoodBoyDigital left a comment

Choose a reason for hiding this comment

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

this is cool, i wander would it be less magical and error prone if we just renamed group property to isUniformGroup ?

@Zyie Zyie linked an issue Jun 14, 2023 that may be closed by this pull request
@Zyie
Copy link
Member

Zyie commented Jun 21, 2023

this is cool, i wander would it be less magical and error prone if we just renamed group property to isUniformGroup ?

We have renamed this in v8, so this can be merged as is and avoid any breaking changes / deprecations

@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Jun 21, 2023
@bigtimebuddy bigtimebuddy merged commit 84334d9 into pixijs:dev Jul 6, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: CRIT! Safari 16.4+ Array uniforms upload
4 participants