Ver Fonte

Merge pull request #14682 from 4zuko/feature/texture-loader-regex-update

#14675 | TextureLoader - Regex update
Mr.doob há 7 anos atrás
pai
commit
e130516689
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/loaders/TextureLoader.js

+ 1 - 1
src/loaders/TextureLoader.js

@@ -31,7 +31,7 @@ Object.assign( TextureLoader.prototype, {
 			texture.image = image;
 
 			// JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB.
-			var isJPEG = url.search( /\.(jpg|jpeg)$/ ) > 0 || url.search( /^data\:image\/jpeg/ ) === 0;
+			var isJPEG = url.search( /\.jpe?g$/i ) > 0 || url.search( /^data\:image\/jpeg/ ) === 0;
 
 			texture.format = isJPEG ? RGBFormat : RGBAFormat;
 			texture.needsUpdate = true;