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: Make userAgent test more robust. #24717

Merged
merged 2 commits into from
Oct 1, 2022

Conversation

linev
Copy link
Contributor

@linev linev commented Sep 30, 2022

Otherwise it fails in node, where global navigator object is not defined

Fixed #24716

linev and others added 2 commits September 30, 2022 11:04
Otherwise it fails in node, where global navigator object is not defined
@Mugen87 Mugen87 added this to the r146 milestone Sep 30, 2022
@Mugen87 Mugen87 merged commit 1fd7089 into mrdoob:dev Oct 1, 2022
@Mugen87 Mugen87 changed the title Test navigator before using it in WebGLTextures WebGLTextures: Make userAgent test more robust. Oct 1, 2022
@linev linev deleted the test_navigator branch October 1, 2022 16:33
@jcyuan
Copy link

jcyuan commented Nov 6, 2022

const supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent );

ain't this way better?

@mrdoob
Copy link
Owner

mrdoob commented Nov 8, 2022

@jcyuan 43b384a

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.

WebGLTextures uses navigator object - also with **node.js**
4 participants