Mr.doob 5 years ago
parent
commit
c83374dd0e

+ 1 - 1
docs/list.js

@@ -467,7 +467,7 @@ var list = {
 
 			"起步": {
 				"创建一个场景": "manual/zh/introduction/Creating-a-scene",
-				"通过模块来引入": "manual/zh/introduction/Import-via-modules",
+				"Installation": "manual/zh/introduction/Installation",
 				"浏览器支持": "manual/zh/introduction/Browser-support",
 				"WebGL兼容性检查": "manual/zh/introduction/WebGL-compatibility-check",
 				"如何在本地运行Three.js": "manual/zh/introduction/How-to-run-things-locally",

+ 1 - 1
editor/sw.js

@@ -1,4 +1,4 @@
-// r118.1
+// r118.2
 
 const assets = [
 	'./',

+ 2 - 5
examples/js/loaders/GLTFLoader.js

@@ -1468,11 +1468,9 @@ THREE.GLTFLoader = ( function () {
 		// BufferGeometry caching
 		this.primitiveCache = {};
 
-		this.useImageBitmap = typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false;
-
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
-		if ( this.useImageBitmap ) {
+		if ( typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false ) {
 
 			this.textureLoader = new THREE.ImageBitmapLoader( this.options.manager );
 
@@ -1956,7 +1954,6 @@ THREE.GLTFLoader = ( function () {
 		var parser = this;
 		var json = this.json;
 		var options = this.options;
-		var useImageBitmap = this.useImageBitmap;
 		var textureLoader = this.textureLoader;
 
 		var URL = self.URL || self.webkitURL;
@@ -2013,7 +2010,7 @@ THREE.GLTFLoader = ( function () {
 
 				var onLoad = resolve;
 
-				if ( useImageBitmap ) {
+				if ( loader.isImageBitmapLoader === true ) {
 
 					onLoad = function ( imageBitmap ) {
 

+ 1 - 1
examples/jsm/controls/experimental/CameraControls.js

@@ -15,7 +15,7 @@ import {
 	TOUCH,
 	Vector2,
 	Vector3
-} from "../../../build/three.module.js";
+} from "../../../../build/three.module.js";
 
 var CameraControls = function ( object, domElement ) {
 

+ 2 - 5
examples/jsm/loaders/GLTFLoader.js

@@ -1533,11 +1533,9 @@ var GLTFLoader = ( function () {
 		// BufferGeometry caching
 		this.primitiveCache = {};
 
-		this.useImageBitmap = typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false;
-
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
-		if ( this.useImageBitmap ) {
+		if ( typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false ) {
 
 			this.textureLoader = new ImageBitmapLoader( this.options.manager );
 
@@ -2021,7 +2019,6 @@ var GLTFLoader = ( function () {
 		var parser = this;
 		var json = this.json;
 		var options = this.options;
-		var useImageBitmap = this.useImageBitmap;
 		var textureLoader = this.textureLoader;
 
 		var URL = self.URL || self.webkitURL;
@@ -2078,7 +2075,7 @@ var GLTFLoader = ( function () {
 
 				var onLoad = resolve;
 
-				if ( useImageBitmap ) {
+				if ( loader.isImageBitmapLoader === true ) {
 
 					onLoad = function ( imageBitmap ) {