feat(node): 使setWorldPosition方法的z参数变为可选参数 - #32
Merged
Conversation
使Node类的setWorldPosition方法的z轴参数变为可选参数,当z参数未提供时, 默认使用当前节点的世界位置的z值。这增强了API的灵活性,允许开发者在 设置世界位置时只指定x和y坐标。
star-e
approved these changes
Jan 12, 2026
Fix lint
Code Size Check Report
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -25064,9 +25064,9 @@
* @param x X axis position
* @param y Y axis position
* @param z Z axis position
*/
- setWorldPosition(x: number, y: number, z: number): void;
+ setWorldPosition(x: number, y: number, z?: number): void;
/**
* @en Get position in world coordinate system, please try to pass `out` vector and reuse it to avoid garbage.
* @zh 获取世界坐标,注意,尽可能传递复用的 [[Vec3]] 以避免产生垃圾。
* @param out Set the result to out vector
|
star-e
reviewed
Jan 13, 2026
|
@orchid-world ❗ There was an error during the execution of the tasks. Please check the logs for more details. |
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.
使Node类的setWorldPosition方法的z轴参数变为可选参数,当z参数未提供时,
默认使用当前节点的世界位置的z值。这增强了API的灵活性,允许开发者在
设置世界位置时只指定x和y坐标。
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: