jmwright
jmwright

Reputation: 131

OrbitalControls 'THREE.Spherical is not a constructor' Error

When trying to use OrbitalControls.js in my Electron app, I get the following error about the Spherical constructor.

Uncaught TypeError: THREE.Spherical is not a constructor

I'm having trouble finding a Sphereical.js file anywhere to fix this error. Where is this file, or am I doing something else wrong?

The error points to line 249 in OrbitalControls.js.

Upvotes: 0

Views: 2560

Answers (1)

WestLangley
WestLangley

Reputation: 104783

You need to make sure the source code of OrbitControls.js is from the same release as the three.js library. Update both to the current version.

three.js r.75

Upvotes: 3

Related Questions