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

BufferGeometryUtils: allow tree-shaking #22267

Merged
merged 3 commits into from
Aug 4, 2021

Conversation

marcofugaro
Copy link
Contributor

Related issue: Similar to #21651

Description
This allows BufferGeometryUtils to be tree-shakeable, so users don't have to include every function if they use only one of them.

The only difference is that

import { BufferGeometryUtils } from '...';

becomes

import * as BufferGeometryUtils from '...';

@mrdoob mrdoob added this to the r132 milestone Aug 4, 2021
@mrdoob mrdoob merged commit c7b19ac into mrdoob:dev Aug 4, 2021
@mrdoob
Copy link
Owner

mrdoob commented Aug 4, 2021

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Aug 4, 2021

/fyi @agviegas

@marcofugaro
Copy link
Contributor Author

marcofugaro commented Aug 4, 2021

I'll convert other util files as well.
I think it's better if we use this pattern from now on, instead of the class + static methods.

@mrdoob
Copy link
Owner

mrdoob commented Aug 4, 2021

Seems like the the current babel script can't handle this pattern:

Screen Shot 2021-08-04 at 3 14 48 PM

@marcofugaro
Copy link
Contributor Author

I'll do a PR!

@mrdoob
Copy link
Owner

mrdoob commented Aug 10, 2021

Hmm, there is still something not quite right:

3614903#diff-0d07c3fa7b8b29a449a8f5f35099c5d9994726a038d441256103891cb39e899fR28

Screen Shot 2021-08-10 at 3 07 02 PM

@marcofugaro
Copy link
Contributor Author

@mrdoob thanks for the report, fixed in #22306!

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