UNPKG

arcade-physics

Version:
197 lines 5.78 kB
export default Matrix3; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @classdesc * A three-dimensional matrix. * * Defaults to the identity matrix when instantiated. * * @class Matrix3 * @memberof Phaser.Math * @constructor * @since 3.0.0 * * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from. */ declare class Matrix3 { constructor(m: any); /** * The matrix values. * * @name Phaser.Math.Matrix3#val * @type {Float32Array} * @since 3.0.0 */ val: Float32Array; /** * Make a clone of this Matrix3. * * @method Phaser.Math.Matrix3#clone * @since 3.0.0 * * @return {Phaser.Math.Matrix3} A clone of this Matrix3. */ clone(): Phaser.Math.Matrix3; /** * This method is an alias for `Matrix3.copy`. * * @method Phaser.Math.Matrix3#set * @since 3.0.0 * * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ set(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; /** * Copy the values of a given Matrix into this Matrix. * * @method Phaser.Math.Matrix3#copy * @since 3.0.0 * * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ copy(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; /** * Copy the values of a given Matrix4 into this Matrix3. * * @method Phaser.Math.Matrix3#fromMat4 * @since 3.0.0 * * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ fromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3; /** * Set the values of this Matrix from the given array. * * @method Phaser.Math.Matrix3#fromArray * @since 3.0.0 * * @param {array} a - The array to copy the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ fromArray(a: any[]): Phaser.Math.Matrix3; /** * Reset this Matrix to an identity (default) matrix. * * @method Phaser.Math.Matrix3#identity * @since 3.0.0 * * @return {Phaser.Math.Matrix3} This Matrix3. */ identity(): Phaser.Math.Matrix3; /** * Transpose this Matrix. * * @method Phaser.Math.Matrix3#transpose * @since 3.0.0 * * @return {Phaser.Math.Matrix3} This Matrix3. */ transpose(): Phaser.Math.Matrix3; /** * Invert this Matrix. * * @method Phaser.Math.Matrix3#invert * @since 3.0.0 * * @return {Phaser.Math.Matrix3} This Matrix3. */ invert(): Phaser.Math.Matrix3; /** * Calculate the adjoint, or adjugate, of this Matrix. * * @method Phaser.Math.Matrix3#adjoint * @since 3.0.0 * * @return {Phaser.Math.Matrix3} This Matrix3. */ adjoint(): Phaser.Math.Matrix3; /** * Calculate the determinant of this Matrix. * * @method Phaser.Math.Matrix3#determinant * @since 3.0.0 * * @return {number} The determinant of this Matrix. */ determinant(): number; /** * Multiply this Matrix by the given Matrix. * * @method Phaser.Math.Matrix3#multiply * @since 3.0.0 * * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by. * * @return {Phaser.Math.Matrix3} This Matrix3. */ multiply(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; /** * Translate this Matrix using the given Vector. * * @method Phaser.Math.Matrix3#translate * @since 3.0.0 * * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. * * @return {Phaser.Math.Matrix3} This Matrix3. */ translate(v: (Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4)): Phaser.Math.Matrix3; /** * Apply a rotation transformation to this Matrix. * * @method Phaser.Math.Matrix3#rotate * @since 3.0.0 * * @param {number} rad - The angle in radians to rotate by. * * @return {Phaser.Math.Matrix3} This Matrix3. */ rotate(rad: number): Phaser.Math.Matrix3; /** * Apply a scale transformation to this Matrix. * * Uses the `x` and `y` components of the given Vector to scale the Matrix. * * @method Phaser.Math.Matrix3#scale * @since 3.0.0 * * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. * * @return {Phaser.Math.Matrix3} This Matrix3. */ scale(v: (Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4)): Phaser.Math.Matrix3; /** * Set the values of this Matrix from the given Quaternion. * * @method Phaser.Math.Matrix3#fromQuat * @since 3.0.0 * * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ fromQuat(q: Phaser.Math.Quaternion): Phaser.Math.Matrix3; /** * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ normalFromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3; } //# sourceMappingURL=Matrix3.d.ts.map