Reference Source Test
public class | version 1.0.0 | since 1.0.0 | source

BackgroundColor

Extends:

AbstractAnimation → BackgroundColor

BackgroundColor is designed to cycle between two background colors for an HTMLElement.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Initialize an instance

Member Summary

Public Members
public

Method Summary

Public Methods
public

start(): this

Start the animation

Inherited Summary

From class AbstractAnimation
public get

Always return false if not overriden in childs class

version 1.0.0 since 1.0.0
public

Animejs animation object or timeline

public

Auto-generated unique id for animation

since 1.0.0
public

Options for the animation

since 1.0.0
public

Check if required options have been provided

version 1.0.0 since 1.0.0

Public Constructors

public constructor(options: Object) source

Initialize an instance

Override:

AbstractAnimation#constructor

Params:

NameTypeAttributeDescription
options Object
  • optional
  • default: {}

Options for animation

options.targets HtmlElement

Target(s) for animation

options.from string

Starting color (any valid CSS value)

options.to string

Ending color (any valid CSS value)

options.duration number
  • optional
  • default: 3000

Half-cycle duration

options.easing string
  • optional
  • default: 'easeInOutQuad'

Easing Function

options.direction string
  • optional
  • default: 'alternate'

Animation direction

options.loop boolean | number
  • optional

Should the animation loop or not

Public Members

public animation: * source

Animejs animation object or timeline

Override:

AbstractAnimation#animation

Public Methods

public start(): this source

Start the animation

Return:

this

Chainable