Skip to content
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

fix: toCreasedNormals(): call toNonIndexed() only on non-indexed geometries #26379

Merged
merged 6 commits into from Jul 17, 2023

Conversation

kpvhn
Copy link
Contributor

@kpvhn kpvhn commented Jul 5, 2023

Related issue: #26378

Description

BufferGeometryUtils.toCreasedNormals() produces a warning by BufferGeometry.toNonIndexed() if the provided geometry is already non-indexed:

THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.

It should not produce the warning.

This PR changes BufferGeometryUtils.toCreasedNormals() to call BufferGeometry.toNonIndexed() only if the provided geometry is indexed.
Otherwise, it will just use the original geometry, as has been the case before:
BufferGeometry.toNonIndexed() returns this if the geometry is non-indexed.

@kpvhn kpvhn force-pushed the fix/nonindexed-tocreasenormals branch from 40a0f74 to ccbb6f3 Compare July 5, 2023 09:46
@kpvhn kpvhn force-pushed the fix/nonindexed-tocreasenormals branch from a6baa77 to 1ea6198 Compare July 5, 2023 12:07
@mrdoob mrdoob added this to the r155 milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants