tween24
Version:
Tween24.js is animation library that enables fast coding using method chains.
392 lines (391 loc) • 12.6 kB
TypeScript
export declare class Ease24 {
/**
* Linear easing.
* @static
* @memberof Ease24
*/
static _Linear(t: number, b: number, c: number, d: number): number;
/**
* Sine easing-in.
* @static
* @memberof Ease24
*/
static _1_SineIn(t: number, b: number, c: number, d: number): number;
/**
* Sine easing-out.
* @static
* @memberof Ease24
*/
static _1_SineOut(t: number, b: number, c: number, d: number): number;
/**
* Sine easing-in-out.
* @static
* @memberof Ease24
*/
static _1_SineInOut(t: number, b: number, c: number, d: number): number;
/**
* Sine easing-out-in.
* @static
* @memberof Ease24
*/
static _1_SineOutIn(t: number, b: number, c: number, d: number): number;
/**
* Quad easing-in.
* @static
* @memberof Ease24
*/
static _2_QuadIn(t: number, b: number, c: number, d: number): number;
/**
* Quad easing-out.
* @static
* @memberof Ease24
*/
static _2_QuadOut(t: number, b: number, c: number, d: number): number;
/**
* Quad easing-in-out.
* @static
* @memberof Ease24
*/
static _2_QuadInOut(t: number, b: number, c: number, d: number): number;
/**
* Quad easing-out-in.
* @static
* @memberof Ease24
*/
static _2_QuadOutIn(t: number, b: number, c: number, d: number): number;
/**
* Cubic easing-in.
* @static
* @memberof Ease24
*/
static _3_CubicIn(t: number, b: number, c: number, d: number): number;
/**
* Cubic easing-out.
* @static
* @memberof Ease24
*/
static _3_CubicOut(t: number, b: number, c: number, d: number): number;
/**
* Cubic easing-in-out.
* @static
* @memberof Ease24
*/
static _3_CubicInOut(t: number, b: number, c: number, d: number): number;
/**
* Cubic easing-out-in.
* @static
* @memberof Ease24
*/
static _3_CubicOutIn(t: number, b: number, c: number, d: number): number;
/**
* Quart easing-in.
* @static
* @memberof Ease24
*/
static _4_QuartIn(t: number, b: number, c: number, d: number): number;
/**
* Quart easing-out.
* @static
* @memberof Ease24
*/
static _4_QuartOut(t: number, b: number, c: number, d: number): number;
/**
* Quart easing-in-out.
* @static
* @memberof Ease24
*/
static _4_QuartInOut(t: number, b: number, c: number, d: number): number;
/**
* Quart easing-out-in.
* @static
* @memberof Ease24
*/
static _4_QuartOutIn(t: number, b: number, c: number, d: number): number;
/**
* Quint easing-in.
* @static
* @memberof Ease24
*/
static _5_QuintIn(t: number, b: number, c: number, d: number): number;
/**
* Quint easing-out.
* @static
* @memberof Ease24
*/
static _5_QuintOut(t: number, b: number, c: number, d: number): number;
/**
* Quint easing-in-out.
* @static
* @memberof Ease24
*/
static _5_QuintInOut(t: number, b: number, c: number, d: number): number;
/**
* Quint easing-out-in.
* @static
* @memberof Ease24
*/
static _5_QuintOutIn(t: number, b: number, c: number, d: number): number;
/**
* Expo easing-in.
* @static
* @memberof Ease24
*/
static _6_ExpoIn(t: number, b: number, c: number, d: number): number;
/**
* Expo easing-out.
* @static
* @memberof Ease24
*/
static _6_ExpoOut(t: number, b: number, c: number, d: number): number;
/**
* Expo easing-in-out.
* @static
* @memberof Ease24
*/
static _6_ExpoInOut(t: number, b: number, c: number, d: number): number;
/**
* Expo easing-out-in.
* @static
* @memberof Ease24
*/
static _6_ExpoOutIn(t: number, b: number, c: number, d: number): number;
/**
* Circ easing-in.
* @static
* @memberof Ease24
*/
static _7_CircIn(t: number, b: number, c: number, d: number): number;
/**
* Circ easing-out.
* @static
* @memberof Ease24
*/
static _7_CircOut(t: number, b: number, c: number, d: number): number;
/**
* Circ easing-in-out.
* @static
* @memberof Ease24
*/
static _7_CircInOut(t: number, b: number, c: number, d: number): number;
/**
* Circ easing-out-in.
* @static
* @memberof Ease24
*/
static _7_CircOutIn(t: number, b: number, c: number, d: number): number;
/**
* Back easing-in with overshoot.
* @static
* @param {number} [overshoot=1.70158] オーバー値(デフォルト値:1.70158)
* @memberof Ease24
*/
static _BackInWith(overshoot?: number): Function;
/**
* Back easing-out with overshoot.
* @static
* @param {number} [overshoot=1.70158] オーバー値(デフォルト値:1.70158)
* @memberof Ease24
*/
static _BackOutWith(overshoot?: number): Function;
/**
* Back easing-in-out with overshoot.
* @static
* @param {number} [overshoot=1.70158] オーバー値(デフォルト値:1.70158)
* @memberof Ease24
*/
static _BackInOutWith(overshoot?: number): Function;
/**
* Back easing-out-in with overshoot.
* @static
* @param {number} [overshoot=1.70158] オーバー値(デフォルト値:1.70158)
* @memberof Ease24
*/
static _BackOutInWith(overshoot?: number): Function;
/**
* Back easing-in.
* @static
* @memberof Ease24
*/
static _BackIn: Function;
/**
* Back easing-out.
* @static
* @memberof Ease24
*/
static _BackOut: Function;
/**
* Back easing-in-out.
* @static
* @memberof Ease24
*/
static _BackInOut: Function;
/**
* Back easing-out-in.
* @static
* @memberof Ease24
*/
static _BackOutIn: Function;
/**
* Bounce easing-in.
* @static
* @memberof Ease24
*/
static _BounceIn(t: number, b: number, c: number, d: number): number;
/**
* Bounce easing-out.
* @static
* @memberof Ease24
*/
static _BounceOut(t: number, b: number, c: number, d: number): number;
/**
* Bounce easing-in-out.
* @static
* @memberof Ease24
*/
static _BounceInOut(t: number, b: number, c: number, d: number): number;
/**
* Bounce easing-out-in.
* @static
* @memberof Ease24
*/
static _BounceOutIn(t: number, b: number, c: number, d: number): number;
/**
* Elastic easing-in with amplitude & period.
* @static
* @param {number} amplitude 振幅の大きさ(デフォルト値:0)
* @param {number} period 振幅の周期(デフォルト値:0)
* @memberof Ease24
*/
static _ElasticInWith(amplitude?: number, period?: number): Function;
/**
* Elastic easing-out with amplitude & period.
* @static
* @param {number} amplitude 振幅の大きさ(デフォルト値:0)
* @param {number} period 振幅の周期(デフォルト値:0)
* @memberof Ease24
*/
static _ElasticOutWith(amplitude?: number, period?: number): Function;
/**
* Elastic easing-in-out with amplitude & period.
* @static
* @param {number} amplitude 振幅の大きさ(デフォルト値:0)
* @param {number} period 振幅の周期(デフォルト値:0)
* @memberof Ease24
*/
static _ElasticInOutWith(amplitude?: number, period?: number): Function;
/**
* Elastic easing-out-in with amplitude & period.
* @static
* @param {number} amplitude 振幅の大きさ(デフォルト値:0)
* @param {number} period 振幅の周期(デフォルト値:0)
* @memberof Ease24
*/
static _ElasticOutInWith(amplitude?: number, period?: number): Function;
/**
* Elastic easing-in.
* @static
* @memberof Ease24
*/
static _ElasticIn: Function;
/**
* Elastic easing-out.
* @static
* @memberof Ease24
*/
static _ElasticOut: Function;
/**
* Elastic easing-in-out.
* @static
* @memberof Ease24
*/
static _ElasticInOut: Function;
/**
* Elastic easing-out-in.
* @static
* @memberof Ease24
*/
static _ElasticOutIn: Function;
/**
* 2つのイージングをミックスして、新しいイージングを生成します。
* ※この関数は blend() に移行しました。将来的に削除される可能性があります。
* @static
* @param {Function} easeA 元になるイージング
* @param {Function} easeB 混合されるイージング
* @param {Function} mixing 混合率を指定するイージング
* @param {number} start 開始時の混合率
* @param {number} end 終点時の混合率
* @memberof Ease24
*/
static _Blend(easeA: Function, easeB: Function, mixing: Function, start?: number, end?: number): Function;
/**
* 2つのイージングをミックスして、新しいイージングを生成します。
* @static
* @param {Function} easeA 元になるイージング
* @param {Function} easeB 混合されるイージング
* @param {Function} mixing 混合率を指定するイージング
* @param {number} start 開始時の混合率
* @param {number} end 終点時の混合率
* @memberof Ease24
*/
static blend(easeA: Function, easeB: Function, mixing: Function, start?: number, end?: number): Function;
private static _customEasingById;
private static _set;
/**
* 登録したカスタムイージングを取得します。
* @static
* @param {string} id カスタムイージングのID
* @memberof Ease24
*/
static get: (id: string) => Function | undefined;
/**
* 登録したカスタムイージングをクリアします。
* @static
* @param {string} id カスタムイージングのID
* @memberof Ease24
*/
static clear: (id: string) => void;
/**
* カスタムイージングを作成します。
* 作成時にIDを指定すると、get()関数でイージングを呼び出せるようになります。
* 指定するパラメータのフォーマットは GreenSockの Ease Visualizer に準じています。
* Ease Visualizer: https://greensock.com/ease-visualizer/
* @static
* @param {(string|null)} id 登録するカスタムイージングのID。登録しない場合は null を指定します
* @param {string} svgPathData カスタムイージングのSVGパスデータ
* @memberof Ease24
*/
static create: (id: string | null, svgPathData: string) => Function;
private static _custom;
private static _getYForX;
/**
* @param a The first value of the Bezier equation.
* @param b The second value of the Bezier equation.
* @param c The third value of the Bezier equation.
* @param d The fourth value of the Bezier equation.
* @return An array containing four number values,
*/
private static _getCubicCoefficients;
/**
* @param a The first coefficient of the cubic equation, which is multiplied by the cubed variable (t^3).
* @param b The second coefficient of the cubic equation, which is multiplied by the squared variable (t^2).
* @param c The third coefficient of the cubic equation, which is multiplied by the linear variable (t).
* @param d The fourth coefficient of the cubic equation, which is the constant.
* @return An array of number values, indicating the real roots of the equation.
*/
private static _getCubicRoots;
/**
* @param a The first value of the Bezier equation.
* @param b The second value of the Bezier equation.
* @param c The third value of the Bezier equation.
* @param d The fourth value of the Bezier equation.
* @return The value of the Bezier equation at the specified time.
*/
private static _getSingleValue;
/**
* @param a The first coefficient of the quadratic equation, which is multiplied by the squared variable (t^2).
* @param b The second coefficient of the quadratic equation, which is multiplied by the linear variable (t).
* @param c The third coefficient of the quadratic equation, which is the constant.
* @return An array of number values, indicating the real roots of the equation.
*/
private static _getQuadraticRoots;
}