`Web`

objects represent a 4x4 homogeneous matrix for 3D transforms or a vector for 2D transforms. You can use these objects to manipulate matrices in JavaScript. For example, you can multiply, translate, and scale matrices.

Language

- JavaScript

SDKs

- Safari Desktop 10.0+
- Safari Mobile 2.0+

## Overview

The values of a 3D matrix can be initialized from the matrix3d transform function returned by `window`

. To apply the final matrix to an element, construct a string using the matrix3d transform function passing the 16 values, and assign it to `element`

. Similarly, you can construct a matrix for 2D transforms by setting 6 values, represented by the `a`

-`f`

properties.