css-transform-to-mat4

Will take a string which is a css transform value (2d or 3d) and return a mat4 or 3d transformation matrix from the string.

Showing:

Popularity

Downloads/wk

1

GitHub Stars

15

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

1.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

css-transform-to-mat4

experimental

Will take a string which is a css transform value (2d or 3d) and return a mat4 or 3d transformation matrix from the string.

Usage

NPM

Example:

var getMatrix = require('css-transform-to-mat4');

var matrix3DA = getMatrix('translate(40px, 20px)'); // works with 2d transforms
var matrix3DB = getMatrix('perspective(1000px) translate3d(40px, 20px, -1000px)'); // and 3d

To see more examples check out: http://requirebin.com/?gist=adf102de923cf6f1dc82

License

MIT, see LICENSE.md for details.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100