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

Legacy: Remove more deprercated methods to improve tree-shaking #21649

Merged
merged 3 commits into from
Apr 14, 2021

Conversation

marcofugaro
Copy link
Contributor

Related issue: #21437 (comment)

Description

Now that the core has been mostly converted to classes, let's remove the remaining deprecated methods that are preventing some classes from being tree-shaken.

In detail:

  • remove InstancedBufferGeometry.maxInstancedCount saving ~0.8kb
  • remove Curve.__arcLengthDivisions saving ~3.1kb
  • remove Raycaster.linePrecision saving ~1.42kb
  • remove InterleavedBuffer.dynamic saving ~2.17kb
  • remove MeshPhysicalMaterial.transparency saving ~3.5kb

This brings down the tree-shaken bundle to ~402kb

Before this PR After this PR

@mrdoob
Copy link
Owner

mrdoob commented Apr 14, 2021

These look good to me. Could you fix the linting issues?

@mrdoob mrdoob added this to the r128 milestone Apr 14, 2021
@marcofugaro
Copy link
Contributor Author

Whoops! Fixed.

@mrdoob mrdoob merged commit 1d47886 into mrdoob:dev Apr 14, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 14, 2021

Thanks!

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