Explorar o código

GLTFLoader: Avoid using ImageBitmap in Safari. (#23086)

mrdoob %!s(int64=3) %!d(string=hai) anos
pai
achega
e2bdc7590e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/jsm/loaders/GLTFLoader.js

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

@@ -2253,7 +2253,7 @@ class GLTFParser {
 
 
 		// 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.
-		if ( typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false ) {
+		if ( typeof createImageBitmap !== 'undefined' && /Firefox|Safari/.test( navigator.userAgent ) === false ) {
 
 
 			this.textureLoader = new ImageBitmapLoader( this.options.manager );
 			this.textureLoader = new ImageBitmapLoader( this.options.manager );