Class Matrix2d

a Matrix2d Object.
the identity matrix and parameters position :

Constructors

Properties

val: undefined | Float32Array

Accessors

  • get tx(): number
  • tx component of the matrix

    Returns number

    Matrix2d.translate

  • get ty(): number
  • ty component of the matrix

    Returns number

    Matrix2d.translate

Methods

  • return true if the two matrices are identical

    Parameters

    Returns boolean

    true if both are equals

  • reset the transformation matrix to the identity matrix (no transformation).
    the identity matrix and parameters position :

    Returns Matrix2d

    Reference to this object for method chaining

  • returns true if the matrix is an identity matrix.

    Returns boolean

  • rotate the matrix (counter-clockwise) by the specified angle (in radians).

    Parameters

    • angle: number

      Rotation angle in radians.

    Returns Matrix2d

    Reference to this object for method chaining

  • scale the matrix

    Parameters

    • x: number

      a number representing the abscissa of the scaling vector.

    • Optionaly: number = x

      a number representing the ordinate of the scaling vector.

    Returns Matrix2d

    Reference to this object for method chaining

  • specifies a 2D scale operation using the [sx, 1] scaling vector

    Parameters

    • x: number

      x scaling vector

    Returns Matrix2d

    Reference to this object for method chaining

  • specifies a 2D scale operation using the [1,sy] scaling vector

    Parameters

    • y: number

      y scaling vector

    Returns Matrix2d

    Reference to this object for method chaining

  • return an array representation of this Matrix

    Returns Float32Array

  • Multiplies the current transformation with the matrix described by the arguments of this method

    Parameters

    • a: number
    • b: number
    • c: number
    • d: number
    • e: number
    • f: number

    Returns Matrix2d

    Reference to this object for method chaining

  • translate the matrix position on the horizontal and vertical axis

    Parameters

    • Rest...args: any

    Returns Matrix2d

    Reference to this object for method chaining