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

Geometry2: Simpler code. See #4509.

上级 3c43cd35
......@@ -6,13 +6,13 @@ THREE.Geometry2 = function ( size ) {
THREE.BufferGeometry.call( this );
this.addAttribute( 'position', new Float32Array( size * 3 ), 3 );
this.addAttribute( 'normal', new Float32Array( size * 3 ), 3 );
this.addAttribute( 'uv', new Float32Array( size * 2 ), 2 );
this.vertices = new Float32Array( size * 3 );
this.normals = new Float32Array( size * 3 );
this.uvs = new Float32Array( size * 2 );
this.vertices = this.getAttribute( 'position' ).array;
this.normals = this.getAttribute( 'normal' ).array;
this.uvs = this.getAttribute( 'uv' ).array;
this.addAttribute( 'position', this.vertices, 3 );
this.addAttribute( 'normal', this.normals, 3 );
this.addAttribute( 'uv', this.uvs, 2 );
this.boundingBox = null;
this.boundingSphere = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册