Ajit Posted May 10, 2019 Share Posted May 10, 2019 I want to restrict the size of the applied filter on canvas. In the below codepen i have set the displacement filter and moving it according mouse position. But the problem is it's covering entire background. I want to fix the size of the filter. I'm new the Pixijs and any help is appreciated. https://codepen.io/ajitcj/pen/yWOaaY ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 10, 2019 Share Posted May 10, 2019 In v4 there's that plugin that allows to apply filter to any part of screen: https://github.com/pixijs/pixi-picture Demo: https://gameofbombs.github.io/examples-heaven/?v=v4.8.7#/picture/displacement-backdrop.js Unfortunately, its not ported to v5 yet, so you have to wait a week or two or get back to 4.8.7 Ajit 1 Quote Link to comment Share on other sites More sharing options...
Ajit Posted May 11, 2019 Author Share Posted May 11, 2019 Hi Ivan, Thanks for the reply. I got it working with the pixijs v5. I had to use bounding rectangle to make it work. Here is the working codepen https://codepen.io/ajitcj/pen/yWOaaY ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 12, 2019 Share Posted May 12, 2019 Oh, I over-estimated the problem. Of course bounding rectangle works, I recommended that to other people Its not good if you have 20+ filters on fullscreen but just for one its fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.