
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A growing collection of useful helpers and abstractions for react-three-fiber, saving you some boilerplate.
yarn add drei
import { ... } from 'drei'
makeDefault=true
A responsive, perspective camera that sets itself as the default. Can take children, which from then on move along.
<PerspectiveCamera>
<mesh />
</PerspectiveCamera>
If available controls have damping enabled by default, they manage their own updates, remove themselves on unmount, are compatible with the invalidateFrameloop
canvas-flag.
enableDamping=true
enableDamping=true
<TransformControls>
<mesh />
</TransformControls>
A wrapper around THREE.LOD (Level of detail). The number of distances corresponds to the direct children you add. Only one of the children will be shown according to how close the camera is to it.
<Detailed distances={[0, 10, 20]}>
<mesh geometry={highDetail} />
<mesh geometry={mediumDetail} />
<mesh geometry={lowDetail} />
</Detailed>
url
distance=1
loop=true
A wrapper around THREE.PositionalAudio. Add this to groups or meshes to tie them to a sound or a loop that plays when the camera comes near.
<PositionalAudo url="/song.mp3" />
url = '/draco-gtltf/'
) Adds the Draco extension to your GLTFLoader.
useLoader(GLTFLoader, url, draco())
ao=true|{...}
bloom=true|{...}
Adds ambient-occlusion, bloom and SMAA using the postprocessing library.
distance=450000
sunPosition=[0, 1, 0]
If you find yourself repeating set-up code often and if it's generic enough, add it here, everyone benefits!
FAQs
useful add-ons for react-three-fiber
The npm package drei receives a total of 820 weekly downloads. As such, drei popularity was classified as not popular.
We found that drei demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.