Skip to content Skip to sidebar Skip to footer

Requirejs And Three.js Orbit Controls

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 Refere

Solution 1:

I had this issue ( was using trackball instead of orbit) a while back. Try this:

paths: {
    three:'lib/three'orbit:'lib/OrbitControls'
},shim: {
    'three': {
        exports:'THREE'
    },
    'orbit': {
        deps: ['three']
    }
}

Let me know if this works for you.

Post a Comment for "Requirejs And Three.js Orbit Controls"