Class

Keyframe

AnimationSequencer.Keyframe()

Animation keyframe class

Constructor

# new Keyframe()

View Source utils/animationSequencer.js, line 9

Methods

# applyEasing(t, easingType) → {number}

Apply easing function

Parameters:
Name Type Description
t number

Time parameter (0-1)

easingType string

Easing type

View Source utils/animationSequencer.js, line 56

Eased value

number

# bounceEasing(t) → {number}

Bounce easing function

Parameters:
Name Type Description
t number

Time parameter

View Source utils/animationSequencer.js, line 76

Bounced value

number

# elasticEasing(t) → {number}

Elastic easing function

Parameters:
Name Type Description
t number

Time parameter

View Source utils/animationSequencer.js, line 96

Elastic value

number

# hexToRgb(hex) → {Object}

Convert hex to RGB

Parameters:
Name Type Description
hex string

Hex color

View Source utils/animationSequencer.js, line 124

RGB object

Object

# interpolate(nextKeyframe, progress) → {Object}

Interpolate between this keyframe and another

Parameters:
Name Type Description
nextKeyframe Keyframe

Next keyframe

progress number

Progress (0-1)

View Source utils/animationSequencer.js, line 23

Interpolated properties

Object

# interpolateColor(color1, color2, progress) → {string}

Interpolate between two colors

Parameters:
Name Type Description
color1 string

Start color (hex)

color2 string

End color (hex)

progress number

Progress (0-1)

View Source utils/animationSequencer.js, line 108

Interpolated color

string

# rgbToHex(r, g, b) → {string}

Convert RGB to hex

Parameters:
Name Type Description
r number

Red component

g number

Green component

b number

Blue component

View Source utils/animationSequencer.js, line 140

Hex color

string