Browse Source

TessellateModifier: Convert indexed BufferGeometry.

Mr.doob 4 năm trước cách đây
mục cha
commit
49585b169b
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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;