Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blendmode not working on images inside a container #3684

Closed
TadejZupancic opened this issue May 21, 2018 · 2 comments
Closed

Blendmode not working on images inside a container #3684

TadejZupancic opened this issue May 21, 2018 · 2 comments

Comments

@TadejZupancic
Copy link
Contributor

TadejZupancic commented May 21, 2018

I don't know if this is a bug or is not yet implemented, but adding two images to a container displays them as if default blendmode was set.

var image = this.add.image(100, 100, 'disk');
var image2 = this.add.image(150, 150, 'disk');
image2.blendMode = 2;
var container = this.add.container(0, 0, [ image, image2 ]); // works fine without this line

@photonstorm
Copy link
Collaborator

Yes, it's not implemented yet. As we can't multiply blend modes I'm guessing that whatever is set as the blend mode at the very top of the container chain overrides everything else below it.

@photonstorm
Copy link
Collaborator

Thank you for submitting this feature request. We have implemented this and the feature has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

To clarify: If a Container has a blend mode set, all children will use it. If it doesn't, and a child has a blend mode set, that will be used. Parent overrides child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants