|
@@ -6242,11 +6242,7 @@ THREE.Math = {
|
|
|
|
|
|
};
|
|
|
|
|
|
- }(),
|
|
|
-
|
|
|
- isPowerOfTwo: function ( value ) {
|
|
|
- return ( value & ( value - 1 ) ) === 0 && value !== 0;
|
|
|
- }
|
|
|
+ }()
|
|
|
|
|
|
};
|
|
|
|
|
@@ -25568,6 +25564,13 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
// Textures
|
|
|
|
|
|
+
|
|
|
+ function isPowerOfTwo ( value ) {
|
|
|
+
|
|
|
+ return ( value & ( value - 1 ) ) === 0;
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
function setTextureParameters ( textureType, texture, isImagePowerOfTwo ) {
|
|
|
|
|
|
if ( isImagePowerOfTwo ) {
|
|
@@ -25625,7 +25628,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
|
|
|
|
var image = texture.image,
|
|
|
- isImagePowerOfTwo = THREE.Math.isPowerOfTwo( image.width ) && THREE.Math.isPowerOfTwo( image.height ),
|
|
|
+ isImagePowerOfTwo = isPowerOfTwo( image.width ) && isPowerOfTwo( image.height ),
|
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
@@ -25775,7 +25778,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
}
|
|
|
|
|
|
var image = cubeImage[ 0 ],
|
|
|
- isImagePowerOfTwo = THREE.Math.isPowerOfTwo( image.width ) && THREE.Math.isPowerOfTwo( image.height ),
|
|
|
+ isImagePowerOfTwo = isPowerOfTwo( image.width ) && isPowerOfTwo( image.height ),
|
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
@@ -25888,7 +25891,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
// Setup texture, create render and frame buffers
|
|
|
|
|
|
- var isTargetPowerOfTwo = THREE.Math.isPowerOfTwo( renderTarget.width ) && THREE.Math.isPowerOfTwo( renderTarget.height ),
|
|
|
+ var isTargetPowerOfTwo = isPowerOfTwo( renderTarget.width ) && isPowerOfTwo( renderTarget.height ),
|
|
|
glFormat = paramThreeToGL( renderTarget.format ),
|
|
|
glType = paramThreeToGL( renderTarget.type );
|
|
|
|