06wj 7 years ago
parent
commit
290f80e551
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/objects/Sprite.js

+ 5 - 1
src/objects/Sprite.js

@@ -46,13 +46,17 @@ Sprite.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 
 			var rotation = this.material.rotation;
 			var rotation = this.material.rotation;
 			if ( rotation !== 0 ) {
 			if ( rotation !== 0 ) {
+
 				var cos = Math.cos( rotation ), sin = Math.sin( rotation );
 				var cos = Math.cos( rotation ), sin = Math.sin( rotation );
 				rotatedPosition.x = ( cos * alignedPosition.x ) - ( sin * alignedPosition.y );
 				rotatedPosition.x = ( cos * alignedPosition.x ) - ( sin * alignedPosition.y );
 				rotatedPosition.y = ( sin * alignedPosition.x ) + ( cos * alignedPosition.y );
 				rotatedPosition.y = ( sin * alignedPosition.x ) + ( cos * alignedPosition.y );
+
 			} else {
 			} else {
+
 				rotatedPosition.copy( alignedPosition );
 				rotatedPosition.copy( alignedPosition );
+
 			}
 			}
-			
+
 			worldPosition.setFromMatrixPosition( this.modelViewMatrix );
 			worldPosition.setFromMatrixPosition( this.modelViewMatrix );
 			worldPosition.x += rotatedPosition.x;
 			worldPosition.x += rotatedPosition.x;
 			worldPosition.y += rotatedPosition.y;
 			worldPosition.y += rotatedPosition.y;