Skip to content

Conversation

midiusRed
Copy link
Contributor

@midiusRed midiusRed commented Feb 14, 2025

ShapeBuilder includes 2 methods: build, triangulate. Using the buildRectangle example, we see that there is a check !(width >= 0 && height >= 0). In this case, the points are not added, and then triangulate (which adds undefined) is performed and BatchableGraphics is created for the discarded primitive. I suggest an option in which build decides what to do with the primitive, and if it is incorrect, false will be returned. In this case, we will not add BatchableGraphics and run this primitive in pipe.

Copy link

codesandbox-ci bot commented Feb 14, 2025

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 4624e6a:

Sandbox Source
pixi.js-sandbox Configuration

@midiusRed midiusRed changed the title ShapeBuilder.build > boolean ShapeBuilder.build result Feb 14, 2025
@GoodBoyDigital
Copy link
Member

ooh, yes - i like the idea here!

@GoodBoyDigital
Copy link
Member

would you be able to add some tests around this please?

@midiusRed
Copy link
Contributor Author

Added tests, finalized the code and fixed the problem with GpuContext.isBatchable when the 'batch' mode is set

@midiusRed midiusRed changed the title ShapeBuilder.build result feat: The build (Shape Builder) method should report its success Mar 2, 2025
@midiusRed midiusRed changed the title feat: The build (Shape Builder) method should report its success feat: The build (ShapeBuilder) method should report its success Mar 2, 2025
@Zyie Zyie requested a review from GoodBoyDigital March 13, 2025 09:34
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.

nice work @midiusRed !

@GoodBoyDigital GoodBoyDigital 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 May 9, 2025
@Zyie Zyie removed 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 May 9, 2025
@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 2, 2025
@Zyie Zyie added this pull request to the merge queue Jun 2, 2025
Merged via the queue into pixijs:dev with commit 5a4e718 Jun 2, 2025
4 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.

4 participants