interpolate
source mapped from input to output, piece by piece: numbers, or hex
colors channel by channel.
Utilização
Follow navigation motion
import { Box, interpolate, type ScreenProps } from 'kuito';
export default function Details({ back, sheet }: ScreenProps) {
return (
<Box
flex={1}
opacity={sheet ? interpolate(sheet.progress, [0, 1], [0.6, 1]) : 1}
scale={back ? interpolate(back, [0, 1], [1, 0.94]) : 1}
/>
);
}Assinaturas
<T extends Scalar>(source: Readable<number>, input: readonly number[], output: readonly T[], options?: InterpolateOptions): Derived<T>Parâmetros de tipo
| Nome | Restrição | Predefinição |
|---|---|---|
T | Scalar | — |
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
source | Readable<number> | Sim | — |
input | readonly number[] | Sim | — |
output | readonly T[] | Sim | — |
options | InterpolateOptions | Não | — Predefinição: {} |
Devolve
Derived<T>
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.