소스 검색

Examples: Clean up. (#21653)

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' ) {