[0.69] Fix matrix multiplication logic for transforms (#10112)#10121
Merged
acoates-ms merged 1 commit intomicrosoft:0.69-stablefrom Jun 15, 2022
Merged
[0.69] Fix matrix multiplication logic for transforms (#10112)#10121acoates-ms merged 1 commit intomicrosoft:0.69-stablefrom
acoates-ms merged 1 commit intomicrosoft:0.69-stablefrom
Conversation
* Uses custom matrix multiplication logic for transforms As reported in microsoft#10111, float4x4's operator* does not produce the same output as expected on other RN platforms. This change ports the logic from RN's MatrixMath.js to ensure multiplication of transforms produces the same result on Windows as on iOS and Android. Fixes microsoft#10111 * yarn format * Change files * Use float4x4 operator* but get the order correct
acoates-ms
approved these changes
Jun 15, 2022
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.
Description
Backporting #10112 into v0.69.
Type of Change
Erase all that don't apply.
Why
As reported in #10111, float4x4's operator* does not produce the same output as expected on other RN platforms.
Resolves #10111
What
This change ports the logic from RN's MatrixMath.js to ensure multiplication of transforms produces the same result on Windows as on iOS and Android.
Screenshots
One more for good measure - notice that the JS driven animation just sends transform props (rather than computed matrix) now that we forked
processTransform.windows.js, so the animation doesn't match expectations from the native driver / iOS:Before:
React.Native.Playground.Win32.2022-06-14.13-30-28.mp4
After:
playground.2022-06-14.13-30-13.mp4
iOS:
Screen.Recording.2022-06-14.at.1.35.15.PM.mov
Testing
See screenshots / recordings above, confirmed that transforms compose as expected on iOS.
Microsoft Reviewers: Open in CodeFlow