@react-three/handle
TypeScript icon, indicating that this package has built-in type declarations

6.6.14 • Public • Published

@react-three/handle

The one to handle them all 👌


NPM NPM Twitter Discord

npm install three @react-three/fiber @react-three/handle@latest @react-three/xr@latest
A example with a handle for controlling the scale rotation and position of a simple red cube by grabbing it with any type of input (mouse, touch, grab, point) in XR and non-XR applications. recording of interacting with the code below
import { Canvas } from '@react-three/fiber'
import { noEvents, PointerEvents } from '@react-three/xr'
import { Handle } from '@react-three/handle'

export function App() {
  return (
    <Canvas events={noEvents}>
      <PointerEvents />
      <Environment preset="city" />
      <Handle>
        <mesh position-z={-1}>
          <boxGeometry />
          <meshStandardMaterial color="red" />
        </mesh>
      </Handle>
    </Canvas>
  )
}

Sponsors

This project is supported by a few companies and individuals building cutting-edge 3D Web & XR experiences. Check them out!

Sponsors Overview

Package Sidebar

Install

npm i @react-three/handle

Weekly Downloads

2,050

Version

6.6.14

License

SEE LICENSE IN LICENSE

Unpacked Size

27.4 kB

Total Files

19

Last publish

Collaborators

  • wiledal
  • gsimone
  • giulioz
  • stephencorwin
  • dropthebeatbro
  • mlperego
  • sniok
  • iinfin
  • codynova
  • drcmda
  • marcofugaro
  • alaric.baraou
  • tdfka_rick
  • stockhuman
  • unframework
  • codyjasonbennett
  • farazshaikh
  • bjornstar
  • joergjaeckel
  • isaacmason
  • nksaraf
  • bela-bohlender
  • krispyaa