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

BufferGeometry: Remove merge(). #24454

Merged
merged 2 commits into from
Aug 9, 2022
Merged

BufferGeometry: Remove merge(). #24454

merged 2 commits into from
Aug 9, 2022

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 5, 2022

Fixed #24443

Description

Based on the discussion in #24443, this PR removes BufferGeometry.merge(). Users are advised to merge their geometry data via BufferGeometryUtils instead (for instance mergeBufferGeometries()).

I have not restored the logic of BufferGeometry.merge() as a setBufferAt() method since I think we should move the development towards more generic APIs and avoid user level code that performs direct array access (e.g. attribute.getX() vs. attribute.array) or requires knowledge about the data structure (interleaved vs non-interleaved data).

@Mugen87 Mugen87 added this to the r144 milestone Aug 6, 2022
Copy link
Collaborator

@gkjohnson gkjohnson left a comment

Choose a reason for hiding this comment

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

Code looks good to me!

@mrdoob mrdoob merged commit 3119830 into mrdoob:dev Aug 9, 2022
@mrdoob
Copy link
Owner

mrdoob commented Aug 9, 2022

Thanks!

1 similar comment
@philipswan
Copy link

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* BufferGeometry: Remove merge().

* Tests: Clean up.
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
* BufferGeometry: Remove merge().

* Tests: Clean up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants