Canvas Toolkit
← Class index

CPropertyAnimation

Animation · extends CVariantAnimation<T>

Animation bound to a setter, for example value => widget.setOpacity(value). Configuration while stopped does not touch the target. Starting, seeking and applyCurrentValue() write it explicitly, even when the numeric value is unchanged. Stop or destroy the animation before disposing of a target captured by the setter.

import { CPropertyAnimation } from "canvas-toolkit-lib";

Declared members

constructor(setter: (value: T) => void, parent?: CObject | null);
setStartValue(value: T): void;
setEndValue(value: T): void;
setKeyValueAt(step: number, value: T): void;
setKeyValues(values: readonly CAnimationKeyValue<T>[]): void;
setDuration(duration: number): void;
setEasingCurve(curve: CEasingCurve | CEasingCurveType): void;
setLoopCount(count: number): void;
setDirection(direction: CAnimationDirection): void;
setAutoReverse(enabled: boolean): void;
protected updateCurrentTime(time: number): void;
destroy(): void;