Michael Herzog преди 4 години
родител
ревизия
3ab091a838
променени са 2 файла, в които са добавени 1 реда и са изтрити 4 реда
  1. 1 2
      examples/js/controls/TransformControls.js
  2. 0 2
      examples/jsm/controls/TransformControls.js

+ 1 - 2
examples/js/controls/TransformControls.js

@@ -480,8 +480,7 @@
 				} // Apply rotation snap
 
 
-				if ( this.rotationSnap ) this.rotationAngle = Math.round( this.rotationAngle / this.rotationSnap ) * this.rotationSnap;
-				this.rotationAngle = this.rotationAngle; // Apply rotate
+				if ( this.rotationSnap ) this.rotationAngle = Math.round( this.rotationAngle / this.rotationSnap ) * this.rotationSnap; // Apply rotate
 
 				if ( space === 'local' && axis !== 'E' && axis !== 'XYZE' ) {
 

+ 0 - 2
examples/jsm/controls/TransformControls.js

@@ -512,8 +512,6 @@ class TransformControls extends Object3D {
 
 			if ( this.rotationSnap ) this.rotationAngle = Math.round( this.rotationAngle / this.rotationSnap ) * this.rotationSnap;
 
-			this.rotationAngle = this.rotationAngle;
-
 			// Apply rotate
 			if ( space === 'local' && axis !== 'E' && axis !== 'XYZE' ) {