提交 c42abb2f 编写于 作者: M Mr.doob

BufferGeometry addAttribute() backwards compatible.

上级 a8c49479
......@@ -24,6 +24,16 @@ THREE.BufferGeometry.prototype = {
addAttribute: function ( name, attribute ) {
if ( attribute instanceof THREE.BufferAttribute === false ) {
console.warn( 'DEPRECATED: BufferGeometry\'s addAttribute() now expects ( name, attribute ).' );
this.attributes[ name ] = { array: arguments[ 1 ], itemSize: arguments[ 2 ] };
return;
}
this.attributes[ name ] = attribute;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册