Преглед изворни кода

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;