瀏覽代碼

Honor groups in toNonIndexed()

WestLangley 7 年之前
父節點
當前提交
0fe654daa9
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/core/BufferGeometry.js

+ 9 - 0
src/core/BufferGeometry.js

@@ -895,6 +895,15 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 		}
 
+		var groups = this.groups;
+
+		for ( var i = 0, l = groups.length; i < l; i ++ ) {
+
+			var group = groups[ i ];
+			geometry2.addGroup( group.start, group.count, group.materialIndex );
+
+		}
+
 		return geometry2;
 
 	},