Using Drei Package with React Fiber
Learn how to use Drei package with React Fiber to create Three.js objects.
We'll cover the following...
We'll cover the following...
Besides the elements provided by React Three Fiber, there is a whole set of additional components provided by @react-three/drei. We can find those components and their descriptions on GitHub.
In the following example, we’re going to use a couple of the components provided by this library, so we need to add this to our project:
Now, we’ll extend our example to this:
Let’s explore the code a bit before looking at the result in the browser. First, we’ll look at the new elements we added to the component:
<OrbitControls>(Line 21): This is provided by thedrei...