@types/tween-functions
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/tween-functions

Weekly Downloads

745

Version

1.2.2

License

MIT

Unpacked Size

6.75 kB

Total Files

5

Last publish

Collaborators

  • types