-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
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
Remove optionalTarget: More clean up #13530
Conversation
src/objects/Mesh.js
Outdated
intersection.face = new Face3( a, b, c, Triangle.normal( vA, vB, vC ) ); | ||
var face = new Face3( a, b, c ); | ||
|
||
triangle.set( vA, vB, vC ).normal( faceNormal ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WestLangley In context of BufferGeometry.center()
, the semantics of Triangle.normal()
is also problematic. It should be Triangle.getNormal()
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I guess it should be Triangle.getNormal( a, b, c, target )
and Triangle.prototype.getNormal( a, b, c, target )
.
Also barycoordFromPoint()
-> getBarycoord()
.
Separate PR, though.
src/objects/Mesh.js
Outdated
var face = new Face3( a, b, c ); | ||
|
||
triangle.set( vA, vB, vC ).normal( faceNormal ); | ||
face.normal.copy( faceNormal ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any event, you can write your existing code like so:
triangle.set( vA, vB, vC ).normal( face.normal );
Or, better yet:
Triangle.normal( vA, vB, vC, face.normal );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better!
Thanks! |
I've checked all examples, the editor and the docs and found no more warnings so far 👍 |
Thanks, @Mugen87 ! |
Follow up #13522