Class type Matrix-PIXI._t
method append: Js.Internal.meth([ `Arity_1(Js.t(_t)) ], Js.t(_t))Appends the given Matrix to this Matrix.
- parameter matrix
The matrix to append.
- returns
This matrix. Good for chaining method calls
method apply: Js.Internal.meth([ `Arity_2((PIXI.Point.t, Js.Undefined.t(PIXI.Point.t))) ], PIXI.Point.t)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)
@deorecated consider using Matrix.apply instead
- see /bs-pixi/PIXI/Matrix-PIXI/#val-apply
Matrix.apply
- parameter pos
The origin
- parameter newPos
(optional) The point that the new position is assigned to (allowed to be same as input)
- returns
The new point, transformed through this matrix
method applyInverse: Js.Internal.meth([ `Arity_2((PIXI.Point.t, Js.Undefined.t(PIXI.Point.t))) ], PIXI.Point.t)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)
@deorecated consider using Matrix.applyInverse instead
- see /bs-pixi/PIXI/Matrix-PIXI/#val-applyInverse
Matrix.applyInverse
- parameter pos
The origin
- parameter newPos
(optional) The point that the new position is assigned to (allowed to be same as input)
- returns
The new point, transformed through this matrix
method clone: Js.Internal.meth([ `Arity_0 ], Js.t(_t))Creates a new Matrix object with the same values as this one.
- returns
A copy of this matrix. Good for chaining method calls.
method copyFrom: Js.Internal.meth([ `Arity_1(Js.t(_t)) ], Js.t(_t))Changes the values of the matrix to be the same as the ones in given matrix
- parameter matrix
The matrix to copy from.
- returns
itself
method copyTo: Js.Internal.meth([ `Arity_1(Js.t(_t)) ], Js.t(_t))Changes the values of the given matrix to be the same as the ones in this matrix
- parameter matrix
The matrix to copy to.
- returns
The matrix given in parameter with its values updated.
method decompose: Js.Internal.meth([ `Arity_1(transformOpaque) ], transformOpaque)Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.
- deprecated
Consider using MatrixUtils.decompose instead
- see /bs-pixi/PIXI/MatrixUtils-PIXI/#val-decompose
MatrixUtils.decompose
- parameter transform
The transform to apply the properties to
- returns
The transform with the newly applied properties
method fromArray: Js.Internal.meth([ `Arity_1(array(float)) ], unit)Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows a = array
0b = array1c = array3d = array4tx = array2ty = array5- parameter array
The array that the matrix will be populated from.
method identity: Js.Internal.meth([ `Arity_0 ], Js.t(_t))Resets this Matrix to an identity (default) matrix.
- returns
This matrix. Good for chaining method calls.
method invert: Js.Internal.meth([ `Arity_0 ], Js.t(_t))Inverts this matrix
- returns
This matrix. Good for chaining method calls.
method prepend: Js.Internal.meth([ `Arity_1(Js.t(_t)) ], Js.t(_t))Prepends the given Matrix to this Matrix.
- parameter The
matrix to prepend
- returns
This matrix. Good for chaining method calls.
method rotate: Js.Internal.meth([ `Arity_1(float) ], Js.t(_t))Applies a rotation transformation to the matrix.
- parameter angle
The angle in radians
- returns
This matrix. Good for chaining method calls.
method scale: Js.Internal.meth([ `Arity_2((float, float)) ], Js.t(_t))Applies a scale transformation to the matrix.
- parameter x
The amount to scale horizontally
- parameter y
The amount to scale vertically
- returns
This matrix. Good for chaining method calls.
method set: Js.Internal.meth([ `Arity_6((float, float, float, float, float, float)) ], Js.t(_t))sets the matrix properties
- parameter a
Matrix component
- parameter b
Matrix component
- parameter c
Matrix component
- parameter d
Matrix component
- parameter tx
Matrix component
- parameter ty
Matrix component
- returns
This matrix. Good for chaining method calls
method setTransform: Js.Internal.meth([ `Arity_9((float, float, float, float, float, float, float, float, float)) ], Js.t(_t))Sets the matrix based on all the available properties
- parameter x
Position on the x axis
- parameter y
Position on the y axis
- parameter pivotX
Pivot on the x axis
- parameter pivotY
Pivot on the y axis
- parameter scaleX
Scale on the x axis
- parameter scaleY
Scale on the y axis
- parameter rotation
rotation in radians
- parameter skewX
Skew on the x axis
- parameter skewY
Skew on the y axis
- returns
This matrix. Good for chaining method calls.
method toArray: Js.Internal.meth([ `Arity_2((bool, Js.Undefined.t(Js.Typed_array.Float32Array.t))) ], array(float))Creates an array from the current Matrix object
- deprecated
Consider using Matrix.toArray
- see /bs-pixi/PIXI/Matrix-PIXI/#val-toArray
Matrix.toArray
- parameter transpose
Whether we need to transpose the matrix or not
- parameter out
(optional) If provided the array will be assigned to out
- returns
the newly created array which contains the matrix
method translate: Js.Internal.meth([ `Arity_2((float, float)) ], Js.t(_t))Translates the matrix on the x and y
- parameter x
How much to translate x by
- parameter y
How much to translate y by
- returns
This matrix. Good for chaining method calls.