Mr.doob 12 лет назад
Родитель
Сommit
84aaddc48b
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      src/core/Geometry2.js

+ 6 - 6
src/core/Geometry2.js

@@ -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;

粤ICP备19079148号