Browse Source

WebGLTextures: Removed IE11 workaround.

Mr.doob 4 năm trước cách đây
mục cha
commit
b4b24e310c
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 1 1
      examples/misc_legacy.html
  2. 1 2
      src/renderers/webgl/WebGLTextures.js

+ 1 - 1
examples/misc_legacy.html

@@ -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>

+ 1 - 2
src/renderers/webgl/WebGLTextures.js

@@ -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 ) );
 
 	}