未验证 提交 1f6538f2 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15141 from zprodev/feature/fix-jpeg-check

Fix jpeg check in TextureLoader
......@@ -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( /\.jpe?g$/i ) > 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册