lovr.graphics.transform
Apply a transform to the coordinate system, changing its translation, rotation, and scale using a single function. A mat4
can also be used.
The transformation will last until lovr.draw
returns or the transformation is popped off the transformation stack.
lovr.graphics.transform(x, y, z, sx, sy, sz, angle, ax, ay, az)
Arguments
Name | Type | Default | Description |
x | number | 0 | The x component of the translation. |
y | number | 0 | The y component of the translation. |
z | number | 0 | The z component of the translation. |
sx | number | 1 | The x scale factor. |
sy | number | 1 | The y scale factor. |
sz | number | 1 | The z scale factor. |
angle | number | 0 | The number of radians to rotate around the rotation axis. |
ax | number | 0 | The x component of the axis of rotation. |
ay | number | 1 | The y component of the axis of rotation. |
az | number | 0 | The z component of the axis of rotation. |
Returns
Nothing
Modify the coordinate system using a mat4 object.
lovr.graphics.transform(transform)
Arguments
Name | Type | Description |
transform | mat4 | The mat4 to apply to the coordinate system. |
Returns
Nothing
See also
lovr.graphics.rotate
lovr.graphics.scale
lovr.graphics.translate
lovr.graphics