Timeline control with ease

hi all,
i am trying to do a 3d spinning cube with ease out
i have modelled the cube in swift and made a 360 degree turn animation on the timeline.
what i am trying to achieve is to be able to spin the cube towards right or to the left …
it would be great if the user can drag the cube and depending on the speen of the mouse the cube spins longer …

can anyone help me?