mat4-css-stringify

1.0.1 • Public • Published

mat4-css-stringify

frozen

Stringifies a 4x4 matrix (stored in a 16 float flat array) into a matrix3d() string. Useful in conjunction with mat4-css-parse.

var stringify = require('mat4-css-stringify')
var parse = require('mat4-css-parse')
 
//get element's current transformation
var mat4 = parse(computedStyle.transform)
 
// ... do some matrix operations on the array
 
//then update the transform
var style = stringify(mat4)
require('dom-css')(element, 'transform', style)

Usage

NPM

str = stringify(matrix)

Returns a matrix3d() string representing the given 4x4 matrix (i.e. array with 16 floats).

License

MIT, see LICENSE.md for details.

Package Sidebar

Install

npm i mat4-css-stringify

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mattdesl