How to access OrbitControls in html file?

330 Views Asked by At

In my simple html file I have this to use three.js functionalities:

<script src="js/three.js"></script>

Now I want to use OrbitControls which is not part of three.js standard library it seems.I am not able to find it in three.js website.

What's correct way of using it?

1

There are 1 best solutions below

0
On
  1. download the OrbitControls.js and use <script src="js/OrbitControls.js"></script>
  2. use npm three and import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'