Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some setter improve #16959

Merged
merged 3 commits into from
May 10, 2024
Merged

Some setter improve #16959

merged 3 commits into from
May 10, 2024

Conversation

minggo
Copy link
Contributor

@minggo minggo commented May 9, 2024

Re: #16952

Changelog

  • only update rotation when the value is changed
  • only update position when the value is changed

Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@minggo minggo requested a review from dumganhar May 9, 2024 03:14
Copy link

github-actions bot commented May 9, 2024

Interface Check Report

This pull request does not change any public interfaces !

@@ -2153,16 +2163,26 @@ export class Node extends CCObject implements ISchedulable, CustomSerializable {
public setRotation(x: number, y: number, z: number, w: number): void;

public setRotation (val: Readonly<Quat> | number, y?: number, z?: number, w?: number): void {
let x: number;
const localRotation = this._lrot;

if (y === undefined || z === undefined || w === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be and logic here like which in setPosition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to change its original logic in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@minggo minggo merged commit 6a04c0c into cocos:v3.8.5 May 10, 2024
9 of 10 checks passed
@minggo minggo deleted the some-setter-improve branch May 10, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants