Wanderer777 Posted August 27, 2015 Share Posted August 27, 2015 I just noticed that changing the alpha value of a Container() does not affect any children within (actually, it does nothing). You have to set the alpha of each sprite within explicitly (which is really tedious). Why is that? Quote Link to comment Share on other sites More sharing options...
xerver Posted August 28, 2015 Share Posted August 28, 2015 That should not be true, if that is the case you should report a bug on GitHub with a running example to reproduce. Quote Link to comment Share on other sites More sharing options...
Wanderer777 Posted August 29, 2015 Author Share Posted August 29, 2015 It's really weird, also most of the filters do not work (dropshadow, for example). Blend modes also do not work. Applying filters has no effect. Setting a blend mode, for example, makes a sprite disappear:SprFG = new PIXI.extras.TilingSprite(PIXI.loader.resources.Sheet1.textures['bgtile.png'], 512, 512);SprFG.blendMode = PIXI.BLEND_MODES.MULTIPLY;Using Pixi V3 on Win7, WebGLRenderer (AutoDetect), AMD Radeon HD 6800 Series - same result on Firefox 40.0.3, Chrome and UC Browser (Desktop version). EDIT: Blend modes DO work if I use an image (texture) with no transparency. I am not sure if this is related to the Pixi render engine or TexturePacker yet. Quote Link to comment Share on other sites More sharing options...
xerver Posted August 29, 2015 Share Posted August 29, 2015 Can you put together a running example, either self hosted or on jsfiddle/codepen for me to look at? Quote Link to comment Share on other sites More sharing options...
Wanderer777 Posted August 30, 2015 Author Share Posted August 30, 2015 I'll upload an example today or tomorrow since I am currently busy with a project. But it's simple to verify: Just create a container and a sprite. If you apply any alpha / tint / blendMode to the container and then add the sprite to the container, the sprite does definately NOT inherit the container's alpha / tint / blendMode. You have to apply alpha / tint / blendMode to each sprite individually instead. I did not test adding the sprite FIRST to a container an THEN changing the container properties, but most of the time you create a container and add sprites to it afterwards. It does not seem to be a browser issue -tested with Firefox, Chroma and UC Desktop, does not work in all of them. Using Pixi 3.0.7 WebGL (Win7). Quote Link to comment Share on other sites More sharing options...
xerver Posted August 31, 2015 Share Posted August 31, 2015 I just tried this and it worked perfectly fine, setting alpha values of containers effects all their children. If this is broken for you, please setup a running example to demonstrate the problem. Please note that children inherit alpha values, but tint/blendMode are not values that propagate to children, nor does Container even have these properties at all. Thanks. Quote Link to comment Share on other sites More sharing options...
Wanderer777 Posted August 31, 2015 Author Share Posted August 31, 2015 Please note that children inherit alpha values, but tint/blendMode are not values that propagate to children, nor does Container even have these properties at all. Ah ok, thanks for clarifying this. Inheriting a container's alpha indeed works in JSFiddle but not in my current project. Strange, but I couldn't pin down the cause yet 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.