MCPcopy Index your code
hub / github.com/pmndrs/drei

github.com/pmndrs/drei @v10.7.7 sqlite

repository ↗ · DeepWiki ↗ · release v10.7.7 ↗
452 symbols 1,317 edges 166 files 1 documented · 0%
README

Storybook Version Downloads Discord Shield Open in GitHub Codespaces

logo

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

[!IMPORTANT] this package is using the stand-alone three-stdlib instead of three/examples/jsm.

Basic usage

import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei'

React-native

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.

Documentation

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.

Cameras

PerspectiveCamera

Documentation has moved here

OrthographicCamera

Documentation has moved here

CubeCamera

Documentation has moved here

Controls

CameraControls

Documentation has moved here

ScrollControls

Documentation has moved here

PresentationControls

Documentation has moved here

KeyboardControls

Documentation has moved here

FaceControls

Documentation has moved here

MotionPathControls

Documentation has moved here

Gizmos

GizmoHelper

Documentation has moved here

PivotControls

Documentation has moved here

DragControls

Documentation has moved here

TransformControls

Documentation has moved here

Grid

Documentation has moved here

Extension points exported contracts — how you extend this code

ShakeController (Interface)
(no doc)
src/core/CameraShake.tsx
BlurPassProps (Interface)
(no doc)
src/materials/BlurPass.tsx
ScrollPropsWithFalseHtml (Interface)
(no doc)
src/web/ScrollControls.tsx
CameraShakeProps (Interface)
(no doc)
src/core/CameraShake.tsx
WireframeMaterialProps (Interface)
(no doc)
src/materials/WireframeMaterial.tsx
ScrollPropsWithTrueHtml (Interface)
(no doc)
src/web/ScrollControls.tsx
ThreeElements (Interface)
(no doc)
src/core/MeshReflectorMaterial.tsx
HtmlProps (Interface)
(no doc)
src/web/Html.tsx

Core symbols most depended-on inside this repo

set
called by 81
src/core/shaderMaterial.tsx
render
called by 39
src/materials/BlurPass.tsx
update
called by 25
src/core/TrailTexture.tsx
create
called by 21
src/core/shapes.tsx
get
called by 18
src/core/useAnimations.tsx
clear
called by 15
src/core/TrailTexture.tsx
onChange
called by 14
src/core/TransformControls.tsx
useFBO
called by 14
src/core/Fbo.tsx

Shape

Function 307
Method 62
Interface 45
Class 36
Enum 2

Languages

TypeScript100%

Modules by API surface

src/materials/MeshReflectorMaterial.tsx19 symbols
src/core/Bounds.tsx15 symbols
src/core/Wireframe.tsx14 symbols
src/core/Splat.tsx14 symbols
src/core/Instances.tsx13 symbols
src/core/AccumulativeShadows.tsx13 symbols
src/core/TrailTexture.tsx12 symbols
src/core/Sparkles.tsx11 symbols
src/web/ScrollControls.tsx10 symbols
src/web/Select.tsx9 symbols
src/web/Html.tsx9 symbols
src/core/MeshDistortMaterial.tsx9 symbols

Dependencies from manifests, versioned

@babel/core7.26.0 · 1×
@babel/plugin-proposal-class-properties7.18.6 · 1×
@babel/plugin-proposal-nullish-coalescing-operator7.18.6 · 1×
@babel/plugin-transform-modules-commonjs7.25.9 · 1×
@babel/plugin-transform-runtime7.25.9 · 1×
@babel/preset-env7.26.0 · 1×
@babel/preset-react7.25.9 · 1×
@babel/preset-typescript7.26.0 · 1×
@babel/runtime7.26.0 · 1×
@eslint/compat1.2.3 · 1×
@eslint/eslintrc3.2.0 · 1×

For agents

$ claude mcp add drei \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact