You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -195,6 +209,57 @@ The skew transformations require a string so that the transform may be expressed
195
209
}
196
210
```
197
211
212
+
### Matrix Transform
213
+
214
+
The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
215
+
216
+
The matrix is specified in column-major order:
217
+
218
+
```js
219
+
{
220
+
transform: [
221
+
{
222
+
matrix: [
223
+
scaleX,
224
+
skewY,
225
+
0,
226
+
0,
227
+
skewX,
228
+
scaleY,
229
+
0,
230
+
0,
231
+
0,
232
+
0,
233
+
1,
234
+
0,
235
+
translateX,
236
+
translateY,
237
+
0,
238
+
1,
239
+
],
240
+
},
241
+
];
242
+
}
243
+
```
244
+
245
+
For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
@@ -195,6 +209,57 @@ The skew transformations require a string so that the transform may be expressed
195
209
}
196
210
```
197
211
212
+
### Matrix Transform
213
+
214
+
The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
215
+
216
+
The matrix is specified in column-major order:
217
+
218
+
```js
219
+
{
220
+
transform: [
221
+
{
222
+
matrix: [
223
+
scaleX,
224
+
skewY,
225
+
0,
226
+
0,
227
+
skewX,
228
+
scaleY,
229
+
0,
230
+
0,
231
+
0,
232
+
0,
233
+
1,
234
+
0,
235
+
translateX,
236
+
translateY,
237
+
0,
238
+
1,
239
+
],
240
+
},
241
+
];
242
+
}
243
+
```
244
+
245
+
For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
> **Deprecated.** Use the [`transform`](transforms#transform) prop instead.
271
+
:::warning Deprecated
272
+
Use the [`transform`](transforms#transform) prop instead.
273
+
:::
207
274
208
275
## Transform Origin
209
276
210
277
The `transformOrigin` property sets the origin for a view's transformations. The transform origin is the point around which a transformation is applied. By default, the origin of a transform is `center`.
@@ -195,6 +209,57 @@ The skew transformations require a string so that the transform may be expressed
195
209
}
196
210
```
197
211
212
+
### Matrix Transform
213
+
214
+
The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
215
+
216
+
The matrix is specified in column-major order:
217
+
218
+
```js
219
+
{
220
+
transform: [
221
+
{
222
+
matrix: [
223
+
scaleX,
224
+
skewY,
225
+
0,
226
+
0,
227
+
skewX,
228
+
scaleY,
229
+
0,
230
+
0,
231
+
0,
232
+
0,
233
+
1,
234
+
0,
235
+
translateX,
236
+
translateY,
237
+
0,
238
+
1,
239
+
],
240
+
},
241
+
];
242
+
}
243
+
```
244
+
245
+
For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
> **Deprecated.** Use the [`transform`](transforms#transform) prop instead.
271
+
:::warning Deprecated
272
+
Use the [`transform`](transforms#transform) prop instead.
273
+
:::
207
274
208
275
## Transform Origin
209
276
210
277
The `transformOrigin` property sets the origin for a view's transformations. The transform origin is the point around which a transformation is applied. By default, the origin of a transform is `center`.
@@ -195,6 +209,57 @@ The skew transformations require a string so that the transform may be expressed
195
209
}
196
210
```
197
211
212
+
### Matrix Transform
213
+
214
+
The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
215
+
216
+
The matrix is specified in column-major order:
217
+
218
+
```js
219
+
{
220
+
transform: [
221
+
{
222
+
matrix: [
223
+
scaleX,
224
+
skewY,
225
+
0,
226
+
0,
227
+
skewX,
228
+
scaleY,
229
+
0,
230
+
0,
231
+
0,
232
+
0,
233
+
1,
234
+
0,
235
+
translateX,
236
+
translateY,
237
+
0,
238
+
1,
239
+
],
240
+
},
241
+
];
242
+
}
243
+
```
244
+
245
+
For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
> **Deprecated.** Use the [`transform`](transforms#transform) prop instead.
271
+
:::warning Deprecated
272
+
Use the [`transform`](transforms#transform) prop instead.
273
+
:::
207
274
208
275
## Transform Origin
209
276
210
277
The `transformOrigin` property sets the origin for a view's transformations. The transform origin is the point around which a transformation is applied. By default, the origin of a transform is `center`.
0 commit comments