Explorar o código

Fix inconsistency of return value from BufferGeometry .addAttribute

Takahiro %!s(int64=7) %!d(string=hai) anos
pai
achega
51d12de5e8
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/core/BufferGeometry.js

+ 2 - 4
src/core/BufferGeometry.js

@@ -72,9 +72,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 			console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
 
-			this.addAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
-
-			return;
+			return this.addAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
 
 		}
 
@@ -83,7 +81,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 			console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
 			this.setIndex( attribute );
 
-			return;
+			return this;
 
 		}