Skip to main content

Class: FaceAnimation

The animation data that is used internally in an atlas texture. This holds the data and will be used to draw on the texture atlas.

Constructors​

constructor​

• new FaceAnimation(range, keyframes, fadeFrames?): FaceAnimation

Create a new face animation. This holds the data and will be used to draw on the texture atlas.

Parameters​

NameTypeDefault valueDescription
rangeUVundefinedThe range of the texture atlas that this animation uses.
keyframes[number, Color | HTMLImageElement][]undefinedThe keyframes of the animation. This will be queried and drawn to the texture atlas.
fadeFramesnumber0The fading duration between each keyframe in milliseconds.

Returns​

FaceAnimation

Properties​

fadeFrames​

• fadeFrames: number

The fading duration between each keyframe in milliseconds.


keyframes​

• keyframes: [number, Color | HTMLImageElement][]

The keyframes of the animation. This will be queried and drawn to the texture atlas.


range​

• range: UV

The range of the texture atlas that this animation uses.