mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user