Browse Source

add comments to example

Garrett Johnson 6 years ago
parent
commit
ae9bc8ced6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      examples/webgl_physics_volume.html

+ 4 - 0
examples/webgl_physics_volume.html

@@ -191,11 +191,15 @@
 
 			function processGeometry( bufGeometry ) {
 
+				// Ony consider the position values when merging the vertices
 				var posOnlyBufGeometry = new THREE.BufferGeometry();
 				posOnlyBufGeometry.addAttribute( 'position', bufGeometry.getAttribute( 'position' ) );
 				posOnlyBufGeometry.setIndex( bufGeometry.getIndex() );
 
+                // Merge the vertices so the triangle soup is converted to indexed triangles
 				var indexedBufferGeom = THREE.BufferGeometryUtils.mergeVertices( posOnlyBufGeometry );
+
+                // Create index arrays mapping the indexed vertices to bufGeometry vertices
 				mapIndices( bufGeometry, indexedBufferGeom );
 
 			}