matandk Posted May 6, 2015 Share Posted May 6, 2015 Hey, Can I blur a specific object (stage child) and not the entire stage? Thanks Quote Link to comment Share on other sites More sharing options...
Lauromine Posted May 8, 2015 Share Posted May 8, 2015 Hi matandk, I don't know if it's different with Pixi V3 but with V2 it works like that : All DisplayObjects have a 'filters' property which is an array of filters. To add a filter to your specific DisplayObject, you can :- create a filter (a BlurFilter in your case)- set its properties as you wish- add it to the filters Arrayvar myFilter = new BlurFilter();myFilter.blur = 5;myDisplayObject.filters = [myFilter]; // myDisplayObject.filters.push() won't work.Links to doc : http://www.goodboydigital.com/pixijs/docs/classes/BlurFilter.html Quote Link to comment Share on other sites More sharing options...
xerver Posted May 8, 2015 Share Posted May 8, 2015 It works the same way in v3, but I'm pretty sure you need to assign the filters to get the filter to work properly:myDisplayObject.filters = [new BlurFilter()]; Quote Link to comment Share on other sites More sharing options...
Lauromine Posted May 8, 2015 Share Posted May 8, 2015 You're right xerver, I edited the code above, thanks 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.