浏览代码

TessellateModifier: Convert indexed BufferGeometry.

Mr.doob 4 年之前
父节点
当前提交
49585b169b
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      examples/js/modifiers/TessellateModifier.js

+ 6 - 0
examples/js/modifiers/TessellateModifier.js

@@ -18,6 +18,12 @@ THREE.TessellateModifier.prototype.modify = function ( geometry ) {
 
 	}
 
+	if ( geometry.index !== null ) {
+
+		geometry = geometry.toNonIndexed();
+
+	}
+
 	//
 
 	const maxIterations = this.maxIterations;