Recent change to OrbitControls breaks some projects


Some projects that used to successfully use OrbitControls are now throwing an error. When included with the following error is printed in the console:

TypeError: THREE.TOUCH is undefined[Learn More] OrbitControls.js:82:19

This is not the case if OrbitControls is included with, for example

Error example:
Working example:

What is the new correct way to include OrbitControls in a project?

The documentation says:

When using code from the examples directory, it’s important that all files match the version of your three.js main file. For example, it’s not acceptable to use GLTFLoader and OrbitControls from R96 together with three.js R103.

So the solution is to update three.js to the latest version R107.


Thank you for the reply. Is including three.js with a safe way to keep a project linked to the latest version or should updates always be manual by specifying the version number (e.g. r107)?

Correct, this link provides the latest version of three.js.


Sorry, Where can I get this version?

The latest updated version is available at .

You can include it in a website with <script type="text/javascript" src=""></script>

You can download a local version from (Code->Download in the left bar)

1 Like