UNPKG

@types/tween-functions

Version:
84 lines (76 loc) 2.71 kB
# Installation > `npm install --save @types/tween-functions` # Summary This package contains type definitions for tween-functions (https://github.com/chenglou/tween-functions). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tween-functions. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tween-functions/index.d.ts) ````ts declare namespace tweenFunctions { type TweenFunction = ( /** Current elapsed time */ time: number, /** Beginning value */ start: number, /** Final value */ end: number, /** Total duration of the animation */ duration: number, ) => number; type TweenFunctionBack = ( /** Current elapsed time */ time: number, /** Beginning value */ start: number, /** Final value */ end: number, /** Total duration of the animation */ duration: number, /** Overshoot parameter. Defaults to 1.70158 - Penner’s Magic Number (10% overshoot) */ overshoot?: number, ) => number; interface TweenFunctions { linear: TweenFunction; easeInQuad: TweenFunction; easeOutQuad: TweenFunction; easeInOutQuad: TweenFunction; easeInCubic: TweenFunction; easeOutCubic: TweenFunction; easeInOutCubic: TweenFunction; easeInQuart: TweenFunction; easeOutQuart: TweenFunction; easeInOutQuart: TweenFunction; easeInQuint: TweenFunction; easeOutQuint: TweenFunction; easeInOutQuint: TweenFunction; easeInSine: TweenFunction; easeOutSine: TweenFunction; easeInOutSine: TweenFunction; easeInExpo: TweenFunction; easeOutExpo: TweenFunction; easeInOutExpo: TweenFunction; easeInCirc: TweenFunction; easeOutCirc: TweenFunction; easeInOutCirc: TweenFunction; easeInElastic: TweenFunction; easeOutElastic: TweenFunction; easeInOutElastic: TweenFunction; easeInBack: TweenFunctionBack; easeOutBack: TweenFunctionBack; easeInOutBack: TweenFunctionBack; easeInBounce: TweenFunction; easeOutBounce: TweenFunction; easeInOutBounce: TweenFunction; } } /** * Easing functions specify the rate of change of a parameter over time. */ declare const tweenFunctions: tweenFunctions.TweenFunctions; export = tweenFunctions; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Ivan Ergunov](https://github.com/hozblok).