Mat
class Mat {}
Constructs a new instance of the Mat
class
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Properties
static Scale: {
(x: number, y: number, cx: number, cy: number): MatModel
(x: number, y: number): MatModel
}
a: number
b: number
c: number
d: number
e: number
f: number
Methods
static Absolute(m: MatLike): MatModel
Parameters
Name | Description |
---|---|
|
|
Returns
MatModel
static applyToBounds(m: MatLike, box: Box): Box
Parameters
Returns
Box
static applyToXY(m: MatLike, x: number, y: number): number[]
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
number[]
static Cast(m: MatLike): Mat
Parameters
Name | Description |
---|---|
|
|
Returns
Mat
static Compose(...matrices: MatLike[]): Mat
Parameters
Name | Description |
---|---|
|
|
Returns
Mat
static Decompose(m: MatLike): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
Parameters
Name | Description |
---|---|
|
|
Returns
{
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
static From(m: MatLike): Mat
Parameters
Name | Description |
---|---|
|
|
Returns
Mat
static Identity(): Mat
static Inverse(m: MatModel): MatModel
Parameters
Name | Description |
---|---|
|
|
Returns
MatModel
static Multiply(m1: MatModel, m2: MatModel): MatModel
Parameters
Returns
MatModel
static Point(m: MatLike): Vec
Parameters
Name | Description |
---|---|
|
|
Returns
Vec
static Rotate(r: number, cx?: number, cy?: number): Mat
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
Mat
static Rotation(m: MatLike): number
Parameters
Name | Description |
---|---|
|
|
Returns
number
static Smooth(m: MatLike, precision?: number): MatLike
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
MatLike
static Translate(x: number, y: number): Mat
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
Mat
applyToPoint(point: VecLike): Vec
Parameters
Name | Description |
---|---|
|
|
Returns
Vec
applyToPoints(points: VecLike[]): Vec[]
Parameters
Name | Description |
---|---|
|
|
Returns
Vec[]
clone(): Mat
decompose(): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
decomposed(): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
equals(m: Mat | MatModel): boolean
Parameters
Returns
boolean
identity(): this
invert(): this
multiply(m: Mat | MatModel): this
Parameters
Returns
this
point(): Vec
rotate(r: number, cx?: number, cy?: number): Mat
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
Mat
rotation(): number
scale(x: number, y: number): this
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
this
setTo(model: MatModel): this
Parameters
Name | Description |
---|---|
|
|
Returns
this
toCssString(): string
translate(x: number, y: number): Mat
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
Mat