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

WebGLTextures: Directly evaluate capabilities. #27340

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 8, 2023

Fixed #27330.

Description

This PR makes sure WebGLTextures directly evaluate the capabilities (except for the WebGL 2 check which will be removed soon anyway).

Most of these variables were used only once so I think declaring a separate variable isn't necessary. Not caching capabilities also makes it possible for apps to override values which can be useful in certain scenarios.

Copy link

github-actions bot commented Dec 8, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
669.6 kB (166.2 kB) 669.6 kB (166.2 kB) -4 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
450.4 kB (109.1 kB) 450.4 kB (109.1 kB) -19 B

@Mugen87 Mugen87 added this to the r160 milestone Dec 8, 2023
@Mugen87 Mugen87 merged commit 4ec8560 into mrdoob:dev Dec 8, 2023
12 checks passed
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 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.

Effectively limiting max texture resolution / overriding the capabilities that WebGLCapabilties reports
1 participant