I am new to PIXI and as a former Flash developer, I am greatly enjoying learning it, as the concepts are quite similar! 🙂
I recently came up against a stumbling block, which I hope a kind soul here may help me resolve:
I'm trying to reproduce what one sees when looking through a camera's viewfinder.
In order to achieve this, I am attempting to blur only a circular portion at the center of the stage. While this works as expected when I add a single blurred container and its corresponding mask, as children of the stage, the moment I add a "crisp" (non-blurred) version of the same container, I don't get what I would expect: i.e. the blurred circular portion overlaid over the non-blurred container. Instead, the masked, blurred version gets overriden and I only see the crisp version.
Building off a CodePen generously provided by OSUblake from the GreenSock forums, I put together this CodePen to illustrate the problem: https://codepen.io/montoyland/pen/zYvWLzv
(Uncomment the line in question, noted in the comments, to see what I mean).
What would be the proper way to achieve what I am trying to do? I have seen from examples that other filters (such as the DisplacementFilter) can be constrained to a discreet area on the canvas, so I assume the same can be done with the BlurFilter while still coexisting with other containers on the stage. What I am missing?
Thank you so much for your help!