{"_id":"2d-css-matrix-parse","_rev":"3-dcde141cc41dd3d5290197e8823a8fe3","name":"2d-css-matrix-parse","description":"Module that parse a 2D css transform matrix into a 3x3 array. Also the module allow you get the matrix array from a specified element","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"2d-css-matrix-parse","version":"1.0.0","description":"Module that parse a 2D css transform matrix into a 3x3 array. Also the module allow you get the matrix array from a specified element","main":"index.js","scripts":{"test":"node test.js"},"keywords":["animations","2d","matrix","matrix2d","3x3","parse","css-parse","transformation","transform","scale","translate"],"author":{"name":"Iran Reyes","email":"iranreyesfleitas@gmail.com","url":"http://www.iranreyes.com"},"license":"MIT","dependencies":{"get-style-property":"^0.1.1"},"devDependencies":{"tape":"^4.2.2"},"repository":{"type":"git","url":"git://github.com/iranreyes/2d-css-matrix-parse.git"},"homepage":"https://github.com/iranreyes/2d-css-matrix-parse","bugs":{"url":"https://github.com/iranreyes/2d-css-matrix-parse/issues"},"gitHead":"bcde22dde77a02ae7e1256799d50acb2253bdd7c","_id":"2d-css-matrix-parse@1.0.0","_shasum":"b371214d77dbfe79e3b8da4e0ce57f6e68bb76e7","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"iranreyes","email":"iranreyesfleitas@gmail.com"},"dist":{"shasum":"b371214d77dbfe79e3b8da4e0ce57f6e68bb76e7","tarball":"https://registry.npmjs.org/2d-css-matrix-parse/-/2d-css-matrix-parse-1.0.0.tgz","integrity":"sha512-UfjgfnraVU0LhNoYaGuQwTy9YQ1lH6M0ntZDvF7YH2mpiQwhXzuYN44SAQvqqXkdbPa7a7a9XRoBBsgBESq0pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDl5X9WOQzGBTAofcfKfOqZlTCTF2Xrv1kOMXgR/j8s7gIhAOuPPVSigN7WUH0X/1Vy2T4uIvu+MTlsUhm2NJR87P4u"}]},"maintainers":[{"name":"iranreyes","email":"iranreyesfleitas@gmail.com"}]}},"readme":"# 2d-css-matrix-parse\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nConverts css transform matrix to an 2D array of 6 values(3x3 matrix).\n\n### Function parse\n\nThe `parse` function takes a matrix string representation like `matrix(1.1, 0, 0, 1.1, 0, 0)` and parse it to an array of floats.\n\n```js\nvar matrixTransform = require('./index.js');\n\nvar matrix = \"matrix(1.1, 0, 0, 1.1, 0, 0)\";\n\nmatrixTransform.parse(matrix);\n// -> [1.1, 0, 0, 1.1, 0, 0]\n```\n\n### Function fromElement\n\nThe `fromElement` function tries to help you to get the transform string matrix representation and let you pass instead of the string the HTML element itself.\n\n```js\nvar matrixTransform = require('./index.js');\n\nvar element = document.createElement('div');\nelement.style.transform = \"scale(1.5)\";\ndocument.body.appendChild(element);\n\nmatrixTransform.fromElement(element);\n// -> [1.5,0,0,1.5,0,0]\n```\n\n**Important Note:**\n\nDoesn't matter if the transform is not formatted as a matrix, in the above example we are setting to `element` the value `scale` instead of the current matrix.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/2d-css-matrix-parse.png)](https://www.npmjs.com/package/2d-css-matrix-parse)\n\n#### `matrixTransform.parse(string)`\n\nIt takes a string matrix representation and gives you an array.\n\n#### `matrixTransform.fromElement(HtmlElement)`\n\nIt takes an Html Element and gives you an array with the element transformation.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/float-hsl2rgb/blob/master/LICENSE.md) for details.","maintainers":[{"name":"iranreyes","email":"iranreyesfleitas@gmail.com"}],"time":{"modified":"2022-06-12T14:06:51.241Z","created":"2015-12-07T04:19:08.951Z","1.0.0":"2015-12-07T04:19:08.951Z"},"homepage":"https://github.com/iranreyes/2d-css-matrix-parse","keywords":["animations","2d","matrix","matrix2d","3x3","parse","css-parse","transformation","transform","scale","translate"],"repository":{"type":"git","url":"git://github.com/iranreyes/2d-css-matrix-parse.git"},"author":{"name":"Iran Reyes","email":"iranreyesfleitas@gmail.com","url":"http://www.iranreyes.com"},"bugs":{"url":"https://github.com/iranreyes/2d-css-matrix-parse/issues"},"license":"MIT","readmeFilename":"README.md"}