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: Overwrite copy() in generators. #25536

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 20, 2023

Fixed #25345.

Description

This PR introduces copy() in geometry generators so parameters isn't copied in BufferGeometry anymore. That fixes the unexpected behavior of the library described in #25345.

Although this PR introduces some redundancy, it is still the more clean design since BufferGeometry really shouldn't access properties from derived classes. three.js already use this pattern for the copy() methods of materials.

@Mugen87 Mugen87 changed the title BufferGeometry: Overwrite copy() in gener BufferGeometry: Overwrite copy() in generators. Feb 20, 2023
@mrdoob mrdoob added this to the r150 milestone Feb 20, 2023
@mrdoob mrdoob merged commit 0345c78 into mrdoob:dev Feb 20, 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.

BufferGeometry.copy(BoxGeometry) error when exporting toJSON
2 participants