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

GLTF: inline emod function to remove loaders.gl/math dependency #2808

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

felixpalmer
Copy link
Collaborator

Without this, importing @loaders.gl/gltf fails (e.g. in luma.gl) due to this import: https://github.com/visgl/loaders.gl/blob/master/modules/gltf/src/lib/extensions/utils/3d-tiles-utils.ts#L17

Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: While I really appreciate the effort to modularize, I feel that adding a dependency just for a one liner mod function is overkill. While tree shaking should take care of removing all the unused functions from production bundles, every dependency does make the library a little heavier to use.

In this case I would just copy the emod function over to the importing file and remove the dependency.

@felixpalmer felixpalmer changed the title Add loaders.gl/math dependency to gltf module GLTF: inline emod function to remove loaders.gl/math dependency Nov 27, 2023
@felixpalmer felixpalmer merged commit 617d83d into master Nov 27, 2023
3 checks passed
@felixpalmer felixpalmer deleted the felix/gltf-import-math branch November 27, 2023 16:17
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