Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
Note: This feature is available in Web Workers.
The fromFloat32Array() static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values.
If the array has 6 values, the result is a 2D matrix; if the array has 16 values, the result is a 3D matrix. Otherwise, a TypeError exception is thrown.
A Float32Array with 6 or 16 elements in column-major order.
A DOMMatrix object.
Thrown if the length of the array parameter is not 6 or 16.
This example creates a 2D matrix from a 6-element Float32Array.
This example creates a 3D matrix from a 16-element Float32Array.
| Geometry Interfaces Module Level 1 # dom-dommatrix-fromfloat32array |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 28, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.