Phaser API Documentation

  Version: 
setMatrix2fv(name, transpose, matrix)

Description:

Sets a matrix 2fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the WebGL Renderer, if it isn't already. It also sets this shader as being the current one within the pipeline it belongs to.

Parameters:

name type description
name string

The name of the uniform to set.

transpose boolean

Whether to transpose the matrix. Should be false.

matrix Array.<number> | Float32Array

The new values for the mat2 uniform.

Returns:
Description:

This WebGLShader instance.

Since: 3.50.0