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
- Alphabetic
- By Inheritance
- Matrix
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Matrix()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var a: Double
-
def
append(matrix: Matrix): Matrix.this.type
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.
-
def
apply(pos: Point, newPos: Point = js.native): Point
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
-
def
applyInverse(pos: Point, newPos: Point = js.native): Point
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- var b: Double
- var c: Double
-
def
clone(): Matrix.this.type
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
-
def
copy(): Matrix
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.
- var d: Double
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromArray(array: Array[Double]): Unit
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.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
identity(): Matrix.this.type
Resets this Matrix to an identity (default) matrix.
Resets this Matrix to an identity (default) matrix.
- returns
This matrix. Good for chaining method calls.
-
def
invert(): Matrix.this.type
Inverts this matrix.
Inverts this matrix.
- returns
This matrix. Good for chaining method calls.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
prepend(matrix: Matrix): Matrix.this.type
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.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
rotate(angle: Double): Matrix.this.type
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.
-
def
scale(x: Double, y: Double): Matrix.this.type
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toArray(transpose: Boolean): Array[Double]
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.
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
translate(x: Double, y: Double): Matrix.this.type
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.
- var tx: Double
- var ty: Double
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )