Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ArrowHelper: Make .setLength() more robust. #17458
This change will avoid the following warning if
this.line.scale.set( 1, Math.max( Number.EPSILON, length - headLength ), 1 );
Setting the scale to be
It is true that the normal matrix is not used in this case because the material is of the basic type.
However, since humans can only see 3-significant digits -- or so -- I would suggest doing something like this, instead:
this.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // ref this post
That should not have bad numerical behavior, and the line would not be visible because it is so short.