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

WebGLGeometries: Announce stop of THREE.Geometry support. #17457

Closed
wants to merge 1 commit into from

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 10, 2019

Instead of directly stop rendering THREE.Geometry (see #15514), it might be more acceptable to announce this change so users can easier prepare for it.

The warning is logged once for each automatic geometry conversion of WebGLRenderer.

@looeee
Copy link
Collaborator

looeee commented Sep 10, 2019

I'd say we should give at least 6 months warning.

Once we get treeshaking working, most of the unused code like this should be taken out of user's bundles, right?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Sep 10, 2019

Once we get treeshaking working, most of the unused code like this should be taken out of user's bundles, right?

Not sure what you mean. Are you referring to the console.log?

@looeee
Copy link
Collaborator

looeee commented Sep 10, 2019

No, I mean the actual Geometry classes.

For example BoxGeometry.js has two exports:

export { BoxGeometry, BoxBufferGeometry };

When a user does this:

import { BoxBufferGeometry } from 'three';

...they currently get both exports included in their bundle (well actually, they get all the exports from three.module.js) . With tree shaking, the BoxGeometry class should get identified as dead code and removed along with all the other unused classes.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Sep 10, 2019

Ah, now I see what you mean. Yes, this is the intended outcome!

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 10, 2019

Closing for now. I should have created this PR as a "Draft PR" since I primarily wanted some feedback about this approach. As soon as @mrdoob feels comfortable with deprecating Geometry, we can add such a message until it the code paths are finally removed.

@Mugen87 Mugen87 closed this Oct 10, 2019
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