Skip to content

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
@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