function rotate(dom, axis, scale, i, offset, direct) {
	                var rotateDirect = (axis === 'X') ? 'Y' : 'X';

	                if (this.isVertical) {
	                    offset = -offset;
	                    if (Math.abs(direct) > 1) {
	                        direct = -direct;
	                    }
	                }

	                var outer = dom.parentElement;
	                iSlider.setStyle(outer, 'perspective', scale * 4);

	                dom.style.visibility = 'visible';
	                if (direct > 0 && i === 2) {
	                    dom.style.visibility = 'hidden';
	                }
	                if (direct < 0 && i === 0) {
	                    dom.style.visibility = 'hidden';
	                }
	                dom.style.zIndex = i === 1 ? 1 : 0;

	                dom.style.cssText += iSlider.styleProp('backface-visibility') + ':hidden;' + iSlider.styleProp('transform-style') + ':preserve-3d;' + 'position:absolute;';

	                // TODO: overflow... I dont understand why there are many differences between ios and desktop. Maybe they have different interpretations of Perspective
	                iSlider.setStyle(dom, 'transform', 'rotate' + rotateDirect + '(' + 90 * (offset / scale + i - 1) + 'deg) translateZ(' + (0.889 * scale / 2) + 'px) scale(0.889)');
	            }
More animations
@file animate.js
@author BE-FE Team
   xieyu33333 xieyu33333@gmail.com
   shinate shine.wangrs@gmail.com