Phaser API Documentation

  Version: 
setMatrix4fv(name, transpose, matrix, [shader])

Description:

Sets a matrix 4fv uniform value based on the given name on the currently set shader.

The current shader is bound, before the uniform is set, making it active within the WebGLRenderer. This means you can safely call this method from a location such as a Scene create or update method. However, when working within a Shader file directly, use the WebGLShader method equivalent instead, to avoid the program being set.

Parameters:

name type arguments description
name string

The name of the uniform to set.

transpose boolean

Should the matrix be transpose

matrix Float32Array

Matrix data

shader Phaser.Renderer.WebGL.WebGLShader <optional>

The shader to set the value on. If not given, the currentShader is used.

Returns:
Description:

This WebGLPipeline instance.

Since: 3.50.0