瀏覽代碼

GLTFLoader: Test Firefox UA in ImageBitmap check.

Mr.doob 5 年之前
父節點
當前提交
70aed3c809
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      examples/js/loaders/GLTFLoader.js
  2. 1 1
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -1468,7 +1468,7 @@ THREE.GLTFLoader = ( function () {
 		// BufferGeometry caching
 		// BufferGeometry caching
 		this.primitiveCache = {};
 		this.primitiveCache = {};
 
 
-		this.useImageBitmap = typeof createImageBitmap !== 'undefined';
+		this.useImageBitmap = typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false;
 
 
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
 		// expensive work of uploading a texture to the GPU off the main thread.

+ 1 - 1
examples/jsm/loaders/GLTFLoader.js

@@ -1533,7 +1533,7 @@ var GLTFLoader = ( function () {
 		// BufferGeometry caching
 		// BufferGeometry caching
 		this.primitiveCache = {};
 		this.primitiveCache = {};
 
 
-		this.useImageBitmap = typeof createImageBitmap !== 'undefined';
+		this.useImageBitmap = typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false;
 
 
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
 		// expensive work of uploading a texture to the GPU off the main thread.