Class/Object

io.scalajs.dom.html.pixijs

Matrix

Related Docs: object Matrix | package pixijs

Permalink

class Matrix extends Object

The pixi Matrix class as an object, which makes it a lot faster, here is a representation of it:

| a | b | tx|
+---+---+---+
| c | d | ty|
+---+---+---+
| 0 | 0 | 1 |
Annotations
@RawJSType() @native() @JSName( "Matrix" )
See also

https://phaser.io/docs/2.2.2/PIXI.Matrix.html

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Matrix
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Matrix()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var a: Double

    Permalink
  5. def append(matrix: Matrix): Matrix.this.type

    Permalink

    Appends the given Matrix to this Matrix.

    Appends the given Matrix to this Matrix.

    matrix

    the given Matrix

    returns

    This matrix. Good for chaining method calls.

  6. def apply(pos: Point, newPos: Point = js.native): Point

    Permalink

    Get a new position with the current transformation applied.

    Get a new position with the current transformation applied. Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)

    pos

    The origin

    newPos

    The point that the new position is assigned to (allowed to be same as input)

    returns

    The new point, transformed through this matrix

  7. def applyInverse(pos: Point, newPos: Point = js.native): Point

    Permalink

    Get a new position with the inverse of the current transformation applied.

    Get a new position with the inverse of the current transformation applied. Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)

    pos

    The origin

    newPos

    The point that the new position is assigned to (allowed to be same as input)

    returns

    The new point, inverse-transformed through this matrix

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. var b: Double

    Permalink
  10. var c: Double

    Permalink
  11. def clone(): Matrix.this.type

    Permalink

    Creates a new Matrix object with the same values as this one.

    Creates a new Matrix object with the same values as this one.

    returns

    A copy of this matrix. Good for chaining method calls.

    Definition Classes
    Matrix → AnyRef
  12. def copy(): Matrix

    Permalink

    Changes the values of the given matrix to be the same as the ones in this matrix.

    Changes the values of the given matrix to be the same as the ones in this matrix.

    returns

    The matrix given in parameter with its values updated.

  13. var d: Double

    Permalink
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def fromArray(array: Array[Double]): Unit

    Permalink

    Creates a Matrix object based on the given array.

    Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows: a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]

    array

    The array that the matrix will be populated from.

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def identity(): Matrix.this.type

    Permalink

    Resets this Matrix to an identity (default) matrix.

    Resets this Matrix to an identity (default) matrix.

    returns

    This matrix. Good for chaining method calls.

  22. def invert(): Matrix.this.type

    Permalink

    Inverts this matrix.

    Inverts this matrix.

    returns

    This matrix. Good for chaining method calls.

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def prepend(matrix: Matrix): Matrix.this.type

    Permalink

    Prepends the given Matrix to this Matrix.

    Prepends the given Matrix to this Matrix.

    matrix

    the given Matrix

    returns

    This matrix. Good for chaining method calls.

  29. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  30. def rotate(angle: Double): Matrix.this.type

    Permalink

    Applies a rotation transformation to the matrix.

    Applies a rotation transformation to the matrix.

    angle

    The angle in radians.

    returns

    This matrix. Good for chaining method calls.

  31. def scale(x: Double, y: Double): Matrix.this.type

    Permalink

    Applies a scale transformation to the matrix.

    Applies a scale transformation to the matrix.

    x

    The amount to scale horizontally.

    y

    The amount to scale vertically.

    returns

    This matrix. Good for chaining method calls.

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toArray(transpose: Boolean): Array[Double]

    Permalink

    Creates an array from the current Matrix object.

    Creates an array from the current Matrix object.

    transpose

    Whether we need to transpose the matrix or not.

    returns

    The newly created array which contains the matrix.

  34. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. def translate(x: Double, y: Double): Matrix.this.type

    Permalink

    Translates the matrix on the x and y.

    Translates the matrix on the x and y.

    x

    the X-coordinate delta

    y

    the Y-coordinate delta

    returns

    This matrix. Good for chaining method calls.

  37. var tx: Double

    Permalink
  38. var ty: Double

    Permalink
  39. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped