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

WebGPURenderer: Tree-Shaking 1/2 cleanup #29238

Conversation

RenaudRohlinger
Copy link
Collaborator

Related issue: #29187

Description
A few chaining methods were dropped during the refactor, this PR also export registerNodeClass for custom node in user-land.

This contribution is funded by Utsubo

Copy link

github-actions bot commented Aug 27, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.4 kB (169.7 kB) 685.4 kB (169.7 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
462 kB (111.4 kB) 462 kB (111.4 kB) +0 B

@sunag
Copy link
Collaborator

sunag commented Aug 27, 2024

Exporting registerNodeClass looks great. But unfortunately chaining method are not compatible with tree-shaking, the chaining methods was limited to mathematical functions and language syntax.

TSLBase.js should contain all chaining methods.

@RenaudRohlinger
Copy link
Collaborator Author

Ah I see! Make sense, will update the PR accordingly.

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