Jump to content

How to do a InOutSine ease


Recommended Posts

Hi Again!

Nikos... I have a funny feeling that you don't want ease-in or ease-out at all.  I think you want linear acceleration and deceleration.


hold A or D keys... check out how that acts.  Is that anything like the "feel" you are looking for?

Down in the renderLoop, I am constantly rotating 'rotSpeed' amount.  RotSpeed starts at 0, but the longer you hold the A or D keys... the faster or slower it goes (because rotSpeed is increasing/decreasing its rotational increments). 

Up at the top of the playground... there you can see the A/D keys... adding or subtracting .001 rotSpeed per keypress.  This gives you a linear easing to full speed, and a linear easing to stop.

The thing to remember is that the code in registerBeforeRender is running constantly. 

How's it feel to you?  Is this close to what you are looking-for... as far as easing?  *shrug*

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...