Mr.doob 11 лет назад
Родитель
Сommit
c67501322b

+ 2 - 2
examples/js/wip/IndexedTypedGeometry.js

@@ -20,8 +20,8 @@ THREE.IndexedTypedGeometry.prototype.setArrays = function ( indices, vertices, n
 	this.attributes[ 'index' ] = { array: indices, itemSize: 1 };
 	this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
 	this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
-	this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };	
+	this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };
 
 	return this;
 
-};
+};

+ 1 - 1
examples/js/wip/PlaneTypedGeometry.js

@@ -56,7 +56,7 @@ THREE.PlaneTypedGeometry = function ( width, height, widthSegments, heightSegmen
 
 	offset = 0;
 
-	var indices = new ( vertices.length > 65535 ? Uint32Array : Uint16Array )( gridX * gridY * 6 );
+	var indices = new ( ( vertices.length / 3 ) > 65535 ? Uint32Array : Uint16Array )( gridX * gridY * 6 );
 
 	for ( var iy = 0; iy < gridY; iy ++ ) {
 

+ 1 - 3
src/core/Object3D.js

@@ -208,9 +208,7 @@ THREE.Object3D.prototype = {
 
 		return function ( axis, distance ) {
 
-			v1.copy( axis );
-
-			v1.applyQuaternion( this.quaternion );
+			v1.copy( axis ).applyQuaternion( this.quaternion );
 
 			this.position.add( v1.multiplyScalar( distance ) );