Three.js OrbitControls Pan 360

时间:2018-03-25 19:16:46

标签: javascript three.js pan

I'm writing a program that solves the Rubiks Cube, OrbitControls allow spinning infinitely and panning 180 only

can I tweak it to pan 360 as well? I'm looking at these lines:

// How far you can orbit vertically, upper and lower limits.
// Range is 0 to Math.PI radians.
this.minPolarAngle = 0; // radians
this.maxPolarAngle = Math.PI; // radians

// How far you can orbit horizontally, upper and lower limits.
// If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ].
this.minAzimuthAngle = - Infinity; // radians
this.maxAzimuthAngle = Infinity; // radians    

trying to get min and max Polar angle to work from -infinity to infinity.

I've also tried TrackballControls, but there the rotation is in all direction, while I only need UP/DOWN, RIGHT/LEFT. this makes it hard for the user to set the Cube strait.

here's a link to the project http://www.five-software.com/rubiks/

0 个答案:

没有答案
相关问题