Jump to content
Search Community

Veil

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Veil

  1. 1 hour ago, OSUblake said:

    This adds 90 to the current rotation. So if the rotation is currently at 150, it will tween to 240.

    
    TweenMax.to($('.box__front'), 2, {rotationY:'+=90',   ease:Quad.easeInOut});

     

    You need to rotate the faces to some multiple of 90. You can get the rotation of an element like this after a transform has been applied to it.

    
    var rotationY = element._gsTransform.rotationY;

     

    And here some pens that might help you out.

    See the Pen xryvjZ?editors=0010 by osublake (@osublake) on CodePen

     

    See the Pen QNpxEo by osublake (@osublake) on CodePen

     

    See the Pen QNppmB?editors=0010 by osublake (@osublake) on CodePen

     

     

     

    Thanks for the help, but I already solved this problem on an ordinary Javascript with IE11 support))

  2. I was trying to create an event of button click which would stop the cube rotation and cause its spinning 90 degrees to the left (if 'left' button clicked) or to the right (if 'right' button clicked) so that the cube turned front strictly with the face, not its edge.  I did it according to the docs, but it won't work.  

    See the Pen yoyEzB by anon (@anon) on CodePen

×
×
  • Create New...