Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor sprite mask system #2369
Refactor sprite mask system #2369
Changes from 41 commits
3ff8a7b
4afe44b
603ba2a
0ae6484
1a89b5d
a5f1ab9
7ad02b4
e97c4aa
2f2615b
47c9c7e
e52b60a
8a48797
a311f2d
9a06859
f6f373b
f6b35a9
47d670a
8c0fc37
e71b5d6
5df85bc
0a09fee
82f7f82
12d40f3
028e4b0
2b92fe1
3d10522
5f50e58
f96f891
ea9e05c
6e6eab5
ce3efed
bd38b58
18ea656
894dff9
f0c6d4b
4f4218d
397ac0e
d29b823
8a34428
61558b1
3fd4e4f
50a7e7e
324c9e5
27e6bf7
1b337e7
a44e230
98efec7
c8be7f1
1f190f0
a5c0445
bc21358
e2efa9d
c320b31
501eb00
a010ade
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 264 in packages/core/src/2d/sprite/SpriteMask.ts
Codecov / codecov/patch
packages/core/src/2d/sprite/SpriteMask.ts#L264
Check warning on line 335 in packages/core/src/2d/sprite/SpriteRenderer.ts
Codecov / codecov/patch
packages/core/src/2d/sprite/SpriteRenderer.ts#L335
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test coverage for material fallback logic
The line
material = this._engine._basicResources.spriteDefaultMaterial;
introduces new logic to handle cases where the material has been destroyed. However, static analysis indicates that this line is not covered by existing tests.Consider adding a unit test to cover this scenario to ensure that the fallback to the default material behaves as expected when the original material is destroyed.
Would you like assistance in creating a test case for this?
🧰 Tools
🪛 GitHub Check: codecov/patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before implement is different!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Incomplete Removal of
DirtyFlag.MaskInteraction
ReferencesThe search revealed multiple remaining references to
DirtyFlag.MaskInteraction
across various test and source files. This indicates that the removal of theMaskInteraction
flag was not fully completed and may lead to potential issues.tests/src/core/SpriteRenderer.test.ts
packages/core/src/RenderPipeline/RenderQueue.ts
packages/core/src/Renderer.ts
packages/core/src/2d/text/TextRenderer.ts
Please address these remaining references to ensure the
DirtyFlag
enum changes are fully integrated and do not cause inconsistencies or errors in the codebase.🔗 Analysis chain
Verify the impact of DirtyFlag enum changes.
The
DirtyFlag
enum has been updated: theMaskInteraction
flag has been removed, and theColor
flag now occupies its previous position (0x10). This change suggests that mask interaction functionality has been removed or significantly altered.Please ensure that:
DirtyFlag.MaskInteraction
have been removed or updated throughout the codebase.DirtyFlag.Color
flag.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 41441
Check warning on line 36 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L36
Check warning on line 41 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L41
Check warning on line 43 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L43
Check warning on line 46 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L46
Check warning on line 48 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L48
Check warning on line 50 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L50
Check warning on line 53 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L53
Check warning on line 60 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L56-L60
Check warning on line 62 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L62
Check warning on line 66 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L66
Check warning on line 71 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L71
Check warning on line 73 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L73
Check warning on line 76 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L76
Check warning on line 78 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L78
Check warning on line 80 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L80
Check warning on line 83 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L83
Check warning on line 94 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L86-L94
Check warning on line 96 in packages/core/src/BasicResources.ts
Codecov / codecov/patch
packages/core/src/BasicResources.ts#L96