1 | declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
2 | /**
|
3 | * Map a value from an input range to an output range.
|
4 | * @link https://www.remotion.dev/docs/interpolate
|
5 | * @param {!number} input value to interpolate
|
6 | * @param {!number[]} inputRange range of values that you expect the input to assume.
|
7 | * @param {!number[]} outputRange range of output values that you want the input to map to.
|
8 | * @param {?object} options
|
9 | * @param {?Function} options.easing easing function which allows you to customize the input, for example to apply a certain easing function. By default, the input is left unmodified, resulting in a pure linear interpolation {@link https://www.remotion.dev/docs/easing}
|
10 | * @param {string=} [options.extrapolateLeft="extend"] What should happen if the input value is outside left the input range, default: "extend" {@link https://www.remotion.dev/docs/interpolate#extrapolateleft}
|
11 | * @param {string=} [options.extrapolateRight="extend"] Same as extrapolateLeft, except for values outside right the input range {@link https://www.remotion.dev/docs/interpolate#extrapolateright}
|
12 | */
|
13 | export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly number[], options?: {
|
14 | easing?: (input: number) => number;
|
15 | extrapolateLeft?: ExtrapolateType;
|
16 | extrapolateRight?: ExtrapolateType;
|
17 | }): number;
|
18 | export {};
|