Opacity already includes the alpha value from the color. The batcher2d's walk function implements the calculation of opacity. (#17509)

* Web's opacity already includes the alpha value from the color. The batcher2d's walk function implements the calculation of opacity.
This commit is contained in:
bofeng-song
2024-08-07 17:02:23 +08:00
committed by GitHub
parent b11e7d225e
commit 4edbf5bd8e
5 changed files with 8 additions and 5 deletions
@@ -364,7 +364,10 @@ const cacheManager = require('./jsb-cache-manager');
skeleton._updateColor = function () {
if (this._nativeSkeleton) {
const compColor = this.color;
const compColor = this._color;
this.setEntityColorDirty(true);
this.setEntityColor(compColor);
this.setEntityOpacity(this.node._uiProps.localOpacity);
this._nativeSkeleton.setColor(compColor.r, compColor.g, compColor.b, compColor.a);
this.markForUpdateRenderData();
}