Search code examples
javascriptprototypejsscriptaculous

how to get the highest resolution timeout from prototype (like scriptaculous)


What is the timing method and interval that scriptaculous uses in prototype for its smooth tweening? PeriodicalExecuter?


Solution

  • Method: setTimeout(), setInterval()

    Interval: Milliseconds

    You can also adjust the frame rate that Scriptaculous uses to make animations smoother (results vary by browser and the user's machine speed unfortunately):

    fps: Target this many frames per second. Default to 25. Can’t be higher than 100.

    Example: new Effect.Fade('myDiv',{fps:60})