浏览代码

#14675 | TextureLoader - Regex update

Anis Zuko 7 年之前
父节点
当前提交
402290d717
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/loaders/TextureLoader.js

+ 1 - 1
src/loaders/TextureLoader.js

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