Phaser API Documentation

  Version: 
setQuad(x, y, xw, yh, roundPixels, [quad])

Description:

Performs the 8 calculations required to create the vertices of a quad based on this matrix and the given x/y/xw/yh values.

The result is stored in TransformMatrix.quad, which is returned from this method.

Parameters:

name type arguments description
x number

The x value.

y number

The y value.

xw number

The xw value.

yh number

The yh value.

roundPixels boolean

Pass the results via Math.round?

quad Float32Array <optional>

Optional Float32Array to store the results in. Otherwises uses the local quad array.

Returns:
Description:

The quad Float32Array.

Type:
  • Float32Array
Since: 3.60.0