|
@@ -70,7 +70,6 @@ var GLTFLoader = ( function () {
|
|
|
Loader.call( this, manager );
|
|
|
|
|
|
this.dracoLoader = null;
|
|
|
- this.ddsLoader = null;
|
|
|
this.ktx2Loader = null;
|
|
|
this.meshoptDecoder = null;
|
|
|
|
|
@@ -196,10 +195,13 @@ var GLTFLoader = ( function () {
|
|
|
|
|
|
},
|
|
|
|
|
|
- setDDSLoader: function ( ddsLoader ) {
|
|
|
+ setDDSLoader: function () {
|
|
|
|
|
|
- this.ddsLoader = ddsLoader;
|
|
|
- return this;
|
|
|
+ throw new Error(
|
|
|
+
|
|
|
+ 'THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".'
|
|
|
+
|
|
|
+ );
|
|
|
|
|
|
},
|
|
|
|
|
@@ -333,10 +335,6 @@ var GLTFLoader = ( function () {
|
|
|
extensions[ extensionName ] = new GLTFDracoMeshCompressionExtension( json, this.dracoLoader );
|
|
|
break;
|
|
|
|
|
|
- case EXTENSIONS.MSFT_TEXTURE_DDS:
|
|
|
- extensions[ extensionName ] = new GLTFTextureDDSExtension( this.ddsLoader );
|
|
|
- break;
|
|
|
-
|
|
|
case EXTENSIONS.KHR_TEXTURE_TRANSFORM:
|
|
|
extensions[ extensionName ] = new GLTFTextureTransformExtension();
|
|
|
break;
|
|
@@ -419,29 +417,9 @@ var GLTFLoader = ( function () {
|
|
|
KHR_TEXTURE_TRANSFORM: 'KHR_texture_transform',
|
|
|
KHR_MESH_QUANTIZATION: 'KHR_mesh_quantization',
|
|
|
EXT_TEXTURE_WEBP: 'EXT_texture_webp',
|
|
|
- EXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression',
|
|
|
- MSFT_TEXTURE_DDS: 'MSFT_texture_dds'
|
|
|
+ EXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression'
|
|
|
};
|
|
|
|
|
|
- /**
|
|
|
- * DDS Texture Extension
|
|
|
- *
|
|
|
- * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds
|
|
|
- *
|
|
|
- */
|
|
|
- function GLTFTextureDDSExtension( ddsLoader ) {
|
|
|
-
|
|
|
- if ( ! ddsLoader ) {
|
|
|
-
|
|
|
- throw new Error( 'THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader' );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- this.name = EXTENSIONS.MSFT_TEXTURE_DDS;
|
|
|
- this.ddsLoader = ddsLoader;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Punctual Lights Extension
|
|
|
*
|
|
@@ -2452,15 +2430,7 @@ var GLTFLoader = ( function () {
|
|
|
|
|
|
var source;
|
|
|
|
|
|
- if ( textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ] ) {
|
|
|
-
|
|
|
- source = json.images[ textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].source ];
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- source = json.images[ textureDef.source ];
|
|
|
-
|
|
|
- }
|
|
|
+ source = json.images[ textureDef.source ];
|
|
|
|
|
|
var loader;
|
|
|
|
|
@@ -2472,9 +2442,7 @@ var GLTFLoader = ( function () {
|
|
|
|
|
|
if ( ! loader ) {
|
|
|
|
|
|
- loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
|
|
|
- ? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
|
|
|
- : this.textureLoader;
|
|
|
+ loader = this.textureLoader;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -2631,7 +2599,7 @@ var GLTFLoader = ( function () {
|
|
|
* Assigns final material to a Mesh, Line, or Points instance. The instance
|
|
|
* already has a material (generated from the glTF material options alone)
|
|
|
* but reuse of the same glTF material may require multiple threejs materials
|
|
|
- * to accomodate different primitive types, defines, etc. New materials will
|
|
|
+ * to accommodate different primitive types, defines, etc. New materials will
|
|
|
* be created if necessary, and reused from a cache.
|
|
|
* @param {Object3D} mesh Mesh, Line, or Points instance.
|
|
|
*/
|