Canvas Toolkit
← Class index

CAnimationGroup

Animation · extends CAbstractAnimation

Owns its members. Edit membership only while stopped; takeAnimation transfers ownership.

Module animation/CAnimationGroup.js. This class is available through the browser modules in the download.

Declared members

animationCount(): number;
animationAt(index: number): CAbstractAnimation | null;
protected animations(): readonly CAbstractAnimation[];
setExternalClock(external: boolean): void;

@internal Propagates a containing group's clock policy to nested members.

protected updateAnimations(): void;

Allows derived groups to discard references after membership changes.

protected memberDuration(animation: CAbstractAnimation): number;

Groups have finite members; repeat the containing group for an endless show.

abstract duration(): number;
setDuration(_duration: number): void;

A group's duration is derived from its members.

addAnimation(animation: CAbstractAnimation): void;
takeAnimation(index: number): CAbstractAnimation | null;
removeAnimation(animation: CAbstractAnimation): boolean;
clear(): void;

Destroys all members. Use takeAnimation to retain a member instead.

destroy(): void;