2
0
Эх сурвалжийг харах

Changed defailt maxIterations in TessellateModifier to infinity

Aki Rodic 4 жил өмнө
parent
commit
4270fc64d4

+ 2 - 2
examples/js/modifiers/TessellateModifier.js

@@ -2,7 +2,7 @@
  * Break faces with edges longer than maxEdgeLength
  */
 
-THREE.TessellateModifier = function ( maxEdgeLength = 0.1, maxIterations = 6, maxFaces = 1000000 ) {
+THREE.TessellateModifier = function ( maxEdgeLength = 0.1, maxIterations = 6, maxFaces = Infinity ) {
 
 	this.maxEdgeLength = maxEdgeLength;
 	this.maxIterations = maxIterations;
@@ -263,7 +263,7 @@ THREE.TessellateModifier.prototype.modify = function ( geometry ) {
 
 	if ( isBufferGeometry ) {
 
-		return new THREE.BufferGeometry().fromGeometry(geometry);
+		return new THREE.BufferGeometry().fromGeometry( geometry );
 
 	} else {
 

+ 1 - 1
examples/jsm/modifiers/TessellateModifier.d.ts

@@ -8,7 +8,7 @@ export class TessellateModifier {
 	constructor( maxEdgeLength?: number, maxIterations?: number, maxFaces?: number );
 	maxEdgeLength: number = 0.1;
 	maxIterations: number = 6;
-	maxFaces: number = 100000;
+	maxFaces: number = Infinity;
 
 	modify( geometry: Geometry | BufferGeometry ): Geometry | BufferGeometry;
 

+ 1 - 1
examples/jsm/modifiers/TessellateModifier.js

@@ -8,7 +8,7 @@ import {
  * Break faces with edges longer than maxEdgeLength
  */
 
-var TessellateModifier = function ( maxEdgeLength = 0.1, maxIterations = 6, maxFaces = 1000000 ) {
+var TessellateModifier = function ( maxEdgeLength = 0.1, maxIterations = 6, maxFaces = Infinity ) {
 
 	this.maxEdgeLength = maxEdgeLength;
 	this.maxIterations = maxIterations;

+ 1 - 1
examples/webgl_modifier_tessellation.html

@@ -105,7 +105,7 @@
 
 				geometry.center();
 
-				const tessellateModifier = new TessellateModifier( 8, 6, 30000 );
+				const tessellateModifier = new TessellateModifier( 8, 6 );
 
 				geometry = tessellateModifier.modify( geometry );