Skip to content

Commit cb599a7

Browse files
committed
fixed worldAlpha calculation when parent alpha is 0
1 parent 7c77635 commit cb599a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/CoreNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ export class CoreNode extends EventEmitter {
11481148
}
11491149

11501150
if (updateType & UpdateType.WorldAlpha) {
1151-
this.worldAlpha = ((parent && parent.worldAlpha) || 1) * props.alpha;
1151+
this.worldAlpha = (parent?.worldAlpha ?? 1) * this.props.alpha;
11521152
updateType |=
11531153
UpdateType.PremultipliedColors |
11541154
UpdateType.Children |

0 commit comments

Comments
 (0)