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

Examples: Clean up. #27267

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Examples: Clean up. #27267

merged 1 commit into from
Nov 28, 2023

Conversation

linbingquan
Copy link
Contributor

Related issue: #XXXX

Description

Removed useless code.

I think it is useless. There's judgment here, like:

this.index = new ( arrayNeedsUint32( index ) ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );

If this isn't right, Please tell me.

I will close this PR. Thanks.

Copy link
Collaborator

@Mugen87 Mugen87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is a leftover from the original code which created an index buffer based on Uint16Array. As you pointed out correctly, BufferGeometry.setIndex() is more variable and picks an optimal array type based on the index data.

@Mugen87 Mugen87 merged commit 6663195 into mrdoob:dev Nov 28, 2023
11 checks passed
@Mugen87 Mugen87 added this to the r159 milestone Nov 28, 2023
@linbingquan linbingquan deleted the dev-examples-indexed branch November 28, 2023 13:07
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
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.

2 participants