[v3.8.6] Strip JSB relevant code in ui-opacity.ts for non-native platforms#18176
Merged
Conversation
dumganhar
force-pushed
the
386-treeshake-in-uiopoacity
branch
from
January 13, 2025 03:21
c4dbad2 to
e54f325
Compare
minggo
reviewed
Jan 13, 2025
| * @mangle | ||
| */ | ||
| private _parentOpacity: number = 1.0; | ||
| public _parentOpacity: number = 1.0; |
Contributor
There was a problem hiding this comment.
Make it as public, then other engine module may use it too. I don't think it is a good idea. We can't just only consider package size.
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
Added a new internal method _setParentOpacity and revert _parentOpacity to private.
👍 Package size ⤵ -499 bytes, old: 5253635, new: 5253136Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -2950,25 +2950,8 @@
* 透明度。
*/
get opacity(): number;
set opacity(value: number);
- /**
- * @en
- * Recursively sets localopacity.
- *
- * @zh
- * 递归设置localopacity。
- *
- * @param node @en recursive node.
- * @zh 递归的节点。
- * @param dirty @en Is the color dirty.
- * @zh color是否dirty。
- * @param parentOpacity @en The parent node's opacity.
- * @zh 父节点的opacity。
- * @param stopRecursiveIfHasOpacity @en Stop recursion if UiOpacity component exists.
- * @zh 如果存在UiOpacity组件则停止递归。
- */
- static setEntityLocalOpacityDirtyRecursively(node: Node, dirty: boolean, parentOpacity: number, stopRecursiveIfHasOpacity: boolean): void;
protected _opacity: number;
protected _getParentOpacity(node: Node): number;
protected _parentChanged(): void;
protected _setEntityLocalOpacityRecursively(opacity: number): void;
|
qiuguohua
approved these changes
Jan 13, 2025
minggo
approved these changes
Jan 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Re: #18056
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: