-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Adding BufferGeometryUtils.mergeVertices #15549
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
Conversation
|
What happens when you attempt to merge vertices but the corresponding uv-coordinates or vertex normals are actually different? Wouldn't you corrupt the data in this case? |
|
Strong +1 for adding a BufferGeometryUtils.mergeVertices function for BufferGeometry, although I think @gkjohnson's PR #14116 covers some needs (morph targets, configurable tolerance) that this PR does not. Since that PR has stalled for now, merging just this function — after cherry-picking any code we want from the other PR — would work. |
Yes, that is what |
|
@donmccurdy I'd like to get that PR merged, too. It looks like the milestone keeps getting pushed back but it's unclear why. Maybe @mrdoob can shed some light? I'm happy to make any needed changes to get it merged. If |
I forgot about I didn't see that PR. I can leave my PR on hold and leave the team decide. |
I think the milestone changing with each upcoming release just means we're tentatively willing to include it with the upcoming release (once review and discussion has resolved), but it doesn't block the release. In other words, "awaiting further review." I'll comment there. |
| numOriginalIndices = indices1.length; | ||
|
|
||
| } | ||
| else { |
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.
nit: If there is an else statement, it should be on the same line as the closing bracket of the block, like } else {.
https://github.com/mrdoob/three.js/wiki/Mr.doob's-Code-Style%E2%84%A2#if-statement
|
@yomboprime Should I merge #14116 instead? Anything that PR is missing? |
Yes, this one only adds the points and lines support, which is generally irrelevant. |
|
I see. Sorry for the duplicated efforts. Feel free to add the points and lines support once #14116 is merged thought! |
This adds
BufferGeometryUtils.mergeVerticesand modifies thewebgl_physics_volumeexample which used theGeometryone, removing completely the dependency of the example toGeometry.Works with usual attributes, I've not implemented interleaved ones.