Ver Fonte

DirectGeometry: Remove .indices

Mugen87 há 7 anos atrás
pai
commit
fc0bf02af0

+ 0 - 3
docs/api/core/BufferAttribute.html

@@ -140,9 +140,6 @@
 		<h3>[method:BufferAttribute copyColorsArray]( colors ) </h3>
 		<h3>[method:BufferAttribute copyColorsArray]( colors ) </h3>
 		<div>Copy an array representing RGB color values into [page:BufferAttribute.array array].</div>
 		<div>Copy an array representing RGB color values into [page:BufferAttribute.array array].</div>
 
 
-		<h3>[method:BufferAttribute copyIndicesArray]( indices ) </h3>
-		<div>Copy an array representing [page:Face3] indices into [page:BufferAttribute.array array].</div>
-
 		<h3>[method:BufferAttribute copyVector2sArray]( vectors ) </h3>
 		<h3>[method:BufferAttribute copyVector2sArray]( vectors ) </h3>
 		<div>Copy an array representing [page:Vector2]s into [page:BufferAttribute.array array].</div>
 		<div>Copy an array representing [page:Vector2]s into [page:BufferAttribute.array array].</div>
 
 

+ 0 - 3
docs/api/core/DirectGeometry.html

@@ -34,9 +34,6 @@
 		<h3>[property:Array type]</h3>
 		<h3>[property:Array type]</h3>
 		<div>String 'DirectGeometry'.</div>
 		<div>String 'DirectGeometry'.</div>
 
 
-		<h3>[property:Array indices]</h3>
-		<div>Initialiased as an empty array, this is populated by [page:.fromGeometry]().</div>
-
 		<h3>[property:Array vertices]</h3>
 		<h3>[property:Array vertices]</h3>
 		<div>Initialiased as an empty array, this is populated by [page:.fromGeometry]().</div>
 		<div>Initialiased as an empty array, this is populated by [page:.fromGeometry]().</div>
 
 

+ 1 - 0
docs/api/deprecated/DeprecatedList.html

@@ -51,6 +51,7 @@
 
 
 		<h3>[page:BufferAttribute]</h3>
 		<h3>[page:BufferAttribute]</h3>
 		<div>BufferAttribute.length has been renamed to [page:BufferAttribute.count].</div>
 		<div>BufferAttribute.length has been renamed to [page:BufferAttribute.count].</div>
+		<div>BufferAttribute.copyIndicesArray() has been removed.</div>
 
 
 
 
 		<h3>[page:DynamicBufferAttribute]</h3>
 		<h3>[page:DynamicBufferAttribute]</h3>

+ 5 - 0
src/Three.Legacy.js

@@ -1074,6 +1074,11 @@ Object.defineProperties( BufferAttribute.prototype, {
 			return this.array.length;
 			return this.array.length;
 
 
 		}
 		}
+	},
+	copyIndicesArray: function ( /* indices */ ) {
+
+		console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
+
 	}
 	}
 
 
 } );
 } );

+ 0 - 18
src/core/BufferAttribute.js

@@ -129,24 +129,6 @@ Object.assign( BufferAttribute.prototype, {
 
 
 	},
 	},
 
 
-	copyIndicesArray: function ( indices ) {
-
-		var array = this.array, offset = 0;
-
-		for ( var i = 0, l = indices.length; i < l; i ++ ) {
-
-			var index = indices[ i ];
-
-			array[ offset ++ ] = index.a;
-			array[ offset ++ ] = index.b;
-			array[ offset ++ ] = index.c;
-
-		}
-
-		return this;
-
-	},
-
 	copyVector2sArray: function ( vectors ) {
 	copyVector2sArray: function ( vectors ) {
 
 
 		var array = this.array, offset = 0;
 		var array = this.array, offset = 0;

+ 0 - 8
src/core/BufferGeometry.js

@@ -521,14 +521,6 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 
 		}
 		}
 
 
-		if ( geometry.indices.length > 0 ) {
-
-			var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
-			var indices = new TypeArray( geometry.indices.length * 3 );
-			this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
-
-		}
-
 		// groups
 		// groups
 
 
 		this.groups = geometry.groups;
 		this.groups = geometry.groups;

+ 0 - 1
src/core/DirectGeometry.js

@@ -6,7 +6,6 @@ import { Vector2 } from '../math/Vector2.js';
 
 
 function DirectGeometry() {
 function DirectGeometry() {
 
 
-	this.indices = [];
 	this.vertices = [];
 	this.vertices = [];
 	this.normals = [];
 	this.normals = [];
 	this.colors = [];
 	this.colors = [];