JSPM

transform-to-matrix

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

A tiny library to get 2/3D matricies from CSS3 transform functions. Fully covered by unit tests, with support for AMD, CommonJS, Node, and browser globals.

Package Exports

  • transform-to-matrix

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 (transform-to-matrix) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

transform-to-matrix

A tiny library to get 2/3D matricies from CSS3 transform functions. Fully covered by unit tests, with support for AMD, CommonJS, Node, and browser globals.

example

var getMatrix = require('transform-to-matrix'),
    matrix = getMatrix.translate3d(10, 50, 100)
    // ->
    // [
    // 	  [1, 0, 0, 10],
    //    [0, 1, 0, 50],
    //    [0, 0, 1, 100],
    //    [0, 0, 0, 1]
    // ]

supported transforms

  • perspective
  • rotate
  • rotateX
  • rotateY
  • rotateZ
  • rotate3d
  • scale
  • scaleX
  • scaleY
  • scaleZ
  • scale3d
  • skew
  • skewX
  • skewY
  • translate
  • translateX
  • translateY
  • translateZ
  • translate3d

see