dacha
    Preparing search index...

    Interface Matrix

    A 2D affine transformation matrix. Transform uses it for localMatrix and worldMatrix.

    The matrix is:

    | a  c  tx |
    | b d ty |
    | 0 0 1 |

    The methods change the matrix in place and return it, so calls can be chained.

    Index
    a: number

    Scale and rotation, x axis.

    b: number

    Skew and rotation, x axis.

    c: number

    Skew and rotation, y axis.

    d: number

    Scale and rotation, y axis.

    tx: number

    Translation on x.

    ty: number

    Translation on y.

    • Transforms a point and returns the result as a new object.

      Parameters

      • p: { x: number; y: number }

      Returns { x: number; y: number }

    • Sets all six values.

      Parameters

      • a: number
      • b: number
      • c: number
      • d: number
      • tx: number
      • ty: number

      Returns Matrix

    • Copies the values of m.

      Parameters

      Returns Matrix

    • Returns a new matrix with the same values.

      Returns Matrix

    • Resets the matrix to the identity matrix.

      Returns Matrix

    • Inverts the matrix. A matrix that cannot be inverted becomes the identity matrix.

      Returns Matrix

    • Multiplies this matrix by m: this = this * m. The result applies m first, then this matrix.

      Parameters

      Returns Matrix

    • Multiplies m by this matrix: this = m * this. The result applies this matrix first, then m.

      Parameters

      Returns Matrix