Skip to content

Commit

Permalink
WebGLTextures: Removed IE11 workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 23, 2021
1 parent d401181 commit b4b24e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/misc_legacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>

<script src="https://polyfill.io/v3/polyfill.min.js?features=Object.values%2CObject.assign%2CNumber.isInteger%2CNumber.EPSILON%2CMath.sign%2CFunction.name%2CPromise"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=Function.name%2CMath.log2%2CMath.sign%2CNumber.EPSILON%2CNumber.isInteger%2CObject.assign%2CObject.values%2CPromise"></script>

<script src="../build/three.js"></script>
<script src="./js/controls/OrbitControls.js"></script>
Expand Down
3 changes: 1 addition & 2 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,

const textureProperties = properties.get( texture );

// Note: Math.log( x ) * Math.LOG2E used instead of Math.log2( x ) which is not supported by IE11
textureProperties.__maxMipLevel = Math.log( Math.max( width, height ) ) * Math.LOG2E;
textureProperties.__maxMipLevel = Math.log2( Math.max( width, height ) );

}

Expand Down

0 comments on commit b4b24e3

Please sign in to comment.