andreas_d Posted August 25, 2015 Share Posted August 25, 2015 Hi guys, Can someone recommend a good method for getting the dimensions of assets AFTER a mask has been applied? Imagine a scenario in which a mask and a Sprite intersect.var sprite = new PIXI.Sprite( texture ); // width == 200 height == 50sprite.mask = new PIXI.Graphics().beginFill().drawRect(0, 0, 50, 200).endFill() );Is there a way to retrieve the dimensions after the mask has been applied? (ex. width==50 ; height == 50 ) instead of: width == 200 ; height == 200 ThanksAndreas Quote Link to comment Share on other sites More sharing options...
andreas_d Posted August 28, 2015 Author Share Posted August 28, 2015 Shamelessly bumping this to the top again. Am i getting this very wrong due to a lack of experience ? If you want to mask elements and then treat those elements as if their dimensions are the masked area, is there a built in way of doing this? So far I've had to do a whole lot of strange workarounds to get past this. Thanks Quote Link to comment Share on other sites More sharing options...
xerver Posted August 28, 2015 Share Posted August 28, 2015 https://github.com/pixijs/pixi.js/issues/2032 Quote Link to comment Share on other sites More sharing options...
andreas_d Posted September 2, 2015 Author Share Posted September 2, 2015 Thanks xerver 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.