Geoff Posted February 11, 2014 Share Posted February 11, 2014 I've got a DisplayObjectContainer with a bunch of sprites, some of which have masks. When checking out the new SpriteBatch it seems that it doesn't respect the masking of its children. Is this a known issue or am I missing something? Here's a quick example demonstrating the issue: http://www.lostdecadegames.com/sandbox/pixi-spritebatch-mask/ The bunnies on the left are children of a DisplayObjectContainer while the maggots on the right are children of a SpriteBatch. A mask which clips half way down the stage is applied to both sets of sprites. And the relevant JavaScript as a gist: https://gist.github.com/geoffb/8944694 Quote Link to comment Share on other sites More sharing options...
xerver Posted February 11, 2014 Share Posted February 11, 2014 SpriteBatch is for fast rendering of a large number of basic sprites. There is no masking, tinting, filtering, etc. The trade of is extreme speed at the cost of advanced features. If you want advanced features just use a DisplayObjectContainer. Quote Link to comment Share on other sites More sharing options...
Geoff Posted February 11, 2014 Author Share Posted February 11, 2014 Great, thanks for the clarification. I didn't see masking as a limitation mentioned anywhere so I wanted to be sure. Quote Link to comment Share on other sites More sharing options...
xerver Posted February 12, 2014 Share Posted February 12, 2014 Great, thanks for the clarification. I didn't see masking as a limitation mentioned anywhere so I wanted to be sure. Yeah that is our fault for not documenting properly, basically all you get with spritebatch is the transform matrix (position, rotation). 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.