UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

39 lines (38 loc) 1.08 kB
import { type PointerInfo } from "../../Events/pointerEvents.js"; import { type Vector3 } from "../../Maths/math.vector.js"; import { type Nullable } from "../../types.js"; /** * Event type for drag move events */ export type DragEvent = { /** * Delta between last drag position and current drag position in world space */ delta: Vector3; /** * Point in world space where the drag intersects the drag plane * * (if validatedDrag is used, the position of the attached mesh might not equal dragPlanePoint) */ dragPlanePoint: Vector3; /** * Normal of the current drag plane used during the drag */ dragPlaneNormal: Vector3; /** * Distance along the drag axis */ dragDistance: number; /** * Pointer id to use */ pointerId: number; /** * Pointer info for the event (if any) */ pointerInfo: Nullable<PointerInfo>; }; /** * Event type for drag start and end events */ export type DragStartEndEvent = Pick<DragEvent, "dragPlanePoint" | "pointerId" | "pointerInfo">;