Ajit

How to restrict the size of the filter in displacementFilter

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.