We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I generate a CatmullRomCurve3 with tension=0, the curve will actually initialize with a tension=0.5
CatmullRomCurve3
tension=0
tension=0.5
const curve = new THREE.CatmullRomCurve3( points, // Tension true, // Closed "catmullrom", // Type 0 // Tension )
Bug: Tension = 0.0 looks like Tension = 0.5
Tension = 0.0
Tension = 0.5
Expected: Tension = 0.0
I'm achieving this look for the screenshot by setting tension=0.001
tension=0.001
I believe this is caused by this code in the initializer:
this.tension = tension || 0.5;
Which should be something like:
const defaultTension = 0.5; // Handle `0` as a valid input this.tension = (tension === 0 || tension) ? tension : defaultTension;
0.109.0
The text was updated successfully, but these errors were encountered:
Nice find. We use this pattern to fix that:
this.tension = ( tension !== undefined ) ? tension : 0.5;
Would you like to file a PR and fix it?
Sorry, something went wrong.
Handle tension=0
3968d51
Fix Issue mrdoob#19757
65e45b5
No branches or pull requests
Description of the problem
If I generate a
CatmullRomCurve3
withtension=0
, the curve will actually initialize with atension=0.5
Bug:
Tension = 0.0
looks likeTension = 0.5
Expected: Tension = 0.0
I'm achieving this look for the screenshot by setting
tension=0.001
I believe this is caused by this code in the initializer:
this.tension = tension || 0.5;
Which should be something like:
Three.js version
0.109.0
Browser
OS
The text was updated successfully, but these errors were encountered: