Skip to content
pixi-silk
GitHub repository
Function

countDuration

import { countDuration } from 'pixi-silk/ui/odometer';
function countDuration(
   base: number, 
   delta: number, 
   speedUp: boolean
): number;

Count-up time in seconds for a jump of delta units. With speedUp it scales base by 0.6 to 3, growing with the log of the jump. Without it, returns base.

Parameters#

ParameterType
basenumber
deltanumber
speedUpboolean

Returns#

number