NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import {Animation} from 'ngl/src/animation/animation.js'
public interface | source

Animation

Animation. Base animation class.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public get

True when animation has finished

public
public
public
public get

True when animation is paused

public
public
public
Private Members
private
private
private

Method Summary

Public Methods
public

Pause animation

public

resume(releaseHold: Boolean): undefined

Resume animation

public

then(callback: Function): Promise

Promise-like interface

public

tick()

public

Toggle animation

Private Methods
private abstract

init animation

private abstract

called on every tick

Public Constructors

public constructor() source

Public Members

public alpha source

public controls source

public get done: Boolean source

True when animation has finished

public duration source

public elapsedDuration source

public ignoreGlobalToggle source

public get paused: Boolean source

True when animation is paused

public pausedDuration source

public pausedTime source

public startTime source

Private Members

private _hold source

private _paused source

private _resolveList source

Public Methods

public pause(hold: Boolean): undefined source

Pause animation

Params:

NameTypeAttributeDescription
hold Boolean
  • optional

put animation on a hold which must be release before it can be resumed

Return:

undefined

public resume(releaseHold: Boolean): undefined source

Resume animation

Params:

NameTypeAttributeDescription
releaseHold Boolean
  • optional

release a hold on the animation

Return:

undefined

public then(callback: Function): Promise source

Promise-like interface

Params:

NameTypeAttributeDescription
callback Function

a callback

Return:

Promise

a promise

public tick() source

public toggle(): undefined source

Toggle animation

Return:

undefined

Private Methods

private abstract _init(): undefined source

init animation

Return:

undefined

private abstract _tick(): undefined source

called on every tick

Return:

undefined