@threlte/xr
Version:
Tools to more easily create VR and AR experiences with Threlte
34 lines (33 loc) • 1.13 kB
TypeScript
import { type ComputeFunction } from './compute.js';
import type { FilterFunction } from './types.js';
import type { HandJoints } from '../../lib/handJoints.js';
export type TouchControlsOptions = {
enabled?: boolean;
/**
* Which hand joint to track. Defaults to the index fingertip.
* @default 'index-finger-tip'
*/
joint?: HandJoints;
/**
* Distance at which an object starts receiving hover events.
* @default 0.03
*/
hoverRadius?: number;
/**
* Distance below which a hover transitions to `pointerdown` (and crossing back up fires
* `pointerup` + `click`).
* @default 0.01
*/
downRadius?: number;
compute?: ComputeFunction;
filter?: FilterFunction;
/**
* Interval at which joint positions are polled and intersections are recomputed.
* @default 1 / 40
*/
fixedStep?: number;
};
export declare const touchControls: (handedness: "left" | "right", options?: TouchControlsOptions) => {
enabled: import("@threlte/core").CurrentWritable<boolean>;
hovered: Map<string, import("./types.js").IntersectionEvent>;
};