UNPKG

glodrei

Version:

useful add-ons for react-three-fiber

45 lines (31 loc) 1.87 kB
--- title: Introduction description: Useful helpers for @react-three/fiber nav: -1 --- <Intro> A growing collection of useful helpers and fully functional, ready-made abstractions for [@react-three/fiber](https://github.com/pmndrs/react-three-fiber). </Intro> [![logo](../logo.jpg)](https://codesandbox.io/s/bfplr) [![Version](https://img.shields.io/npm/v/@react-three/drei?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/drei) [![Downloads](https://img.shields.io/npm/dt/@react-three/drei.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/drei) [![Discord Shield](https://img.shields.io/discord/740090768164651008?style=flat&colorA=000000&colorB=000000&label=discord&logo=discord&logoColor=ffffff)](https://discord.com/channels/740090768164651008/741751532592038022) [![Open in GitHub Codespaces](https://img.shields.io/static/v1?&message=Open%20in%20%20Codespaces&style=flat&colorA=000000&colorB=000000&label=GitHub&logo=github&logoColor=ffffff)](https://github.com/codespaces/new?template_repository=pmndrs%2Fdrei) <Entries /> ## INSTALL If you make a component that is generic enough to be useful to others, think about [CONTRIBUTING](CONTRIBUTING.md)! ```bash npm install @react-three/drei ``` > [!IMPORTANT] > this package is using the stand-alone [`three-stdlib`](https://github.com/pmndrs/three-stdlib) instead of [`three/examples/jsm`](https://github.com/mrdoob/three.js/tree/master/examples/jsm). ## Basic usage ```jsx import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei' ``` ## React-native ```jsx 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`.