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

Updated builds.

上级 b4a8175d
......@@ -9041,6 +9041,17 @@ THREE.BufferGeometry.prototype = {
constructor: THREE.BufferGeometry,
addAttribute: function( name, type, numItems, itemSize ) {
this.attributes[ name ] = {
itemSize: itemSize,
array: new type( numItems * itemSize )
};
},
applyMatrix: function ( matrix ) {
var positionArray;
......
此差异已折叠。
......@@ -82,10 +82,10 @@
var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'index', Uint16Array, 3 * triangles, 1 );
geometry.addAttribute( 'position', Float32Array, 3 * triangles, 3 );
geometry.addAttribute( 'normal', Float32Array, 3 * triangles, 3 );
geometry.addAttribute( 'color', Float32Array, 3 * triangles, 3 );
geometry.addAttribute( 'index', Uint16Array, triangles * 3, 1 );
geometry.addAttribute( 'position', Float32Array, triangles * 3, 3 );
geometry.addAttribute( 'normal', Float32Array, triangles * 3, 3 );
geometry.addAttribute( 'color', Float32Array, triangles * 3, 3 );
// break geometry into
// chunks of 21,845 triangles (3 unique vertices per triangle)
......
......@@ -42,8 +42,8 @@ THREE.BufferGeometry.prototype = {
this.attributes[ name ] = {
itemSize: itemSize,
array: new type( numItems * itemSize )
itemSize: itemSize,
array: new type( numItems * itemSize )
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册