Appearance
Class: Matrix
transform矩阵计算
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Matrix()
Properties
angle
• angle: number
= 0
旋转角度
Defined in
offset
• offset: Vector2
锚点
Defined in
scale
• scale: Vector2
缩放
Defined in
size
• size: Vector2
大小,可用于计算锚点
Defined in
skewX
• skewX: number
= 0
倾斜,未实现
Defined in
skewY
• skewY: number
= 0
Defined in
translate
• translate: Vector2
位置,移动
Defined in
value
• value: [number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in
Methods
append
▸ append(matrix
): Matrix
Parameters
Name | Type |
---|---|
matrix | Matrix |
Returns
Defined in
clone
▸ clone(): Matrix
克隆当前矩阵
Returns
Defined in
get
▸ get(): [number
, number
, number
, number
, number
, number
, number
, number
, number
]
获取矩阵数据
Returns
[number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in
prepend
▸ prepend(matrix
): Matrix
Parameters
Name | Type |
---|---|
matrix | Matrix |
Returns
Defined in
rotate
▸ rotate(angle
): Matrix
旋转
Parameters
Name | Type |
---|---|
angle | number |
Returns
Defined in
set
▸ set(...args
): void
设置矩阵数据
Parameters
Name | Type |
---|---|
...args | [number , number , number , number , number , number , number , number , number ] |
Returns
void
Defined in
setTransform
▸ setTransform(transform
): Matrix
设置节点信息
Parameters
Name | Type | Description |
---|---|---|
transform | Transform <Container > | 节点 |