Explorar o código

TessellateModifier: Convert indexed BufferGeometry.

Mr.doob %!s(int64=4) %!d(string=hai) anos
pai
achega
49585b169b
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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;