-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fixed #12625: The prototype chain for mesh.maxPosition is not Vec3 on version 3.6.0 #12628
Conversation
…c3 on version 3.6.0
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 此网格的结构。
*/
|
@cocos-robot run test cases |
@dumganhar, Please check the result of
Task Details
|
@dumganhar, Please check the result of
Task Details
|
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@cocos-robot run test cases |
@dumganhar, Please check the result of
Task Details
|
@dumganhar, Please check the result of
Task Details
|
Re: #12625
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: