mat4x4f
Schema representing mat4x4f - a matrix with 4 rows and 4 columns, with elements of type f32. Also a constructor function for this matrix type.
Examples
Section titled “Examples”const zero4x4 = mat4x4f(); // filled with zeros
const mat = mat4x4f(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);mat.columns[0] // vec4f(0, 1, 2, 3)mat.columns[1] // vec4f(4, 5, 6, 7)mat.columns[2] // vec4f(8, 9, 10, 11)mat.columns[3] // vec4f(12, 13, 14, 15)
const mat = mat4x4f( vec4f(0, 1, 2, 3), // column 0 vec4f(4, 5, 6, 7), // column 1 vec4f(8, 9, 10, 11), // column 2 vec4f(12, 13, 14, 15), // column 3);
const buffer = root.createBuffer(d.mat4x4f, d.mat4x4f()); // buffer holding a d.mat4x4f value, with an initial value of mat4x4f filled with zeros
Call Signature
Section titled “Call Signature”mat4x4f(…
elements
):m4x4f
Defined in: packages/typegpu/src/data/matrix.ts:823
Parameters
Section titled “Parameters”elements
Section titled “elements”…[number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
, number
]
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”mat4x4f(…
columns
):m4x4f
Defined in: packages/typegpu/src/data/matrix.ts:823
Parameters
Section titled “Parameters”columns
Section titled “columns”Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”mat4x4f():
m4x4f
Defined in: packages/typegpu/src/data/matrix.ts:823