OrbitControls is a camera controller that allows you to orbit around a target. It's a great way to explore your scene.
However, it is not part of the core of ThreeJS. So to use it you would need to import it from the
Here is where the fancy part begins. ✨
cientos package provides a component called
<OrbitControls /> that is a wrapper of the
OrbitControls from the
The nicest part? You don't need to extend the catalog or pass any arguments.
It just works. 💯
<TresCanvas shadows alpha>
<TresScene> ... </TresScene>
true, the controls will be set as the default controls for the scene.
|The camera to control.
|The dom element to listen to.
|The target to orbit around.
true, the controls will use damping (inertia), which can be used to give a sense of weight to the controls.