

A growing collection of useful helpers and fully functional, ready-made abstractions for @react-three/fiber.
If you make a component that is generic enough to be useful to others, think about CONTRIBUTING!
npm install @react-three/drei
import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei'
import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei/native'
The native route of the library does not export Html or Loader. The default export of the library is web which does export Html and Loader.
https://pmndrs.github.io/drei
Old doc
[!WARNING]
Below is an archive of the anchors links with their new respective locations to the documentation website.
Do not update the links below, they are for reference only.
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Plane, Box, Sphere, Circle, Cone, Cylinder, Tube, Torus, TorusKnot, Ring, Tetrahedron, Polyhedron, Icosahedron, Octahedron, Dodecahedron, Extrude, Lathe, Shape
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
CubeCamera / useCubeCamera
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
CubeTexture / useCubeTexture
Documentation has moved here
VideoTexture / useVideoTexture
Documentation has moved here
TrailTexture / useTrailTexture
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
Documentation has moved here
MatcapTexture / useMatcapTexture
Documentation has moved here
NormalTexture / useNormalTexture
Documentation has moved here
Documentation has moved here
Pre-requisites:
- Install nvm, then:
$ nvm install
$ nvm use
$ node -v # make sure your version satisfies package.json#engines.node
nb: if you want this node version to be your default nvm's one: nvm alias default node
- Install yarn, with:
$ corepack enable
$ corepack prepare --activate # it reads "packageManager"
$ yarn -v # make sure your version satisfies package.json#engines.yarn
Pre-requisites:
To run visual tests locally:
To update a snapshot:
$ PLAYWRIGHT_UPDATE_SNAPSHOTS=1 yarn test
Important
Snapshots are system-dependent, so to run playwright in the same environment as the CI:
$ docker run --init --rm \
-v $(pwd):/app -w /app \
ghcr.io/pmndrs/playwright:drei \
sh -c "corepack enable && yarn install && yarn build && yarn test"
To update a snapshot:
$ docker run --init --rm \
-v $(pwd):/app -w /app \
-e PLAYWRIGHT_UPDATE_SNAPSHOTS=1 \
ghcr.io/pmndrs/playwright:drei \
sh -c "corepack enable && yarn install && yarn build && yarn test"