|
@@ -17,7 +17,11 @@ THREE.GLTFLoader = ( function () {
|
|
this.ddsLoader = null;
|
|
this.ddsLoader = null;
|
|
|
|
|
|
this.pluginCallbacks = [];
|
|
this.pluginCallbacks = [];
|
|
- this.register( function ( parser ) { return new GLTFMaterialsClearcoatExtension( parser ); } );
|
|
|
|
|
|
+ this.register( function ( parser ) {
|
|
|
|
+
|
|
|
|
+ return new GLTFMaterialsClearcoatExtension( parser );
|
|
|
|
+
|
|
|
|
+ } );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -117,7 +121,7 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
register: function ( callback ) {
|
|
register: function ( callback ) {
|
|
|
|
|
|
- if ( this.pluginCallbacks.indexOf( callback ) === -1 ) {
|
|
|
|
|
|
+ if ( this.pluginCallbacks.indexOf( callback ) === - 1 ) {
|
|
|
|
|
|
this.pluginCallbacks.push( callback );
|
|
this.pluginCallbacks.push( callback );
|
|
|
|
|
|
@@ -129,7 +133,7 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
unregister: function ( callback ) {
|
|
unregister: function ( callback ) {
|
|
|
|
|
|
- if ( this.pluginCallbacks.indexOf( callback ) !== -1 ) {
|
|
|
|
|
|
+ if ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) {
|
|
|
|
|
|
this.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );
|
|
this.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );
|
|
|
|
|
|
@@ -468,7 +472,7 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- GLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( materialIndex ) {
|
|
|
|
|
|
+ GLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( /* materialIndex */ ) {
|
|
|
|
|
|
return THREE.MeshPhysicalMaterial;
|
|
return THREE.MeshPhysicalMaterial;
|
|
|
|
|
|
@@ -1469,10 +1473,15 @@ THREE.GLTFLoader = ( function () {
|
|
// 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 ( this.useImageBitmap ) {
|
|
if ( this.useImageBitmap ) {
|
|
|
|
+
|
|
this.textureLoader = new THREE.ImageBitmapLoader( this.options.manager );
|
|
this.textureLoader = new THREE.ImageBitmapLoader( this.options.manager );
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
+
|
|
this.textureLoader = new THREE.TextureLoader( this.options.manager );
|
|
this.textureLoader = new THREE.TextureLoader( this.options.manager );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
this.textureLoader.setCrossOrigin( this.options.crossOrigin );
|
|
this.textureLoader.setCrossOrigin( this.options.crossOrigin );
|
|
|
|
|
|
this.fileLoader = new THREE.FileLoader( this.options.manager );
|
|
this.fileLoader = new THREE.FileLoader( this.options.manager );
|
|
@@ -2236,7 +2245,7 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
- GLTFParser.prototype.getMaterialType = function ( materialIndex ) {
|
|
|
|
|
|
+ GLTFParser.prototype.getMaterialType = function ( /* materialIndex */ ) {
|
|
|
|
|
|
return THREE.MeshStandardMaterial;
|
|
return THREE.MeshStandardMaterial;
|
|
|
|
|