I am using THREEjs r83 in a requirejs build. No matter what I do, the OrbitControl is loading & running before THREEjs initiates so I get the persistant error:
Uncaught ReferenceError: THREE is not defined
Here is the initial part of my file where you can see THREE is required as a shim for the OrbitControl. I've gone over the code repeatedly & cannot work out a solution. Can anyone help me out?
requirejs.config({
paths: {
three: 'lib/three'
},
shim: {
'three': ["lib/FloatFix"],
'lib/OrbitControls': ["three"]
}
});
require(
[
'jquery',
'three',
'lib/OrbitControls'
],
...