提交 51d12de5 编写于 作者: T Takahiro

Fix inconsistency of return value from BufferGeometry .addAttribute

上级 cd32a0ad
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册