Phaser API Documentation

  Version: 
setLagSmooth([limit], [skip])

Description:

Set the limits that are used when a browser encounters lag, or delays that cause the elapsed time between two frames to exceed the expected amount. If this occurs, the Tween Manager will act as if the 'skip' amount of times has passed, in order to maintain strict tween sequencing.

This is enabled by default with the values 500ms for the lag limit and 33ms for the skip.

You should not set these to low values, as it won't give time for the browser to ever catch-up with itself and reclaim sync.

Call this method with no arguments to disable smoothing.

Call it with the arguments 500 and 33 to reset to the defaults.

Parameters:

name type arguments description
limit number <optional>

If the browser exceeds this amount, in milliseconds, it will act as if the 'skip' amount has elapsed instead.

skip number <optional>

The amount, in milliseconds, to use as the step delta should the browser lag beyond the 'limit'.

Returns:
Description:

This Tween Manager instance.

Since: 3.60.0