提交 524571cf 编写于 作者: W WestLangley

Add normalized arg to constructor

上级 1e2136af
......@@ -17,7 +17,7 @@
</p>
<h2>Constructor</h2>
<h3>[name]( [param:TypedArray array], [param:Integer itemSize], [param:Number meshPerAttribute] )</h3>
<h3>[name]( [param:TypedArray array], [param:Integer itemSize], [param:Boolean normalized], [param:Number meshPerAttribute] )</h3>
<p>
</p>
......
......@@ -4,9 +4,19 @@ import { BufferAttribute } from './BufferAttribute.js';
* @author benaadams / https://twitter.com/ben_a_adams
*/
function InstancedBufferAttribute( array, itemSize, meshPerAttribute ) {
function InstancedBufferAttribute( array, itemSize, normalized, meshPerAttribute ) {
BufferAttribute.call( this, array, itemSize );
if ( typeof ( normalized ) === 'number' ) {
meshPerAttribute = normalized;
normalized = false;
console.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );
}
BufferAttribute.call( this, array, itemSize, normalized );
this.meshPerAttribute = meshPerAttribute || 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册