javascript - css3 Transform: rotate moves the view -


i trying move view in pseudo 3d environment. started divs , got first - lets call room.

but when rotate, view not rotates, moves. makes pretty hard calculate @ position in 3d real are.

any idea how solve this.

here fiddle:

http://jsfiddle.net/torsten/hhqcg/

and here how add transformation div:

document.getelementbyid('world').style.webkittransform = "translate3d(0px, 0px, 0px) rotatey(45deg)"; 

perhaps it's order of transforms.

try rotating first:

function updatemap() {     //alert(mappos.rotate);     document.getelementbyid('world').style.webkittransform = "rotatey(" + mappos.rotate + "deg) translate3d(" + mappos.x +"px, " + mappos.y + "px, " + mappos.z + "px) "; } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -