Lost Password
Create an Account

Your username must be unique, and cannot be changed later.

We use your email address to email you a secure password and verify your account.

Spin cube with focus: true

HomeForumsWink uiSpin cube with focus: true

This topic has 2 voices, contains 1 reply, and was last updated by  sylvain 262 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
August 9, 2012 at 7:23 pm #link

I need to use the cube with spin effect, and deceleration as you running out of spin. Is that possible?

September 4, 2012 at 6:36 am #link

Hi,

If you want to rotate the cube linearly, try this:

setInterval(function() {
  cube.rotate(50, 0, 1000);
}, 1000);

The third parameter is the duration of the transition.

But if you want a responsive to finger’s animation with deceleration, it’s possible but more difficult. You have to look at the scroller’s mechanism which use the inertia component in order to compute the duration of the cubic-bezier’s transition to apply to the cube.

Hope this helps.

Sylvain

  • This reply was modified 262 days ago by  sylvain.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.