import type { CommandExecutionContext, SModelRootImpl } from "sprotty"; import { Animation } from "sprotty"; /** * Base class for cancelable animations. * A canceled animation immediately stops animation and does NOT animate to the final state. */ export declare abstract class CancelableAnimation extends Animation { protected readonly newModel: SModelRootImpl; /** * Creates a new CancelableAnimation * * @param newModel the new model which is returned on cancel * @param context the context to pass to super */ constructor(newModel: SModelRootImpl, context: CommandExecutionContext); tween(t: number, context: CommandExecutionContext): SModelRootImpl; /** * Calls tween and updates the change revision of the new model * * @param t varies between 0 (start of animation) and 1 (end of animation) * @param context provided context * @returns the new model */ private tweenAndUpdateChangeRevision; /** * This method called by the animation at each rendering pass until * the duration is reached. Implement it to interpolate the state. * Replacement for tween due to cancel support * * @param t varies between 0 (start of animation) and 1 (end of animation) * @param context provided context * @returns the new model */ abstract tweenInternal(t: number, context: CommandExecutionContext): SModelRootImpl; } //# sourceMappingURL=cancelableAnimation.d.ts.map