Selaa lähdekoodia

Merge pull request #17458 from Mugen87/dev38

ArrowHelper: Make .setLength() more robust.
Mr.doob 5 vuotta sitten
vanhempi
commit
cd70772a14
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/helpers/ArrowHelper.js

+ 1 - 1
src/helpers/ArrowHelper.js

@@ -97,7 +97,7 @@ ArrowHelper.prototype.setLength = function ( length, headLength, headWidth ) {
 	if ( headLength === undefined ) headLength = 0.2 * length;
 	if ( headWidth === undefined ) headWidth = 0.2 * headLength;
 
-	this.line.scale.set( 1, Math.max( 0, length - headLength ), 1 );
+	this.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458
 	this.line.updateMatrix();
 
 	this.cone.scale.set( headWidth, headLength, headWidth );