gpt4 book ai didi

css - react native 矩阵 2d 的正确方法?

转载 作者:行者123 更新时间:2023-11-28 11:30:16 26 4
gpt4 key购买 nike

我有一个像这样的 css3 转换

transform: matrix(1, 0, 0, 1, 5, 5);

那么什么是 native react “矩阵数组”?

matrix1: [
1, 0, 0,
0, 1, 0,
5, 5, 1
]

matrix2: [
1, 0, 0,
1, 5, 5,
0, 0, 1
]

matrix3:[
1, 0, 5,
0, 1, 5,
0, 0, 1
]

在 View 中不正确....

最佳答案

React Native 使用 3D 矩阵,因此您的矩阵需要是 4x4。参见 https://github.com/facebook/react-native/blob/master/Libraries/Utilities/MatrixMath.js了解详情。

关于css - react native 矩阵 2d 的正确方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38938144/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com