Jump to content

Setting container alpha has no effect?


Wanderer777
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :wacko:

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...