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

open code log2 replacement for IE11 compat #13714

Merged
merged 2 commits into from
Mar 28, 2018
Merged

open code log2 replacement for IE11 compat #13714

merged 2 commits into from
Mar 28, 2018

Conversation

aardgoose
Copy link
Contributor

alternative fix for IE11

@@ -93,7 +93,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
_gl.generateMipmap( target );

var textureProperties = properties.get( texture );
textureProperties.__maxMipLevel = Math.log2( Math.max( width, height ) );
textureProperties.__maxMipLevel = Math.log( Math.max( width, height ) ) * Math.LOG2E;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Personally I want comment here describing this style is for browsers which don't support Math.log2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I was intending to but forgot by the time I got to a keyboard.
Another + point for a polyfill, the workaround is contained in one place.

I'll add the comment

@mrdoob mrdoob added this to the r92 milestone Mar 28, 2018
@mrdoob mrdoob merged commit 7cb08aa into mrdoob:dev Mar 28, 2018
@mrdoob
Copy link
Owner

mrdoob commented Mar 28, 2018

Thanks!

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

4 participants