Skip to content

Post FX Blur With Mask on Graphics Loses Position/Scale on Resize #6794

Closed
@seansps

Description

@seansps

Version

  • Phaser Version: 3.80.1
  • Operating system: Win 11/10, MacOS
  • Browser: All

Description

I am creating a mask and applying it to a black overlay. The mask is created from a polygon created via Graphics.
I have the scale mode set to RESIZE. I am noticing that the graphics itself (from which the mask is created) moves/resizes as expected when the window resizes, but the blur effect is not, when the window is resized.

Example Test Code

I was able to recreate with the following: https://jsfiddle.net/942yz5d1/1/

You can see that when you resize the window it warps the polygon.

Additional Information

Please let me know if I am misunderstanding how to use the PostFX! But it does seem like this is a bug, as I would expect the blur on masks to be included in the resize as well? I have tried a number of workarounds such as clearing the postFX on resize, recreating it, etc., and haven’t found one yet. Turning off the blur, the polygon stays the same as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions