Utilização

Track raw touch movement over a drawing surface.

Este tipo é usado por touches

tsx
// Track raw touch movement over a drawing surface.
import { Box, touches } from 'kuito';

export function TouchSurface() {
  const input = touches({ onChange: (event) => console.log(event.changeX, event.changeY) });
  return <Box gestures={[input]} width={240} height={240} backgroundColor="#e2e8f0" />;
}

Declaração do tipo

ts
export interface TouchesGesture extends Gesture {
  /** Where the finger is in the view. */
  readonly x: GestureSource;
  readonly y: GestureSource;
}

Membros 9

NomeTipoObrigatórioDescrição
xsó de leituraGestureSourceSimWhere the finger is in the view.
ysó de leituraGestureSourceSim—
typesó de leituraGestureTypeSim—
kindsó de leituraGestureKindSim—
configsó de leituraReadonly<Record<string, unknown>>Sim—
callbackssó de leituraReadonly<Callbacks<never, never>>Sim—
releasingsó de leituraAnimation<unknown>NãoHow the motion values following it let go when it ends.
release(animation: Animation<unknown>) => TouchesGestureSimThe same gesture, letting go with animation: each follower runs it with the gesture's velocity, toward its own home (its first value) unless the animation names a target.
activesó de leituraGestureSourceSim1 while it is active, 0 otherwise.
release — assinaturas de método

Assinaturas

ts
(animation: Animation<unknown>): TouchesGesture

Parâmetros

NomeTipoObrigatórioDescrição
animationAnimation<unknown>Sim—

Devolve

TouchesGesture

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.