You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an interesting bug while making a reveal effect :
I'm drawing into a RenderTexture and I used a sprite base on it as a mask on another sprite this.drawingSurface2 = new Sprite(this.renderTexture); this.foregroundImage.mask = this.drawingSurface2;
When the sprite is assigned to a mask like this.foregroundImage.mask = this.drawingSurface2;
then the mask will not be updated in the futur and the drawing effect not work
if some drawing was already done they will show but will not be update in the futur
The workaround i'm using here is to add two sprite based on the same renderTexture, one with alpha=0 and the other as the mask.
This way the renderTarget is correctly updated and the mask is working well :
heya, tried recreating this in the playground - can you verify im doing the right thing pls?
Cheers man!
Zyie
added
👯♀️ Needs Reproduction
Very common: basically need an example that reproduces the issue so that it's easier to identify.
🧰 Needs Verification
PRs require an example to prove that it was fixed. Can also be a unit-test.
and removed
👯♀️ Needs Reproduction
Very common: basically need an example that reproduces the issue so that it's easier to identify.
🧰 Needs Verification
PRs require an example to prove that it was fixed. Can also be a unit-test.
labels
May 23, 2024
Current Behavior
I got an interesting bug while making a reveal effect :
I'm drawing into a RenderTexture and I used a sprite base on it as a mask on another sprite
this.drawingSurface2 = new Sprite(this.renderTexture);
this.foregroundImage.mask = this.drawingSurface2;
When the sprite is assigned to a mask like
this.foregroundImage.mask = this.drawingSurface2;
The workaround i'm using here is to add two sprite based on the same renderTexture, one with alpha=0 and the other as the mask.
This way the renderTarget is correctly updated and the mask is working well :
Full example
Expected Behavior
Not having to add the sprite twice and the mask still correctly updated.
Steps to Reproduce
Environment
pixi.js
version: 8.10Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: