JavaScript get matrix transform from regular CSS and convert matrix2D to matrix3D -
i need matrix transform regular css transform one: rotatex(10deg) rotatez(10deg)
.
i know there existring solution webkit (webkitcssmatrix) there nothing firefox or ie...
so, tried matrix setting transform invisible (not in dom) , getting getcomputedstyle method return nothing if element hidden or detached document.
is there tutorial convert values matrix ?
then, how convert 2d matrix 3d ? 6 16 values...
you can calculate matrix yourself. pages explains how describe rotations 2d matrix: http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/flash/geom/matrix.html
for rotation be:
the matrix values can accessed through these properties. last row not need modified 2d. initialize matrix in css use: matrix(a,b,c,d,e,f)
for 3d matrices can find nice introduction here: http://www.eleqtriq.com/2010/05/understanding-css-3d-transforms/
than read how set matrix manually: http://www.eleqtriq.com/2010/05/css-3d-matrix-transformations/
in both cases have multiply several matrices if want apply more 1 transformation. information how can found here: http://www.useragentman.com/blog/2011/01/07/css3-matrix-transform-for-the-mathematically-challenged/
Comments
Post a Comment