description export class AnimationManager { private static delayCounter = 0 ; /**
     * true if all animations should end as soon as possible (no delay anymore)
     * by default, it is true (not in animation mode)
     */ private static mustEnd = true ; param ms returns static async delay ( ms ) { if ( AnimationManager . mustEnd ) return ; const minRealDelay = 10 ; if ( ms >= minRealDelay ) { await AnimationManager . waitFor ( ms ) ; } if ( ms > 0 ) { if ( AnimationManager . delayCounter > minRealDelay / ms ) { await AnimationManager . waitFor ( ms ) ; AnimationManager . delayCounter = 0 ; } AnimationManager . delayCounter ++ ; } } param nbMilleSeconds returns private static waitFor ( nbMilleSeconds ) { return new Promise ( function ( resolve ) { setTimeout ( resolve , nbMilleSeconds ) ; } ) ; } /**
     * begin an animation
     */ static begin ( ) { console . log ( "start animation" ) ; AnimationManager . mustEnd = false ; } /**
     * end an animation
     */ static end ( ) { console . log ( "stop animation" ) ; AnimationManager . mustEnd = true ; } returns static get isRunning ( ) : boolean { console . log ( `is running: ${ ! AnimationManager . mustEnd }` ) ; return ! AnimationManager . mustEnd ; } }