Quellcode durchsuchen

Remove usage of attributes' numItem properties in examples.

Tapio Vierros vor 12 Jahren
Ursprung
Commit
44216e72b5

+ 4 - 8
examples/webgl_buffergeometry.html

@@ -84,23 +84,19 @@
 				geometry.attributes = {
 				geometry.attributes = {
 					index: {
 					index: {
 						itemSize: 1,
 						itemSize: 1,
-						array: new Uint16Array( triangles * 3 ),
-						numItems: triangles * 3
+						array: new Uint16Array( triangles * 3 )
 					},
 					},
 					position: {
 					position: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array( triangles * 3 * 3 ),
-						numItems: triangles * 3 * 3
+						array: new Float32Array( triangles * 3 * 3 )
 					},
 					},
 					normal: {
 					normal: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array( triangles * 3 * 3 ),
-						numItems: triangles * 3 * 3
+						array: new Float32Array( triangles * 3 * 3 )
 					},
 					},
 					color: {
 					color: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array( triangles * 3 * 3 ),
-						numItems: triangles * 3 * 3
+						array: new Float32Array( triangles * 3 * 3 )
 					}
 					}
 				}
 				}
 
 

+ 2 - 5
examples/webgl_buffergeometry_custom_attributes_particles.html

@@ -143,18 +143,15 @@
 
 
 				position: {
 				position: {
 					itemSize: 3,
 					itemSize: 3,
-					array: new Float32Array( particles * 3 ),
-					numItems: particles * 3
+					array: new Float32Array( particles * 3 )
 				},
 				},
 				customColor: {
 				customColor: {
 					itemSize: 3,
 					itemSize: 3,
-					array: new Float32Array( particles * 3 ),
-					numItems: particles * 3
+					array: new Float32Array( particles * 3 )
 				},
 				},
 				size: {
 				size: {
 					itemSize: 1,
 					itemSize: 1,
 					array: new Float32Array( particles ),
 					array: new Float32Array( particles ),
-					numItems: particles * 1,
 					dynamic: true
 					dynamic: true
 				},
 				},
 
 

+ 2 - 4
examples/webgl_buffergeometry_lines.html

@@ -72,13 +72,11 @@
 				geometry.attributes = {
 				geometry.attributes = {
 					position: {
 					position: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array(segments * 3),
-						numItems: segments * 3
+						array: new Float32Array(segments * 3)
 					},
 					},
 					color: {
 					color: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array(segments * 3),
-						numItems: segments * 3
+						array: new Float32Array(segments * 3)
 					}
 					}
 				};
 				};
 
 

+ 2 - 4
examples/webgl_buffergeometry_particles.html

@@ -73,13 +73,11 @@
 
 
 					position: {
 					position: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array( particles * 3 ),
-						numItems: particles * 3
+						array: new Float32Array( particles * 3 )
 					},
 					},
 					color: {
 					color: {
 						itemSize: 3,
 						itemSize: 3,
-						array: new Float32Array( particles * 3 ),
-						numItems: particles * 3
+						array: new Float32Array( particles * 3 )
 					}
 					}
 
 
 				}
 				}

+ 2 - 4
src/core/BufferGeometry.js

@@ -187,8 +187,7 @@ THREE.BufferGeometry.prototype = {
 				this.attributes[ "normal" ] = {
 				this.attributes[ "normal" ] = {
 
 
 					itemSize: 3,
 					itemSize: 3,
-					array: new Float32Array( nVertexElements ),
-					numItems: nVertexElements
+					array: new Float32Array( nVertexElements )
 
 
 				};
 				};
 
 
@@ -371,8 +370,7 @@ THREE.BufferGeometry.prototype = {
 			this.attributes[ "tangent" ] = {
 			this.attributes[ "tangent" ] = {
 
 
 				itemSize: 4,
 				itemSize: 4,
-				array: new Float32Array( nTangentElements ),
-				numItems: nTangentElements
+				array: new Float32Array( nTangentElements )
 
 
 			};
 			};