Geometry2.js 501 字节
Newer Older
M
r67  
Mr.doob 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 * @author mrdoob / http://mrdoob.com/
 */

THREE.Geometry2 = function ( size ) {

	THREE.BufferGeometry.call( this );

	this.vertices = new THREE.Float32Attribute( size, 3 );
	this.normals = new THREE.Float32Attribute( size, 3 );
	this.uvs = new THREE.Float32Attribute( size, 2 );

	this.addAttribute( 'position', this.vertices );
	this.addAttribute( 'normal', this.normals );
	this.addAttribute( 'uv', this.uvs );

};

THREE.Geometry2.prototype = Object.create( THREE.BufferGeometry.prototype );