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

DataTextureLoader: Simplify default value for texData. #28366

Closed
wants to merge 1 commit into from

Conversation

linbingquan
Copy link
Contributor

Related issue: #XXXX

Description

As the title says.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
678.6 kB (168.1 kB) 678.6 kB (168.1 kB) -85 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
457.8 kB (110.4 kB) 457.8 kB (110.4 kB) +0 B

magFilter = LinearFilter,
minFilter = LinearFilter,
anisotropy = 1,
} = texData;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Apparently I have to get used to this kind of coding style^^. It is still not 100% intuitive to me...

Copy link
Collaborator

@Mugen87 Mugen87 May 13, 2024

Choose a reason for hiding this comment

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

@mrdoob Do you think this really improves readability?

Same in #28365, btw.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH, this one has a learning cost, but if you use it for a while, you maybe like this grammar candy. After all, less code is being written. There should be no side effects.

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think it improved readability honestly...

@mrdoob mrdoob closed this May 16, 2024
@linbingquan linbingquan deleted the dev-loader branch May 17, 2024 10:49
@Mugen87 Mugen87 added this to the r165 milestone May 17, 2024
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.

None yet

3 participants