CSSMatrix

A CSSMatrix shim for 3D tranformation matrices

npm install CSSMatrix
6 downloads in the last week
16 downloads in the last month

CSSMatrix

Build Status

This is a CSSMatrix class as defined by the w3c CSS3 3d Transforms specification.

Installation

npm install CSSMatrix

Usage

It should be compatible with documentation defined at w3.org and at WebKitCSSMatrix Safari documentation.

Methods:

  • translate(x, y, z)
  • scale(x, y, z)
  • rotate(rx, ry, rz)
  • rotateAxisAngle(x, y, z, angle)
  • skewX(angle)
  • skewY(angle)
  • toString()

Additional Methods:

  • transform(tuple)
  • toFullString()

Properties:

  • m11 to m44. m12 is the second element in the first row.
npm loves you