Skip to main content
Module

x/pane/types.ts>Touch

🖼️ A deno module providing bindings for cross-platform windowing
Latest
type alias Touch
import { type Touch } from "https://deno.land/x/pane@0.2.1/types.ts";

Represents a touch event.

Every time the user touches the screen, a new started event with an unique identifier for the finger is generated. When the finger is lifted, an ended event is generated with the same finger id.

After a started event has been emitted, there may be zero or more moved events when the finger is moved or the touch pressure changes.

The finger id may be reused by the system after an ended event. The user should assume that a new started event received with the same id has nothing to do with the old finger and is a new finger.

A cancelled event is emitted when the system has canceled tracking this touch, such as when the window loses focus.

definition: { deviceId: number; phase: TouchPhase; location: PhysicalPosition; force?: Force; id: bigint; }