C

WebGLAnimationTiming

Encapsulates the values that specify the timing information for an animation used by WebGL2 animations.
Inheritance Hierarchy

Remarks

This class is immutable and provides read-only access to the properties specified in the constructor, only. The class is modelled loosely after the set of CSS animation properties. However, it does not use animation names and does not support animation delays. Animation timing consists of an integral, non-negative number of animation cycles specified via the iterationCount property. Each cycle has the same duration. An easing function determines how progress happens in each cycle. The direction determines whether the animation plays forward, reverse, or alternates.

This is a convertible type that can be used with the following basic pattern in parameter lists, parameter objects or setters when annotated as such: duration easing-function iteration-count direction. This syntax is similar to the CSS shorthand for animation, but it does not support more than one iteration count or non-integral iteration counts, delays, fill-mode, and animation names. none can be used to specify no animation, explicitly. All parts are optional and the default is 1s linear 1 normal: A linear timing function that takes 1 second to go from zero to 1.

Examples

Examples of the shorthand notation
const beaconAnimation = webGLGraphModelManager.createBeaconAnimation({
  type: WebGLBeaconAnimationType.FADE,
  timing: '300ms ease-in-out infinite',
})

const dashAnimation1 = webGLGraphModelManager.createDashAnimation({
  timing: '1s ease 11 reverse',
})

const dashAnimation2 = webGLGraphModelManager.createDashAnimation({
  timing: '3s linear',
})

Members

No filters for this type

Constructors

Creates a new immutable instance with the provided values.

Parameters

duration?: TimeSpan
The duration of a single cycle. Defaults to 1 second.
easing?: WebGLAnimationEasing
The easing to apply in each cycle. Defaults to LINEAR
iterationCount?: number
The number of iterations. Defaults to 1.
direction?: WebGLAnimationDirection
The animation direction. Defaults to NORMAL.

Properties

Gets the direction of the animation.
readonlyfinal

Property Value

The direction.
Gets the duration of a single iteration cycle.
readonlyfinal

Property Value

The duration of one cycle.
Gets the easing function to apply for each iteration.
readonlyfinal

Property Value

The easing function.
Gets the number of cycles of the animation.
readonlyfinal

Property Value

The number of iterations.

Constants

A default timing with default values for all properties.
It runs for 1 second in linear fashion once in normal direction.
static
A timing that has a zero duration and a single cycle, only.
Using this timing, this applies the effect, immediately, as if there was no animation.
static