浏览代码

add comments to example

Garrett Johnson 6 年之前
父节点
当前提交
ae9bc8ced6
共有 1 个文件被更改,包括 4 次插入0 次删除
  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 );
 
 			}