JSPM

mat4-css-stringify

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q30419F
  • License MIT

stringifies a mat4 into a css matrix3d()

Package Exports

  • mat4-css-stringify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mat4-css-stringify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.