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
Post a Comment