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: handling of getRenderTarget when passing in a canvas #10507

Merged
merged 2 commits into from May 14, 2024

Conversation

ShukantPal
Copy link
Member

Description of change

Right now, getRenderTarget(canvas) returns null because of how the canvas is converted into a TextureSource.

In the code, getCanvasTexture returns a texture, but the 2 if conditions in getRenderTarget only handle render targets and texture sources.

This change updates it so that a canvas is converted into a canvas source, not a texture.

Copy link

codesandbox-ci bot commented May 4, 2024

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 153578d:

Sandbox Source
pixi.js-sandbox Configuration

@ShukantPal ShukantPal added the 👀 Needs Review PR needs to be reviewed by someone on the core team. label May 5, 2024
@GoodBoyDigital
Copy link
Member

nice catch @ShukantPal !

would you mind adding a unit test pls?

@ShukantPal
Copy link
Member Author

@GoodBoyDigital Done!

@bigtimebuddy bigtimebuddy added ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t and removed 👀 Needs Review PR needs to be reviewed by someone on the core team. labels May 13, 2024
@Zyie Zyie changed the title Fix handling of getRenderTarget when passing in a canvas Fix: handling of getRenderTarget when passing in a canvas May 14, 2024
@Zyie Zyie added the v8 label May 14, 2024
@Zyie Zyie added this pull request to the merge queue May 14, 2024
Merged via the queue into dev with commit 174105d May 14, 2024
4 checks passed
@Zyie Zyie deleted the shukant/fix-get-render-target branch May 14, 2024 07:52
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 v8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants