mr_malee Posted September 24, 2014 Share Posted September 24, 2014 Hello, so I've just discovered that wherever there is black pixels on my canvas, they are magically changed into pixels from a background image on the html page. Not using blend Modes or filters or anything crazy. I'm using autoDetectRenderer as well. Anyone seen this issue before? I can't really show any screen shots, but it almost looks like the entire canvas has some additive blendMode applied to it. Quote Link to comment Share on other sites More sharing options...
JUL Posted September 24, 2014 Share Posted September 24, 2014 https://github.com/GoodBoyDigital/pixi.js/issues/246 "It appears that setting the "alpha" property does not work in canvas rendering mode. The object has full opacity, no matter what you set the alpha to. Can anyone confirm this? Is this a known issue?I'm using the latest DEV version." "works fine for me, I am able to do all sorts of alpha with canvas. Is there some specific code giving you trouble?" "Hey @englercj, you are right. It works, sorry for the waste of time!The problem lies elsewhere though. My code was:this.clickCatcher = new PIXI.Graphics();this.clickCatcher.beginFill(0x000000);this.clickCatcher.drawRect(0, 0, 100, 100);this.clickCatcher.endFill();this.clickCatcher.alpha = 0.5;It did not show up in canvas rendering (ie, ios).But when I change the color to something else (not pure black, for example 0x111111), it does show up. I guess it sees 0x000000 as null or something and ignores it?" ..."This issue has now been sorted." Well not really, obviously "when I change the color to something else (not pure black, for example 0x111111), it does show up. I guess it sees 0x000000 as null or something and ignores it?" Probably. Quote Link to comment Share on other sites More sharing options...
rich Posted September 24, 2014 Share Posted September 24, 2014 I don't think that is related JUL. The issue mr_malee is talking about IS fixed in the dev branch though (specifically by this commit) Quote Link to comment Share on other sites More sharing options...
JUL Posted September 25, 2014 Share Posted September 25, 2014 Well, maybe, maybe not. Trying another value than 0x000000 like 0x111111 is worth a try I think. Quote Link to comment Share on other sites More sharing options...
chg Posted September 25, 2014 Share Posted September 25, 2014 Well, maybe, maybe not. Trying another value than 0x000000 like 0x111111 is worth a try I think.JUL, if you think it's that exact value (being falsey?) wouldn't 0x000001 be the best alternative value to use in it's place (the eye being least sensitive to shades of blue, I doubt it will be obvious that it's not 0x000000) 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.