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
This is happening because the forceEven behavior is true by default. The DynamicTexture wants to resize just once, to the correct size; but it is never allowed to do so, because the target size is not even.
I fixed the issue by instructing the Mask to create its DynamicTexture with forceEven = false. This allows it to complete the resize.
I also added extra parameters to TextureManager#addDynamicTexture for handling forceEven.
Thanks for digging up this one! It was just a case of putting false somewhere in the code, as you identified, but there were a lot of places it could have gone. Mask texture size was the correct place, as a mask may be applied to any resolution of object.
Version
Description
I created a mask filter from a game object and applied it to a sprite (205x300), internal context, then tweened the mask source game object's scale.
The mask seems to render correctly at first but then stops updating.
Example Test Code
https://phaser.io/sandbox/jSwQ4Uzc
Additional Information
updateDynamicTexture()
is calling_dynamicTexture.setSize()
every frame, but_dynamicTexture
isn't being cleared.Removing
forceEven = true
in_dynamicTexture.setSize()
eliminates the problem.The text was updated successfully, but these errors were encountered: