RepeatConfig
Sets how many times repeat() plays an animation and whether every other run goes backwards.
Utilização
Animate through several keyframes.
Este tipo é usado por repeat
// Animate through several keyframes.
import { Box, keyframes, motion, repeat } from 'kuito';
const pulse = motion(1);
pulse.value = repeat(keyframes({ 0: 1, 50: 1.1, 100: 1 }, 600)); // one prop: an animation
const pop = keyframes({ 0: { opacity: 0, scale: 0.8 }, 100: { opacity: 1, scale: 1 } }, 300); // objects: an effect
<Box scale={pulse} enter={pop} />;Declaração do tipo
export interface RepeatConfig {
/** How many times; Infinity (the default) repeats until interrupted. */
count?: number;
/** Run every other repetition backwards. */
reverse?: boolean;
onEnd?: AnimationCallback;
}Membros 3
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
count | number | Não | How many times; Infinity (the default) repeats until interrupted. |
reverse | boolean | Não | Run every other repetition backwards. |
onEnd | AnimationCallback | Não | — |
onEnd — assinaturas de método
Assinaturas
(finished: boolean): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
finished | boolean | Sim | — |
Devolve
void
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.