UNPKG

@threlte/xr

Version:

Tools to more easily create VR and AR experiences with Threlte

18 lines (17 loc) 493 B
import { Quaternion, type Vector3, type Vector3Tuple } from 'three'; /** * Returns a callback to teleport the player from the world origin to a position and optional orientation. * * @example * const teleport = useTeleport() * const vec3 = new THREE.Vector3() * * vec3.set(5, 0, 5) * * teleport(vec3) * * const quat = new THREE.Quaternion() * * teleport(vec3, quat) */ export declare const useTeleport: () => (position: Vector3 | Vector3Tuple, orientation?: Quaternion) => void;