Unexhaustive handling for rotateX when using transform (rotate)
See original GitHub issueI am trying to rotate text by a certain amount, tried using ‘45deg’ like in the Transforms documentation from React Native but doesnt work either. Also tested skewX and it works.
<Group key={`tick-${d}`}>
<Group transform={[{ rotateX: 45 }]}>
<Text
x={labelX}
y={labelY}
text={d}
color={textColor}
familyName="serif"
size={9}
/>
</Group>
<Path path={path} color={strokeColor} />
</Group>
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
rotateX() - CSS: Cascading Style Sheets - MDN Web Docs
The rotateX() CSS function defines a transformation that rotates an element around the abscissa (horizontal axis) without deforming it.
Read more >Actions · Shopify/react-native-skia - GitHub
High-performance React Native Graphics using Skia. ... Unexhaustive handling for rotateX when using transform (rotate) Contributor License Agreement (CLA) ...
Read more >Error while animating rotateX in react native - Stack Overflow
I am trying to rotate an icon on press ...
Read more >rotate | CSS-Tricks
The rotate property in CSS turns an element around one or more axes. Think of it like poking one or more pins into...
Read more >Reference Frame Notes # - DREAM.3D
When dealing with orientation data such as Euler angles, Quaternions and ... A rotations always transforms the sample reference frame to the crystal ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just to give a small example of the workaround you can do the following:
Matrix4.ts
code from redashconst mat3 = toMatrix3(matrix4)
const matrix = Skia.Matrix(mat3)
matrix
prop on the<Group />
componenthttps://user-images.githubusercontent.com/31568400/182338383-1d949488-c388-4623-908d-edfbb5cd3bb8.MP4
Hey @naraB this might be to do with the perspective matrix function I had to change the index as per what RN uses internally for its transform calculations - I think this has something to do with it using a transposed matrix so m34 gets swapped with m43 (my matrix math is a little rusty though 😅):
This might explain the change a bit better: https://stackoverflow.com/a/35825372
Hope this helps 🙌