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:

enter image description here

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)

matrix properties

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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -