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

WebGLExtensions: Use warnOnce to report unsupported extensions #28242

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

vanruesc
Copy link
Contributor

Description

WebGLExtensions currently uses console.warn to report missing support for requested extensions which causes console spam in some situations. For example, the batched mesh example logs the following message each frame in Firefox:

THREE.WebGLRenderer: WEBGL_multi_draw extension not supported.

This PR changes the logging to use warnOnce instead.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
674.5 kB (167.1 kB) 674.5 kB (167.1 kB) -10 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
453.8 kB (109.6 kB) 453.8 kB (109.6 kB) +3 B
@Mugen87 Mugen87 added this to the r165 milestone Apr 30, 2024
@mrdoob mrdoob merged commit b8198a7 into mrdoob:dev Apr 30, 2024
8 of 12 checks passed
@vanruesc vanruesc deleted the webglextensions-warnonce branch April 30, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants