Ver código fonte

Return UV vector from Texture.transformUv method

This makes the method consistent with most other vector transformations, and will make it easier to include it in a chain of operations.
Jay Weisskopf 8 anos atrás
pai
commit
e909f084b3
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      src/textures/Texture.js

+ 3 - 1
src/textures/Texture.js

@@ -213,7 +213,7 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
 	transformUv: function ( uv ) {
 
-		if ( this.mapping !== UVMapping ) return;
+		if ( this.mapping !== UVMapping ) return uv;
 
 		uv.multiply( this.repeat );
 		uv.add( this.offset );
@@ -286,6 +286,8 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
 		}
 
+		return uv;
+
 	}
 
 } );