css-matrix-convert
v1.0.2
Published
compatible css transfrom API
Downloads
1
Readme
Install
npm install css-matrix-convert --save
API
import matrix, { rotate3d, ... } from 'css-matrix-convert'
// rotate
el.style.transform = rotate3d(el, x, y, z, deg)
el.style.transform = rotateX(el, deg)
el.style.transform = rotateY(el, deg)
el.style.transform = rotateZ(el, deg)
// translate
el.style.transform = translate3d(el, x, y, z)
el.style.transform = translateX(el, x)
el.style.transform = translateZ(el, z)
el.style.transform = translate(el, x, y)
// scale
el.style.transform = scale3d(el, x, y, z)
el.style.transform = scaleX(el, x)
el.style.transform = scaleY(el, y)
el.style.transform = scaleZ(el, z)
el.style.transform = scale(el, x, y)
// skew
el.style.transform = skew(el, x, y)
el.style.transform = skewX(el, x)
el.style.transform = skewY(el, y)
// Like css add the same style
matrix('#id .class' or HTMLElemtn)
.rotate3d(x, y, z, deg)
.translate(x, y)
.scale(x, y)
...