pmndrs/drei
Fork: 717 Star: 8531 (更新于 2024-12-25 00:35:03)
license: MIT
Language: JavaScript .
🥉 useful helpers for react-three-fiber
最后发布版本: v9.114.3 ( 2024-10-08 13:59:27)
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 ofthree/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
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
OrthographicCamera
CubeCamera
Controls
CameraControls
ScrollControls
PresentationControls
KeyboardControls
FaceControls
MotionPathControls
Gizmos
GizmoHelper
PivotControls
DragControls
TransformControls
Grid
Helper / useHelper
Shapes
Plane, Box, Sphere, Circle, Cone, Cylinder, Tube, Torus, TorusKnot, Ring, Tetrahedron, Polyhedron, Icosahedron, Octahedron, Dodecahedron, Extrude, Lathe, Shape
RoundedBox
ScreenQuad
Line
QuadraticBezierLine
CubicBezierLine
CatmullRomLine
Facemesh
Abstractions
Image
Text
Text3D
Effects
PositionalAudio
Billboard
ScreenSpace
ScreenSizer
GradientTexture
Edges
Outlines
Trail
Sampler
ComputedAttribute
Clone
useAnimations
MarchingCubes
Decal
Svg
AsciiRenderer
Splat
Shaders
MeshReflectorMaterial
MeshWobbleMaterial
MeshDistortMaterial
MeshRefractionMaterial
MeshTransmissionMaterial
MeshDiscardMaterial
PointMaterial
SoftShadows
shaderMaterial
Modifiers
CurveModifier
Misc
useContextBridge
Example
Html
CycleRaycast
Select
Sprite Animator
Stats
StatsGl
Wireframe
useDepthBuffer
Fbo / useFBO
useCamera
CubeCamera / useCubeCamera
DetectGPU / useDetectGPU
useAspect
useCursor
useIntersect
useBoxProjectedEnv
Trail / useTrail
useSurfaceSampler
FaceLandmarker
Loading
Loader
Progress / useProgress
Gltf / useGLTF
Fbx / useFBX
Texture / useTexture
Ktx2 / useKTX2
CubeTexture / useCubeTexture
VideoTexture / useVideoTexture
TrailTexture / useTrailTexture
useFont
useSpriteLoader
Performance
Instances
Merged
Points
Segments
Detailed
Preload
BakeShadows
meshBounds
AdaptiveDpr
AdaptiveEvents
Bvh
PerformanceMonitor
Portals
Hud
View
RenderTexture
RenderCubeTexture
Fisheye
Mask
MeshPortalMaterial
Staging
Center
Resize
BBAnchor
Bounds
CameraShake
Float
Stage
Backdrop
Shadow
Caustics
ContactShadows
RandomizedLight
AccumulativeShadows
SpotLight
SpotLightShadow
Environment
Lightformer
Sky
Stars
Sparkles
Cloud
useEnvironment
MatcapTexture / useMatcapTexture
NormalTexture / useNormalTexture
ShadowAlpha
Dev
INSTALL
$ corepack enable
$ yarn install
Test
Local
Pre-requisites:
-
$ npx playwright install
To run visual tests locally:
$ yarn build
$ yarn test
To update a snapshot:
$ PLAYWRIGHT_UPDATE_SNAPSHOTS=1 yarn test
Docker
[!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"
最近版本更新:(数据更新于 2024-10-12 20:11:49)
2024-10-08 13:59:27 v9.114.3
2024-10-07 16:25:02 v9.114.2
2024-10-07 14:28:34 v9.114.1
2024-09-24 20:07:15 v9.114.0
2024-09-22 13:39:20 v9.113.0
2024-09-20 19:27:30 v9.112.1
2024-09-03 18:07:56 v9.112.0
2024-08-31 01:31:42 v9.111.5
2024-08-29 14:43:43 v9.111.4
2024-08-23 23:52:53 v9.111.3
主题(topics):
helpers, hooks, react, react-three-fiber, threejs
pmndrs/drei同语言 JavaScript最近更新仓库
2024-12-24 07:34:27 gethomepage/homepage
2024-12-24 04:47:33 emberjs/ember.js
2024-12-23 18:40:14 projectdiscovery/nuclei-templates
2024-12-22 18:26:16 songquanpeng/one-api
2024-12-22 11:34:40 chris81605/Degrees-of-Lewdity_Cheat_Extended
2024-12-22 00:44:14 gorhill/uBlock