[v3.8.6] [2D Skew comes back] Add UISkew component support.#18212
Conversation
|
|
@cocos-robot run test cases |
1 similar comment
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details |
|
@dumganhar, Please check the result of
Task Details |
ca8dcd3 to
f4ee6f8
Compare
| if (cur) { | ||
| if (dirtyBits & TransformBit.POSITION) { | ||
| if (positionDirty && !rotationScaleDirty) { | ||
| Vec3.transformMat4(childPos, child._lpos, cur._mat); |
There was a problem hiding this comment.
If position and (rotation/scale/skew) are both dirty. Doesn't need to go here to calculate world matrix since in the following if (rotationScaleSkewDirty) { logic , it will do that in Mat4.fromSRT ( get the local matrix) + Mat4.multiply ( get the world matrix = parent's world matrix * my local matrix ).
In this case, we avoid the unused Vec3.transformMat4 operation.
| if (dirtyBits & TransformBit.RS) { | ||
| if (rotationScaleSkewDirty) { | ||
| Mat4.fromSRT(childMat, child._lrot, child._lpos, child._lscale); | ||
| uiSkewComp = child._uiProps._uiSkewComp; |
There was a problem hiding this comment.
Don't use getter and make _uiSkewComp @engineInternal public property for fast accessing the UISkew component.
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details |
|
@dumganhar, Please check the result of
Task Details |
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details |
|
@dumganhar, Please check the result of
Task Details |
…and fix world matrix not updated while delete component in Editor.
bb08c34 to
0110c15
Compare
|
@cocos-robot run test cases |
|
@minggo This PR is ready now. I think we could put it in the v3.8.6 beta0 and get feedback from developers. |
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details
|
|
@dumganhar, Please check the result of
Task Details |
|
Please fix the CI error. |
|
@minggo |
|
Except clang tidy error, macOS/iOS also have error. |
I will check that. Good to point that out. |
|
Fixed |
|
Thanks for the merge. I will send an another Pull Request for |

Re: #17852
Need to consider
TODO:
Inspector Panel Preview
Limitation
If the parent node has a
UISkewcomponent, the world scale and world rotation of the current node may become inaccurate. It is recommended to use local scale and local rotation to modify the scaling and rotation of the current node.(Reason: Skew transformations alter the scale and rotation components in the world matrix, making it impossible to accurately reconstruct the world SRT components from the world matrix.)
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: