Skip to content

Commit dc91494

Browse files
authored
fixed worldAlpha calculation when parent alpha is 0 (#628)
2 parents 7c77635 + cb599a7 commit dc91494

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)