@@ -98,7 +98,7 @@ THREE.OrbitControls = function ( object, domElement ) {
var pan = new THREE.Vector3();
var lastPosition = new THREE.Vector3();
- var lastQuaternion = new THREE.Vector4();
+ var lastQuaternion = new THREE.Quaternion();
var STATE = { NONE : -1, ROTATE : 0, DOLLY : 1, PAN : 2, TOUCH_ROTATE : 3, TOUCH_DOLLY : 4, TOUCH_PAN : 5 };
@@ -313,6 +313,12 @@ THREE.Quaternion.prototype = {
},
+ dot: function ( v ) {
+
+ return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;
+ },
lengthSq: function () {
return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;