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

fixed #12625: The prototype chain for mesh.maxPosition is not Vec3 on version 3.6.0 #12628

Merged

Conversation

dumganhar
Copy link
Contributor

Re: #12625

Changelog


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.

@github-actions
Copy link

github-actions bot commented Aug 31, 2022

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -3204,15 +3204,15 @@
          * @en The minimum position of all vertices in the mesh
          * @zh (各分量都)小于等于此网格任何顶点位置的最大位置。
          * @deprecated Please use [[struct.minPosition]] instead
          */
-        get minPosition(): math.Vec3 | undefined;
+        get minPosition(): Readonly<math.Vec3> | undefined;
         /**
          * @en The maximum position of all vertices in the mesh
          * @zh (各分量都)大于等于此网格任何顶点位置的最大位置。
          * @deprecated Please use [[struct.maxPosition]] instead
          */
-        get maxPosition(): math.Vec3 | undefined;
+        get maxPosition(): Readonly<math.Vec3> | undefined;
         /**
          * @en The struct of the mesh
          * @zh 此网格的结构。
          */

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

@github-actions
Copy link

@dumganhar, Please check the result of run test cases:

Task Details

Platform build runned result crashScene FailScene
ios_release FAIL NA NA NA
Mac_debug FAIL NA NA NA
WebMobile_debug PASS FAIL NA NA

@github-actions
Copy link

@dumganhar, Please check the result of run test cases:

Task Details

Platform build runned result crashScene FailScene
WebDesktop_release PASS PASS PASS NA
WebMobile_release PASS FAIL NA NA
Win32_release FAIL NA NA NA
Android_debug FAIL NA NA NA

@@ -398,7 +398,8 @@ export class MeshRenderer extends ModelRenderer {

public onGeometryChanged () {
if (this._model && this._mesh) {
this._model.createBoundingShape(this._mesh.struct.minPosition, this._mesh.struct.maxPosition);
const meshStruct = this._mesh.struct;
Copy link
Contributor

@PatriceJiang PatriceJiang Sep 1, 2022

Choose a reason for hiding this comment

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

Is the purpose here to reduce temporary objects for GC?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, also a bit of tweak for performance since less property visit.

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

@dumganhar, Please check the result of run test cases:

Task Details

Platform build runned result crashScene FailScene
WebDesktop_release PASS PASS PASS NA
WebMobile_release PASS PASS PASS NA
Win32_release FAIL NA NA NA
Android_debug FAIL NA NA NA

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

@dumganhar, Please check the result of run test cases:

Task Details

Platform build runned result crashScene FailScene
ios_release FAIL NA NA NA
Mac_debug FAIL NA NA NA
WebMobile_debug PASS PASS PASS NA

@dumganhar dumganhar merged commit 7b65436 into cocos:v3.6.1 Sep 1, 2022
cocos-robot pushed a commit to cocos-robot/engine that referenced this pull request Sep 1, 2022
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.

4 participants