Verwendung

Track raw touch movement over a drawing surface.

Dieser Typ wird verwendet von 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" />;
}

Typdeklaration

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

Mitglieder 9

NameTypErforderlichBeschreibung
xschreibgeschütztGestureSourceJaWhere the finger is in the view.
yschreibgeschütztGestureSourceJa—
typeschreibgeschütztGestureTypeJa—
kindschreibgeschütztGestureKindJa—
configschreibgeschütztReadonly<Record<string, unknown>>Ja—
callbacksschreibgeschütztReadonly<Callbacks<never, never>>Ja—
releasingschreibgeschütztAnimation<unknown>NeinHow the motion values following it let go when it ends.
release(animation: Animation<unknown>) => TouchesGestureJaThe 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.
activeschreibgeschütztGestureSourceJa1 while it is active, 0 otherwise.
release — Methodensignaturen

Signaturen

ts
(animation: Animation<unknown>): TouchesGesture

Parameter

NameTypErforderlichBeschreibung
animationAnimation<unknown>Ja—

Rückgabe

TouchesGesture

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.