Problem with opacity in cc.LabelBMFont and in Spine

Hi,

We are migrating our project from cocos2d-js-v3.0-beta to cocos2d-js-v3.0RC0 and we are having some problems with opacity in cc.LabelBMFont and also with Spine elements.

We are not able to change the opacity of the cc.LabelBMFont using setOpacity or opacity or even with actions.

Also when a Spine element include alpha changes on the images, some times it have some non expected results as shown in the following screenshot. (The image suppose to be 100% transparent).

Needless to say, in v3.0beta works without any problem.

Any thoughts how to fix this issue?

Thanks in advance

Btw we are running native on iOS

I will test it today, thanks

Thanks @pandamicro. :smile:
We will really appreciate a solution for this problem.

Hi, @mmartis

This is a bug related to Cocos2d-x, it have been fixed in 3.2 final, which will be merged into Cocos2d-JS for the v3.0 RC2.

Thanks @pandamicro,

Any estimated date when v3.0 RC2 will become available?

Cheers,

Around the first week of august :wink:

Hi @pandamicro.

I’m testing JS v3 final and this issue related to set opacity on label is fixed.
But i’m testing spine animations. And when the animations have opacity we still have the same problem shown in the screenshot of the first pot on this thread.
I’m wondering how we can fix this issue, do you have any clue?

Thanks in advance.

Cheers!

@mmartis Do you have some sample code to reproduce the issue ?

Hi @pandamicro.

Please find attached a sample code that reproduce this issue.
Basically, I changed the color of torso, head and pelvis to ffffff00 in the spineboy.json.

Test run on web:

Test run on iOS (test run on iPad 4 and Simulator)

If you run the the test several times, some times the textures are displayed correctly.

Let me know if you can reproduce the issue with the attached sample project.

Best, regards.

Sample.zip (406.8 KB)

Hi, @mmartis sorry for being a little bit late, here is a temporary solution, but it’s not the right one, it will solve your problem in a nasty way. We have noted the issue and reported it to cocos2d-x team, they will take a look.

As showing in the picture, modify setFittedBlendingFunc of Skeleton class.

Hi @pandamicro.

Thank you for the solution. This seems to fix the issue.

Cheers