Prechádzať zdrojové kódy

GltfLoader no breaking Changes

sebastien 6 rokov pred
rodič
commit
8335199397
42 zmenil súbory, kde vykonal 1681 pridanie a 1679 odobranie
  1. 15 15
      Playground/babylon.d.txt
  2. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  3. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  4. 124 124
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  5. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.js.map
  6. 124 124
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  7. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js.map
  8. 175 175
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  9. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.js.map
  10. 175 175
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  11. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js.map
  12. 299 299
      dist/preview release/loaders/babylon.glTFFileLoader.js
  13. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  14. 299 299
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js.map
  16. 13 13
      dist/preview release/loaders/babylonjs.loaders.d.ts
  17. 290 290
      dist/preview release/loaders/babylonjs.loaders.js
  18. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  19. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  20. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js.map
  21. 40 40
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  22. 3 3
      inspector/src/tabs/GLTFTab.ts
  23. 4 4
      loaders/legacy/legacy-glTF1FileLoader.ts
  24. 4 4
      loaders/legacy/legacy-glTF2FileLoader.ts
  25. 10 8
      loaders/legacy/legacy-glTFFileLoader.ts
  26. 2 2
      loaders/src/glTF/1.0/glTFBinaryExtension.ts
  27. 4 4
      loaders/src/glTF/1.0/glTF1Loader.ts
  28. 3 3
      loaders/src/glTF/1.0/glTFLoaderExtension.ts
  29. 2 2
      loaders/src/glTF/1.0/glTFMaterialsCommonExtension.ts
  30. 1 1
      loaders/src/glTF/1.0/index.ts
  31. 5 5
      loaders/src/glTF/2.0/Extensions/EXT_lights_image_based.ts
  32. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts
  33. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
  34. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
  35. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts
  36. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_texture_transform.ts
  37. 7 7
      loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter.ts
  38. 6 6
      loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
  39. 5 5
      loaders/src/glTF/2.0/Extensions/MSFT_minecraftMesh.ts
  40. 5 5
      loaders/src/glTF/2.0/Extensions/MSFT_sRGBFactors.ts
  41. 29 29
      loaders/src/glTF/2.0/glTF2Loader.ts
  42. 1 1
      loaders/src/glTF/2.0/index.ts

+ 15 - 15
Playground/babylon.d.txt

@@ -53546,9 +53546,9 @@ declare module BABYLON {
         */
     export class GLTFFileLoader implements BABYLON.IDisposable, BABYLON.ISceneLoaderPluginAsync, BABYLON.ISceneLoaderPluginFactory {
             /** @hidden */
-private static _CreateGLTF1Loader: (parent: GLTFFileLoader) => IGLTFLoader;
+private static _CreateGLTFLoader: (parent: GLTFFileLoader) => IGLTFLoader;
             /** @hidden */
-private static _CreateGLTF2Loader: (parent: GLTFFileLoader) => IGLTFLoader;
+private static _CreateGLTFLoader: (parent: GLTFFileLoader) => IGLTFLoader;
             /**
                 * Raised when the asset has been parsed
                 */
@@ -53965,7 +53965,7 @@ declare module BABYLON.GLTF1 {
      * glTF V1 Loader
      * @hidden
      */
-    export class GLTF1Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
@@ -54540,7 +54540,7 @@ declare module BABYLON {
     /**
         * The glTF 2.0 loader
         */
-    export class GLTF2Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
             /** The glTF object parsed from the JSON. */
             gltf: IGLTF;
             /** The Babylon scene when loading the asset. */
@@ -54552,7 +54552,7 @@ declare module BABYLON {
                 * @param name The name of the loader extension.
                 * @param factory The factory function that creates the loader extension.
                 */
-            static RegisterExtension(name: string, factory: (loader: GLTF2Loader) => IGLTFLoaderExtensionV2): void;
+            static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtensionV2): void;
             /**
                 * Unregisters a loader extension.
                 * @param name The name of the loader extenion.
@@ -55006,7 +55006,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55025,7 +55025,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */IGLTFLoaderExtension
@@ -55042,7 +55042,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55061,7 +55061,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55078,7 +55078,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55095,7 +55095,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55112,7 +55112,7 @@ declare module BABYLON {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -55151,7 +55151,7 @@ declare module BABYLON {
                 */
             onMaterialLODsLoadedObservable: BABYLON.Observable<number>;
             /** @hidden */
-            constructor(loader: GLTF2Loader);
+            constructor(loader: GLTFLoader);
             /** @hidden */
             dispose(): void;
             /** @hidden */
@@ -55169,7 +55169,7 @@ declare module BABYLON {
     export class MSFT_minecraftMesh implements IGLTFLoaderExtensionV2 {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
@@ -55179,7 +55179,7 @@ declare module BABYLON {
     export class MSFT_sRGBFactors implements IGLTFLoaderExtensionV2 {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 124 - 124
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -141,7 +141,8 @@ function __export(m) {
 }
 Object.defineProperty(exports, "__esModule", { value: true });
 var FileLoader = __webpack_require__(/*! ../src/glTF/glTFFileLoader */ "./src/glTF/glTFFileLoader.ts");
-var LoadersV1 = __webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts");
+var GLTF1 = __webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts");
+exports.GLTF1 = GLTF1;
 /**
  * This is the entry point for the UMD module.
  * The entry point for a future ESM package should be index.ts
@@ -153,21 +154,107 @@ if (typeof globalObject !== "undefined") {
         globalObject.BABYLON[key] = FileLoader[key];
     }
     globalObject.BABYLON.GLTF1 = globalObject.BABYLON.GLTF1 || {};
-    for (var key in LoadersV1) {
-        globalObject.BABYLON.GLTF1[key] = LoadersV1[key];
+    for (var key in GLTF1) {
+        globalObject.BABYLON.GLTF1[key] = GLTF1[key];
     }
 }
 __export(__webpack_require__(/*! ../src/glTF/glTFFileLoader */ "./src/glTF/glTFFileLoader.ts"));
-__export(__webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts"));
 
 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
 
 /***/ }),
 
-/***/ "./src/glTF/1.0/glTF1Loader.ts":
-/*!*************************************!*\
-  !*** ./src/glTF/1.0/glTF1Loader.ts ***!
-  \*************************************/
+/***/ "./src/glTF/1.0/glTFBinaryExtension.ts":
+/*!*********************************************!*\
+  !*** ./src/glTF/1.0/glTFBinaryExtension.ts ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    }
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
+var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
+var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
+var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
+var GLTFBinaryExtension = /** @class */ (function (_super) {
+    __extends(GLTFBinaryExtension, _super);
+    function GLTFBinaryExtension() {
+        return _super.call(this, "KHR_binary_glTF") || this;
+    }
+    GLTFBinaryExtension.prototype.loadRuntimeAsync = function (scene, data, rootUrl, onSuccess, onError) {
+        var extensionsUsed = data.json.extensionsUsed;
+        if (!extensionsUsed || extensionsUsed.indexOf(this.name) === -1 || !data.bin) {
+            return false;
+        }
+        this._bin = data.bin;
+        onSuccess(glTFLoader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
+        if (gltfRuntime.extensionsUsed.indexOf(this.name) === -1) {
+            return false;
+        }
+        if (id !== BinaryExtensionBufferName) {
+            return false;
+        }
+        onSuccess(this._bin);
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
+        var texture = gltfRuntime.textures[id];
+        var source = gltfRuntime.images[texture.source];
+        if (!source.extensions || !(this.name in source.extensions)) {
+            return false;
+        }
+        var sourceExt = source.extensions[this.name];
+        var bufferView = gltfRuntime.bufferViews[sourceExt.bufferView];
+        var buffer = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
+        onSuccess(buffer);
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
+        var shader = gltfRuntime.shaders[id];
+        if (!shader.extensions || !(this.name in shader.extensions)) {
+            return false;
+        }
+        var binaryExtensionShader = shader.extensions[this.name];
+        var bufferView = gltfRuntime.bufferViews[binaryExtensionShader.bufferView];
+        var shaderBytes = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
+        setTimeout(function () {
+            var shaderString = glTFLoaderUtils_1.GLTFUtils.DecodeBufferToText(shaderBytes);
+            onSuccess(shaderString);
+        });
+        return true;
+    };
+    return GLTFBinaryExtension;
+}(glTFLoaderExtension_1.GLTFLoaderExtension));
+exports.GLTFBinaryExtension = GLTFBinaryExtension;
+glTFLoader_1.GLTFLoader.RegisterExtension(new GLTFBinaryExtension());
+
+
+/***/ }),
+
+/***/ "./src/glTF/1.0/glTFLoader.ts":
+/*!************************************!*\
+  !*** ./src/glTF/1.0/glTFLoader.ts ***!
+  \************************************/
 /*! no static exports found */
 /***/ (function(module, exports, __webpack_require__) {
 
@@ -1467,21 +1554,21 @@ exports.GLTFLoaderBase = GLTFLoaderBase;
 * glTF V1 Loader
 * @hidden
 */
-var GLTF1Loader = /** @class */ (function () {
-    function GLTF1Loader() {
+var GLTFLoader = /** @class */ (function () {
+    function GLTFLoader() {
         this.state = null;
     }
-    GLTF1Loader.RegisterExtension = function (extension) {
-        if (GLTF1Loader.Extensions[extension.name]) {
+    GLTFLoader.RegisterExtension = function (extension) {
+        if (GLTFLoader.Extensions[extension.name]) {
             babylonjs_1.Tools.Error("Tool with the same name \"" + extension.name + "\" already exists");
             return;
         }
-        GLTF1Loader.Extensions[extension.name] = extension;
+        GLTFLoader.Extensions[extension.name] = extension;
     };
-    GLTF1Loader.prototype.dispose = function () {
+    GLTFLoader.prototype.dispose = function () {
         // do nothing
     };
-    GLTF1Loader.prototype._importMeshAsync = function (meshesNames, scene, data, rootUrl, onSuccess, onProgress, onError) {
+    GLTFLoader.prototype._importMeshAsync = function (meshesNames, scene, data, rootUrl, onSuccess, onProgress, onError) {
         var _this = this;
         scene.useRightHandedSystem = true;
         glTFLoaderExtension_1.GLTFLoaderExtension.LoadRuntimeAsync(scene, data, rootUrl, function (gltfRuntime) {
@@ -1541,7 +1628,7 @@ var GLTF1Loader = /** @class */ (function () {
     * @param onProgress event that fires when loading progress has occured
     * @returns a promise containg the loaded meshes, particles, skeletons and animations
     */
-    GLTF1Loader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
+    GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         var _this = this;
         return new Promise(function (resolve, reject) {
             _this._importMeshAsync(meshesNames, scene, data, rootUrl, function (meshes, skeletons) {
@@ -1556,7 +1643,7 @@ var GLTF1Loader = /** @class */ (function () {
             });
         });
     };
-    GLTF1Loader.prototype._loadAsync = function (scene, data, rootUrl, onSuccess, onProgress, onError) {
+    GLTFLoader.prototype._loadAsync = function (scene, data, rootUrl, onSuccess, onProgress, onError) {
         var _this = this;
         scene.useRightHandedSystem = true;
         glTFLoaderExtension_1.GLTFLoaderExtension.LoadRuntimeAsync(scene, data, rootUrl, function (gltfRuntime) {
@@ -1588,7 +1675,7 @@ var GLTF1Loader = /** @class */ (function () {
     * @param onProgress event that fires when loading progress has occured
     * @returns a promise which completes when objects have been loaded to the scene
     */
-    GLTF1Loader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
+    GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
         var _this = this;
         return new Promise(function (resolve, reject) {
             _this._loadAsync(scene, data, rootUrl, function () {
@@ -1598,7 +1685,7 @@ var GLTF1Loader = /** @class */ (function () {
             });
         });
     };
-    GLTF1Loader.prototype._loadShadersAsync = function (gltfRuntime, onload) {
+    GLTFLoader.prototype._loadShadersAsync = function (gltfRuntime, onload) {
         var hasShaders = false;
         var processShader = function (sha, shader) {
             glTFLoaderExtension_1.GLTFLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) {
@@ -1630,7 +1717,7 @@ var GLTF1Loader = /** @class */ (function () {
             onload();
         }
     };
-    GLTF1Loader.prototype._loadBuffersAsync = function (gltfRuntime, onLoad, onProgress) {
+    GLTFLoader.prototype._loadBuffersAsync = function (gltfRuntime, onLoad, onProgress) {
         var hasBuffers = false;
         var processBuffer = function (buf, buffer) {
             glTFLoaderExtension_1.GLTFLoaderExtension.LoadBufferAsync(gltfRuntime, buf, function (bufferView) {
@@ -1662,7 +1749,7 @@ var GLTF1Loader = /** @class */ (function () {
             onLoad();
         }
     };
-    GLTF1Loader.prototype._createNodes = function (gltfRuntime) {
+    GLTFLoader.prototype._createNodes = function (gltfRuntime) {
         var currentScene = gltfRuntime.currentScene;
         if (currentScene) {
             // Only one scene even if multiple scenes are defined
@@ -1680,98 +1767,11 @@ var GLTF1Loader = /** @class */ (function () {
             }
         }
     };
-    GLTF1Loader.Extensions = {};
-    return GLTF1Loader;
+    GLTFLoader.Extensions = {};
+    return GLTFLoader;
 }());
-exports.GLTF1Loader = GLTF1Loader;
-glTFFileLoader_1.GLTFFileLoader._CreateGLTF1Loader = function () { return new GLTF1Loader(); };
-
-
-/***/ }),
-
-/***/ "./src/glTF/1.0/glTFBinaryExtension.ts":
-/*!*********************************************!*\
-  !*** ./src/glTF/1.0/glTFBinaryExtension.ts ***!
-  \*********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var __extends = (this && this.__extends) || (function () {
-    var extendStatics = function (d, b) {
-        extendStatics = Object.setPrototypeOf ||
-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-        return extendStatics(d, b);
-    }
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
-var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
-var BinaryExtensionBufferName = "binary_glTF";
-/** @hidden */
-var GLTFBinaryExtension = /** @class */ (function (_super) {
-    __extends(GLTFBinaryExtension, _super);
-    function GLTFBinaryExtension() {
-        return _super.call(this, "KHR_binary_glTF") || this;
-    }
-    GLTFBinaryExtension.prototype.loadRuntimeAsync = function (scene, data, rootUrl, onSuccess, onError) {
-        var extensionsUsed = data.json.extensionsUsed;
-        if (!extensionsUsed || extensionsUsed.indexOf(this.name) === -1 || !data.bin) {
-            return false;
-        }
-        this._bin = data.bin;
-        onSuccess(glTF1Loader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
-        if (gltfRuntime.extensionsUsed.indexOf(this.name) === -1) {
-            return false;
-        }
-        if (id !== BinaryExtensionBufferName) {
-            return false;
-        }
-        onSuccess(this._bin);
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
-        var texture = gltfRuntime.textures[id];
-        var source = gltfRuntime.images[texture.source];
-        if (!source.extensions || !(this.name in source.extensions)) {
-            return false;
-        }
-        var sourceExt = source.extensions[this.name];
-        var bufferView = gltfRuntime.bufferViews[sourceExt.bufferView];
-        var buffer = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
-        onSuccess(buffer);
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
-        var shader = gltfRuntime.shaders[id];
-        if (!shader.extensions || !(this.name in shader.extensions)) {
-            return false;
-        }
-        var binaryExtensionShader = shader.extensions[this.name];
-        var bufferView = gltfRuntime.bufferViews[binaryExtensionShader.bufferView];
-        var shaderBytes = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
-        setTimeout(function () {
-            var shaderString = glTFLoaderUtils_1.GLTFUtils.DecodeBufferToText(shaderBytes);
-            onSuccess(shaderString);
-        });
-        return true;
-    };
-    return GLTFBinaryExtension;
-}(glTFLoaderExtension_1.GLTFLoaderExtension));
-exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFBinaryExtension());
+exports.GLTFLoader = GLTFLoader;
+glTFFileLoader_1.GLTFFileLoader._CreateGLTF1Loader = function () { return new GLTFLoader(); };
 
 
 /***/ }),
@@ -1786,7 +1786,7 @@ glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFBinaryExtension());
 "use strict";
 
 Object.defineProperty(exports, "__esModule", { value: true });
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
 /** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
@@ -1859,7 +1859,7 @@ var GLTFLoaderExtension = /** @class */ (function () {
                 if (!onSuccess) {
                     return;
                 }
-                onSuccess(glTF1Loader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
+                onSuccess(glTFLoader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
             });
         });
     };
@@ -1876,7 +1876,7 @@ var GLTFLoaderExtension = /** @class */ (function () {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
+            glTFLoader_1.GLTFLoaderBase.LoadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
         });
     };
     GLTFLoaderExtension.LoadTextureAsync = function (gltfRuntime, id, onSuccess, onError) {
@@ -1890,33 +1890,33 @@ var GLTFLoaderExtension = /** @class */ (function () {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.LoadMaterialAsync = function (gltfRuntime, id, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadMaterialAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadMaterialAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadMaterialAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.LoadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.CreateTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.createTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.ApplyExtensions = function (func, defaultFunc) {
-        for (var extensionName in glTF1Loader_1.GLTF1Loader.Extensions) {
-            var loaderExtension = glTF1Loader_1.GLTF1Loader.Extensions[extensionName];
+        for (var extensionName in glTFLoader_1.GLTFLoader.Extensions) {
+            var loaderExtension = glTFLoader_1.GLTFLoader.Extensions[extensionName];
             if (func(loaderExtension)) {
                 return;
             }
@@ -2306,7 +2306,7 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
 /** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
@@ -2420,7 +2420,7 @@ var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     return GLTFMaterialsCommonExtension;
 }(_1.GLTFLoaderExtension));
 exports.GLTFMaterialsCommonExtension = GLTFMaterialsCommonExtension;
-glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFMaterialsCommonExtension());
+glTFLoader_1.GLTFLoader.RegisterExtension(new GLTFMaterialsCommonExtension());
 
 
 /***/ }),
@@ -2439,7 +2439,7 @@ function __export(m) {
 }
 Object.defineProperty(exports, "__esModule", { value: true });
 __export(__webpack_require__(/*! ./glTFBinaryExtension */ "./src/glTF/1.0/glTFBinaryExtension.ts"));
-__export(__webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts"));
+__export(__webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts"));

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.js.map


+ 124 - 124
dist/preview release/loaders/babylon.glTF1FileLoader.min.js

@@ -141,7 +141,8 @@ function __export(m) {
 }
 Object.defineProperty(exports, "__esModule", { value: true });
 var FileLoader = __webpack_require__(/*! ../src/glTF/glTFFileLoader */ "./src/glTF/glTFFileLoader.ts");
-var LoadersV1 = __webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts");
+var GLTF1 = __webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts");
+exports.GLTF1 = GLTF1;
 /**
  * This is the entry point for the UMD module.
  * The entry point for a future ESM package should be index.ts
@@ -153,21 +154,107 @@ if (typeof globalObject !== "undefined") {
         globalObject.BABYLON[key] = FileLoader[key];
     }
     globalObject.BABYLON.GLTF1 = globalObject.BABYLON.GLTF1 || {};
-    for (var key in LoadersV1) {
-        globalObject.BABYLON.GLTF1[key] = LoadersV1[key];
+    for (var key in GLTF1) {
+        globalObject.BABYLON.GLTF1[key] = GLTF1[key];
     }
 }
 __export(__webpack_require__(/*! ../src/glTF/glTFFileLoader */ "./src/glTF/glTFFileLoader.ts"));
-__export(__webpack_require__(/*! ../src/glTF/1.0 */ "./src/glTF/1.0/index.ts"));
 
 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
 
 /***/ }),
 
-/***/ "./src/glTF/1.0/glTF1Loader.ts":
-/*!*************************************!*\
-  !*** ./src/glTF/1.0/glTF1Loader.ts ***!
-  \*************************************/
+/***/ "./src/glTF/1.0/glTFBinaryExtension.ts":
+/*!*********************************************!*\
+  !*** ./src/glTF/1.0/glTFBinaryExtension.ts ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    }
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
+var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
+var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
+var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
+var GLTFBinaryExtension = /** @class */ (function (_super) {
+    __extends(GLTFBinaryExtension, _super);
+    function GLTFBinaryExtension() {
+        return _super.call(this, "KHR_binary_glTF") || this;
+    }
+    GLTFBinaryExtension.prototype.loadRuntimeAsync = function (scene, data, rootUrl, onSuccess, onError) {
+        var extensionsUsed = data.json.extensionsUsed;
+        if (!extensionsUsed || extensionsUsed.indexOf(this.name) === -1 || !data.bin) {
+            return false;
+        }
+        this._bin = data.bin;
+        onSuccess(glTFLoader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
+        if (gltfRuntime.extensionsUsed.indexOf(this.name) === -1) {
+            return false;
+        }
+        if (id !== BinaryExtensionBufferName) {
+            return false;
+        }
+        onSuccess(this._bin);
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
+        var texture = gltfRuntime.textures[id];
+        var source = gltfRuntime.images[texture.source];
+        if (!source.extensions || !(this.name in source.extensions)) {
+            return false;
+        }
+        var sourceExt = source.extensions[this.name];
+        var bufferView = gltfRuntime.bufferViews[sourceExt.bufferView];
+        var buffer = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
+        onSuccess(buffer);
+        return true;
+    };
+    GLTFBinaryExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
+        var shader = gltfRuntime.shaders[id];
+        if (!shader.extensions || !(this.name in shader.extensions)) {
+            return false;
+        }
+        var binaryExtensionShader = shader.extensions[this.name];
+        var bufferView = gltfRuntime.bufferViews[binaryExtensionShader.bufferView];
+        var shaderBytes = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
+        setTimeout(function () {
+            var shaderString = glTFLoaderUtils_1.GLTFUtils.DecodeBufferToText(shaderBytes);
+            onSuccess(shaderString);
+        });
+        return true;
+    };
+    return GLTFBinaryExtension;
+}(glTFLoaderExtension_1.GLTFLoaderExtension));
+exports.GLTFBinaryExtension = GLTFBinaryExtension;
+glTFLoader_1.GLTFLoader.RegisterExtension(new GLTFBinaryExtension());
+
+
+/***/ }),
+
+/***/ "./src/glTF/1.0/glTFLoader.ts":
+/*!************************************!*\
+  !*** ./src/glTF/1.0/glTFLoader.ts ***!
+  \************************************/
 /*! no static exports found */
 /***/ (function(module, exports, __webpack_require__) {
 
@@ -1467,21 +1554,21 @@ exports.GLTFLoaderBase = GLTFLoaderBase;
 * glTF V1 Loader
 * @hidden
 */
-var GLTF1Loader = /** @class */ (function () {
-    function GLTF1Loader() {
+var GLTFLoader = /** @class */ (function () {
+    function GLTFLoader() {
         this.state = null;
     }
-    GLTF1Loader.RegisterExtension = function (extension) {
-        if (GLTF1Loader.Extensions[extension.name]) {
+    GLTFLoader.RegisterExtension = function (extension) {
+        if (GLTFLoader.Extensions[extension.name]) {
             babylonjs_1.Tools.Error("Tool with the same name \"" + extension.name + "\" already exists");
             return;
         }
-        GLTF1Loader.Extensions[extension.name] = extension;
+        GLTFLoader.Extensions[extension.name] = extension;
     };
-    GLTF1Loader.prototype.dispose = function () {
+    GLTFLoader.prototype.dispose = function () {
         // do nothing
     };
-    GLTF1Loader.prototype._importMeshAsync = function (meshesNames, scene, data, rootUrl, onSuccess, onProgress, onError) {
+    GLTFLoader.prototype._importMeshAsync = function (meshesNames, scene, data, rootUrl, onSuccess, onProgress, onError) {
         var _this = this;
         scene.useRightHandedSystem = true;
         glTFLoaderExtension_1.GLTFLoaderExtension.LoadRuntimeAsync(scene, data, rootUrl, function (gltfRuntime) {
@@ -1541,7 +1628,7 @@ var GLTF1Loader = /** @class */ (function () {
     * @param onProgress event that fires when loading progress has occured
     * @returns a promise containg the loaded meshes, particles, skeletons and animations
     */
-    GLTF1Loader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
+    GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         var _this = this;
         return new Promise(function (resolve, reject) {
             _this._importMeshAsync(meshesNames, scene, data, rootUrl, function (meshes, skeletons) {
@@ -1556,7 +1643,7 @@ var GLTF1Loader = /** @class */ (function () {
             });
         });
     };
-    GLTF1Loader.prototype._loadAsync = function (scene, data, rootUrl, onSuccess, onProgress, onError) {
+    GLTFLoader.prototype._loadAsync = function (scene, data, rootUrl, onSuccess, onProgress, onError) {
         var _this = this;
         scene.useRightHandedSystem = true;
         glTFLoaderExtension_1.GLTFLoaderExtension.LoadRuntimeAsync(scene, data, rootUrl, function (gltfRuntime) {
@@ -1588,7 +1675,7 @@ var GLTF1Loader = /** @class */ (function () {
     * @param onProgress event that fires when loading progress has occured
     * @returns a promise which completes when objects have been loaded to the scene
     */
-    GLTF1Loader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
+    GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
         var _this = this;
         return new Promise(function (resolve, reject) {
             _this._loadAsync(scene, data, rootUrl, function () {
@@ -1598,7 +1685,7 @@ var GLTF1Loader = /** @class */ (function () {
             });
         });
     };
-    GLTF1Loader.prototype._loadShadersAsync = function (gltfRuntime, onload) {
+    GLTFLoader.prototype._loadShadersAsync = function (gltfRuntime, onload) {
         var hasShaders = false;
         var processShader = function (sha, shader) {
             glTFLoaderExtension_1.GLTFLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) {
@@ -1630,7 +1717,7 @@ var GLTF1Loader = /** @class */ (function () {
             onload();
         }
     };
-    GLTF1Loader.prototype._loadBuffersAsync = function (gltfRuntime, onLoad, onProgress) {
+    GLTFLoader.prototype._loadBuffersAsync = function (gltfRuntime, onLoad, onProgress) {
         var hasBuffers = false;
         var processBuffer = function (buf, buffer) {
             glTFLoaderExtension_1.GLTFLoaderExtension.LoadBufferAsync(gltfRuntime, buf, function (bufferView) {
@@ -1662,7 +1749,7 @@ var GLTF1Loader = /** @class */ (function () {
             onLoad();
         }
     };
-    GLTF1Loader.prototype._createNodes = function (gltfRuntime) {
+    GLTFLoader.prototype._createNodes = function (gltfRuntime) {
         var currentScene = gltfRuntime.currentScene;
         if (currentScene) {
             // Only one scene even if multiple scenes are defined
@@ -1680,98 +1767,11 @@ var GLTF1Loader = /** @class */ (function () {
             }
         }
     };
-    GLTF1Loader.Extensions = {};
-    return GLTF1Loader;
+    GLTFLoader.Extensions = {};
+    return GLTFLoader;
 }());
-exports.GLTF1Loader = GLTF1Loader;
-glTFFileLoader_1.GLTFFileLoader._CreateGLTF1Loader = function () { return new GLTF1Loader(); };
-
-
-/***/ }),
-
-/***/ "./src/glTF/1.0/glTFBinaryExtension.ts":
-/*!*********************************************!*\
-  !*** ./src/glTF/1.0/glTFBinaryExtension.ts ***!
-  \*********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var __extends = (this && this.__extends) || (function () {
-    var extendStatics = function (d, b) {
-        extendStatics = Object.setPrototypeOf ||
-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-        return extendStatics(d, b);
-    }
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
-var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
-var BinaryExtensionBufferName = "binary_glTF";
-/** @hidden */
-var GLTFBinaryExtension = /** @class */ (function (_super) {
-    __extends(GLTFBinaryExtension, _super);
-    function GLTFBinaryExtension() {
-        return _super.call(this, "KHR_binary_glTF") || this;
-    }
-    GLTFBinaryExtension.prototype.loadRuntimeAsync = function (scene, data, rootUrl, onSuccess, onError) {
-        var extensionsUsed = data.json.extensionsUsed;
-        if (!extensionsUsed || extensionsUsed.indexOf(this.name) === -1 || !data.bin) {
-            return false;
-        }
-        this._bin = data.bin;
-        onSuccess(glTF1Loader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
-        if (gltfRuntime.extensionsUsed.indexOf(this.name) === -1) {
-            return false;
-        }
-        if (id !== BinaryExtensionBufferName) {
-            return false;
-        }
-        onSuccess(this._bin);
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
-        var texture = gltfRuntime.textures[id];
-        var source = gltfRuntime.images[texture.source];
-        if (!source.extensions || !(this.name in source.extensions)) {
-            return false;
-        }
-        var sourceExt = source.extensions[this.name];
-        var bufferView = gltfRuntime.bufferViews[sourceExt.bufferView];
-        var buffer = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
-        onSuccess(buffer);
-        return true;
-    };
-    GLTFBinaryExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
-        var shader = gltfRuntime.shaders[id];
-        if (!shader.extensions || !(this.name in shader.extensions)) {
-            return false;
-        }
-        var binaryExtensionShader = shader.extensions[this.name];
-        var bufferView = gltfRuntime.bufferViews[binaryExtensionShader.bufferView];
-        var shaderBytes = glTFLoaderUtils_1.GLTFUtils.GetBufferFromBufferView(gltfRuntime, bufferView, 0, bufferView.byteLength, glTFLoaderInterfaces_1.EComponentType.UNSIGNED_BYTE);
-        setTimeout(function () {
-            var shaderString = glTFLoaderUtils_1.GLTFUtils.DecodeBufferToText(shaderBytes);
-            onSuccess(shaderString);
-        });
-        return true;
-    };
-    return GLTFBinaryExtension;
-}(glTFLoaderExtension_1.GLTFLoaderExtension));
-exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFBinaryExtension());
+exports.GLTFLoader = GLTFLoader;
+glTFFileLoader_1.GLTFFileLoader._CreateGLTF1Loader = function () { return new GLTFLoader(); };
 
 
 /***/ }),
@@ -1786,7 +1786,7 @@ glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFBinaryExtension());
 "use strict";
 
 Object.defineProperty(exports, "__esModule", { value: true });
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
 /** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
@@ -1859,7 +1859,7 @@ var GLTFLoaderExtension = /** @class */ (function () {
                 if (!onSuccess) {
                     return;
                 }
-                onSuccess(glTF1Loader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
+                onSuccess(glTFLoader_1.GLTFLoaderBase.CreateRuntime(data.json, scene, rootUrl));
             });
         });
     };
@@ -1876,7 +1876,7 @@ var GLTFLoaderExtension = /** @class */ (function () {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
+            glTFLoader_1.GLTFLoaderBase.LoadBufferAsync(gltfRuntime, id, onSuccess, onError, onProgress);
         });
     };
     GLTFLoaderExtension.LoadTextureAsync = function (gltfRuntime, id, onSuccess, onError) {
@@ -1890,33 +1890,33 @@ var GLTFLoaderExtension = /** @class */ (function () {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadShaderStringAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.LoadMaterialAsync = function (gltfRuntime, id, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadMaterialAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadMaterialAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadMaterialAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.LoadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.loadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.CreateTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) {
         GLTFLoaderExtension.ApplyExtensions(function (loaderExtension) {
             return loaderExtension.createTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
         }, function () {
-            glTF1Loader_1.GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+            glTFLoader_1.GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
         });
     };
     GLTFLoaderExtension.ApplyExtensions = function (func, defaultFunc) {
-        for (var extensionName in glTF1Loader_1.GLTF1Loader.Extensions) {
-            var loaderExtension = glTF1Loader_1.GLTF1Loader.Extensions[extensionName];
+        for (var extensionName in glTFLoader_1.GLTFLoader.Extensions) {
+            var loaderExtension = glTFLoader_1.GLTFLoader.Extensions[extensionName];
             if (func(loaderExtension)) {
                 return;
             }
@@ -2306,7 +2306,7 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
-var glTF1Loader_1 = __webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts");
+var glTFLoader_1 = __webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts");
 /** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
@@ -2420,7 +2420,7 @@ var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     return GLTFMaterialsCommonExtension;
 }(_1.GLTFLoaderExtension));
 exports.GLTFMaterialsCommonExtension = GLTFMaterialsCommonExtension;
-glTF1Loader_1.GLTF1Loader.RegisterExtension(new GLTFMaterialsCommonExtension());
+glTFLoader_1.GLTFLoader.RegisterExtension(new GLTFMaterialsCommonExtension());
 
 
 /***/ }),
@@ -2439,7 +2439,7 @@ function __export(m) {
 }
 Object.defineProperty(exports, "__esModule", { value: true });
 __export(__webpack_require__(/*! ./glTFBinaryExtension */ "./src/glTF/1.0/glTFBinaryExtension.ts"));
-__export(__webpack_require__(/*! ./glTF1Loader */ "./src/glTF/1.0/glTF1Loader.ts"));
+__export(__webpack_require__(/*! ./glTFLoader */ "./src/glTF/1.0/glTFLoader.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts"));
 __export(__webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts"));

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 175 - 175
dist/preview release/loaders/babylon.glTF2FileLoader.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 175 - 175
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 299 - 299
dist/preview release/loaders/babylon.glTFFileLoader.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 299 - 299
dist/preview release/loaders/babylon.glTFFileLoader.min.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js.map


+ 13 - 13
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -511,7 +511,7 @@ declare module BABYLON.GLTF1 {
      * glTF V1 Loader
      * @hidden
      */
-    export class GLTF1Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
@@ -1086,7 +1086,7 @@ declare module BABYLON {
     /**
         * The glTF 2.0 loader
         */
-    export class GLTF2Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
             /** The glTF object parsed from the JSON. */
             gltf: IGLTF;
             /** The Babylon scene when loading the asset. */
@@ -1098,7 +1098,7 @@ declare module BABYLON {
                 * @param name The name of the loader extension.
                 * @param factory The factory function that creates the loader extension.
                 */
-            static RegisterExtension(name: string, factory: (loader: GLTF2Loader) => IGLTFLoaderExtension): void;
+            static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void;
             /**
                 * Unregisters a loader extension.
                 * @param name The name of the loader extenion.
@@ -1557,7 +1557,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1576,7 +1576,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1593,7 +1593,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1612,7 +1612,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1629,7 +1629,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1646,7 +1646,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1663,7 +1663,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1702,7 +1702,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
                 */
             onMaterialLODsLoadedObservable: BABYLON.Observable<number>;
             /** @hidden */
-            constructor(loader: GLTF2Loader);
+            constructor(loader: GLTFLoader);
             /** @hidden */
             dispose(): void;
             /** @hidden */
@@ -1720,7 +1720,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
     export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
@@ -1730,7 +1730,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
     export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 290 - 290
dist/preview release/loaders/babylonjs.loaders.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js.map


+ 40 - 40
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -348,7 +348,7 @@ declare module 'babylonjs-loaders/src/glTF/glTFFileLoader' {
 
 declare module 'babylonjs-loaders/src/glTF/1.0' {
     export * from "babylonjs-loaders/src/glTF/1.0/glTFBinaryExtension";
-    export * from "babylonjs-loaders/src/glTF/1.0/glTF1Loader";
+    export * from "babylonjs-loaders/src/glTF/1.0/glTFLoader";
     export * from "babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension";
     export * from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
     export * from "babylonjs-loaders/src/glTF/1.0/glTFLoaderUtils";
@@ -356,7 +356,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0' {
 }
 
 declare module 'babylonjs-loaders/src/glTF/2.0' {
-    export * from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    export * from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     export * from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
     export * from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     export * from "babylonjs-loaders/src/glTF/2.0/Extensions";
@@ -544,7 +544,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFBinaryExtension' {
     }
 }
 
-declare module 'babylonjs-loaders/src/glTF/1.0/glTF1Loader' {
+declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoader' {
     import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
     import { Nullable, Skeleton, Material, AbstractMesh, Texture, Scene, SceneLoaderProgressEvent, IParticleSystem, AnimationGroup } from "babylonjs";
     import { IGLTFLoader, GLTFLoaderState, IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
@@ -565,7 +565,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTF1Loader' {
      * glTF V1 Loader
      * @hidden
      */
-    export class GLTF1Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
@@ -1132,7 +1132,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFMaterialsCommonExtension' {
     }
 }
 
-declare module 'babylonjs-loaders/src/glTF/2.0/glTF2Loader' {
+declare module 'babylonjs-loaders/src/glTF/2.0/glTFLoader' {
     import { Scene, Nullable, Mesh, Material, SceneLoaderProgressEvent, AbstractMesh, IParticleSystem, Skeleton, AnimationGroup, Camera, BaseTexture } from "babylonjs";
     import { IProperty } from "babylonjs-gltf2interface";
     import { IGLTF, INode, IScene, ICamera, IAnimation, IBufferView, IMaterial, ITextureInfo, IImage, IArrayItem } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
@@ -1159,7 +1159,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/glTF2Loader' {
     /**
         * The glTF 2.0 loader
         */
-    export class GLTF2Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
             /** The glTF object parsed from the JSON. */
             gltf: IGLTF;
             /** The Babylon scene when loading the asset. */
@@ -1171,7 +1171,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/glTF2Loader' {
                 * @param name The name of the loader extension.
                 * @param factory The factory function that creates the loader extension.
                 */
-            static RegisterExtension(name: string, factory: (loader: GLTF2Loader) => IGLTFLoaderExtension): void;
+            static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void;
             /**
                 * Unregisters a loader extension.
                 * @param name The name of the loader extenion.
@@ -1645,7 +1645,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/EXT_lights_image_based
     import { Nullable } from "babylonjs";
     import { IScene } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
       */
@@ -1655,7 +1655,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/EXT_lights_image_based
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1669,7 +1669,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compres
     import { Geometry, Mesh, Nullable } from "babylonjs";
     import { IMeshPrimitive } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
       */
@@ -1679,7 +1679,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compres
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1691,7 +1691,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_lights_punctual' {
     import { Mesh, Nullable } from "babylonjs";
     import { INode } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
       */
@@ -1701,7 +1701,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_lights_punctual' {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1715,7 +1715,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecu
     import { Material, Nullable } from "babylonjs";
     import { IMaterial } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
       */
@@ -1725,7 +1725,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecu
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1737,7 +1737,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_materials_unlit' {
     import { Material, Nullable } from "babylonjs";
     import { IMaterial } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
       */
@@ -1747,7 +1747,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_materials_unlit' {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1759,7 +1759,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_texture_transform'
     import { BaseTexture, Nullable } from "babylonjs";
     import { ITextureInfo } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
       */
@@ -1769,7 +1769,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/KHR_texture_transform'
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1781,7 +1781,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter' {
     import { Nullable, Mesh, AnimationGroup } from "babylonjs";
     import { IScene, INode, IAnimation } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
       * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
       */
@@ -1791,7 +1791,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter' {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -1809,7 +1809,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_lod' {
     import { Observable, Nullable, Mesh, Material } from "babylonjs";
     import { INode, IMaterial } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /**
         * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
         */
@@ -1835,7 +1835,7 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_lod' {
                 */
             onMaterialLODsLoadedObservable: Observable<number>;
             /** @hidden */
-            constructor(loader: GLTF2Loader);
+            constructor(loader: GLTFLoader);
             /** @hidden */
             dispose(): void;
             /** @hidden */
@@ -1853,12 +1853,12 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_minecraftMesh' {
     import { Material, Nullable } from "babylonjs";
     import { IMaterial } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /** @hidden */
     export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
@@ -1868,12 +1868,12 @@ declare module 'babylonjs-loaders/src/glTF/2.0/Extensions/MSFT_sRGBFactors' {
     import { Material, Nullable } from "babylonjs";
     import { IMaterial } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderInterfaces";
     import { IGLTFLoaderExtension } from "babylonjs-loaders/src/glTF/2.0/glTFLoaderExtension";
-    import { GLTF2Loader } from "babylonjs-loaders/src/glTF/2.0/glTF2Loader";
+    import { GLTFLoader } from "babylonjs-loaders/src/glTF/2.0/glTFLoader";
     /** @hidden */
     export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
@@ -2393,7 +2393,7 @@ declare module BABYLON.GLTF1 {
      * glTF V1 Loader
      * @hidden
      */
-    export class GLTF1Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
@@ -2968,7 +2968,7 @@ declare module BABYLON {
     /**
         * The glTF 2.0 loader
         */
-    export class GLTF2Loader implements IGLTFLoader {
+    export class GLTFLoader implements IGLTFLoader {
             /** The glTF object parsed from the JSON. */
             gltf: IGLTF;
             /** The Babylon scene when loading the asset. */
@@ -2980,7 +2980,7 @@ declare module BABYLON {
                 * @param name The name of the loader extension.
                 * @param factory The factory function that creates the loader extension.
                 */
-            static RegisterExtension(name: string, factory: (loader: GLTF2Loader) => IGLTFLoaderExtension): void;
+            static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void;
             /**
                 * Unregisters a loader extension.
                 * @param name The name of the loader extenion.
@@ -3439,7 +3439,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3458,7 +3458,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3475,7 +3475,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3494,7 +3494,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3511,7 +3511,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3528,7 +3528,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3545,7 +3545,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** Defines whether this extension is enabled. */
         enabled: boolean;
         /** @hidden */
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         /** @hidden */
         dispose(): void;
         /** @hidden */
@@ -3584,7 +3584,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
                 */
             onMaterialLODsLoadedObservable: BABYLON.Observable<number>;
             /** @hidden */
-            constructor(loader: GLTF2Loader);
+            constructor(loader: GLTFLoader);
             /** @hidden */
             dispose(): void;
             /** @hidden */
@@ -3602,7 +3602,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
     export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
@@ -3612,7 +3612,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
     export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         enabled: boolean;
-        constructor(loader: GLTF2Loader);
+        constructor(loader: GLTFLoader);
         dispose(): void;
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }

+ 3 - 3
inspector/src/tabs/GLTFTab.ts

@@ -1,5 +1,5 @@
 import { Mesh, Nullable, NullEngine, PBRMaterial, Scene, SceneLoader, StandardMaterial, Texture, TransformNode } from "babylonjs";
-import { GLTF2Loader, GLTFFileLoader } from "babylonjs-loaders";
+import { GLTF2, GLTFFileLoader } from "babylonjs-loaders";
 import { GLTF2Export } from "babylonjs-serializers";
 import { DetailPanel } from "../details/DetailPanel";
 import { Property } from "../details/Property";
@@ -24,7 +24,7 @@ export class GLTFTab extends Tab {
     private _split: any;
 
     public static get IsSupported(): boolean {
-        return !!(SceneLoader && GLTFFileLoader && GLTF2Loader) || !!GLTF2Export;
+        return !!(SceneLoader && GLTFFileLoader && GLTF2) || !!GLTF2Export;
     }
 
     /** @hidden */
@@ -55,7 +55,7 @@ export class GLTFTab extends Tab {
             this._closeDetailsPanel();
         });
 
-        if (SceneLoader && GLTFFileLoader && GLTF2Loader) {
+        if (SceneLoader && GLTFFileLoader && GLTF2) {
             this._addImport();
         }
 

+ 4 - 4
loaders/legacy/legacy-glTF1FileLoader.ts

@@ -1,5 +1,5 @@
 import * as FileLoader from "../src/glTF/glTFFileLoader";
-import * as LoadersV1 from "../src/glTF/1.0";
+import * as GLTF1 from "../src/glTF/1.0";
 
 /**
  * This is the entry point for the UMD module.
@@ -12,10 +12,10 @@ if (typeof globalObject !== "undefined") {
         (<any>globalObject).BABYLON[key] = (<any>FileLoader)[key];
     }
     (<any>globalObject).BABYLON.GLTF1 = (<any>globalObject).BABYLON.GLTF1 || { };
-    for (var key in LoadersV1) {
-        (<any>globalObject).BABYLON.GLTF1[key] = (<any>LoadersV1)[key];
+    for (var key in GLTF1) {
+        (<any>globalObject).BABYLON.GLTF1[key] = (<any>GLTF1)[key];
     }
 }
 
 export * from "../src/glTF/glTFFileLoader";
-export * from "../src/glTF/1.0";
+export { GLTF1 };

+ 4 - 4
loaders/legacy/legacy-glTF2FileLoader.ts

@@ -1,5 +1,5 @@
 import * as FileLoader from "../src/glTF/glTFFileLoader";
-import * as LoadersV2 from "../src/glTF/2.0";
+import * as GLTF2 from "../src/glTF/2.0";
 
 /**
  * This is the entry point for the UMD module.
@@ -11,10 +11,10 @@ if (typeof globalObject !== "undefined") {
     for (var key in FileLoader) {
         (<any>globalObject).BABYLON[key] = (<any>FileLoader)[key];
     }
-    for (var key in LoadersV2) {
-        (<any>globalObject).BABYLON[key] = (<any>LoadersV2)[key];
+    for (var key in GLTF2) {
+        (<any>globalObject).BABYLON[key] = (<any>GLTF2)[key];
     }
 }
 
 export * from "../src/glTF/glTFFileLoader";
-export * from "../src/glTF/2.0";
+export { GLTF2 };

+ 10 - 8
loaders/legacy/legacy-glTFFileLoader.ts

@@ -1,6 +1,6 @@
 import * as FileLoader from "../src/glTF/glTFFileLoader";
-import * as LoadersV1 from "../src/glTF/1.0";
-import * as LoadersV2 from "../src/glTF/2.0";
+import * as GLTF1 from "../src/glTF/1.0";
+import * as GLTF2 from "../src/glTF/2.0";
 
 /**
  * This is the entry point for the UMD module.
@@ -13,14 +13,16 @@ if (typeof globalObject !== "undefined") {
         (<any>globalObject).BABYLON[key] = (<any>FileLoader)[key];
     }
     (<any>globalObject).BABYLON.GLTF1 = (<any>globalObject).BABYLON.GLTF1 || { };
-    for (var key in LoadersV1) {
-        (<any>globalObject).BABYLON.GLTF1[key] = (<any>LoadersV1)[key];
+    for (var key in GLTF1) {
+        (<any>globalObject).BABYLON.GLTF1[key] = (<any>GLTF1)[key];
     }
-    for (var key in LoadersV2) {
-        (<any>globalObject).BABYLON[key] = (<any>LoadersV2)[key];
+    for (var key in GLTF2) {
+        (<any>globalObject).BABYLON[key] = (<any>GLTF2)[key];
     }
 }
 
 export * from "../src/glTF/glTFFileLoader";
-export * from "../src/glTF/1.0";
-export * from "../src/glTF/2.0";
+export {
+    GLTF1,
+    GLTF2
+};

+ 2 - 2
loaders/src/glTF/1.0/glTFBinaryExtension.ts

@@ -3,7 +3,7 @@ import { GLTFUtils } from "./glTFLoaderUtils";
 import { Scene } from "babylonjs";
 import { IGLTFLoaderData } from "../glTFFileLoader";
 import { IGLTFRuntime, IGLTFTexture, IGLTFImage, IGLTFBufferView, EComponentType, IGLTFShader } from "./glTFLoaderInterfaces";
-import { GLTF1Loader, GLTFLoaderBase } from "./glTF1Loader";
+import { GLTFLoader, GLTFLoaderBase } from "./glTFLoader";
 
 const BinaryExtensionBufferName = "binary_glTF";
 
@@ -83,4 +83,4 @@ export class GLTFBinaryExtension extends GLTFLoaderExtension {
     }
 }
 
-GLTF1Loader.RegisterExtension(new GLTFBinaryExtension());
+GLTFLoader.RegisterExtension(new GLTFBinaryExtension());

+ 4 - 4
loaders/src/glTF/1.0/glTF1Loader.ts

@@ -1557,16 +1557,16 @@ export class GLTFLoaderBase {
 * glTF V1 Loader
 * @hidden
 */
-export class GLTF1Loader implements IGLTFLoader {
+export class GLTFLoader implements IGLTFLoader {
     public static Extensions: { [name: string]: GLTFLoaderExtension } = {};
 
     public static RegisterExtension(extension: GLTFLoaderExtension): void {
-        if (GLTF1Loader.Extensions[extension.name]) {
+        if (GLTFLoader.Extensions[extension.name]) {
             Tools.Error("Tool with the same name \"" + extension.name + "\" already exists");
             return;
         }
 
-        GLTF1Loader.Extensions[extension.name] = extension;
+        GLTFLoader.Extensions[extension.name] = extension;
     }
 
     public state: Nullable<GLTFLoaderState> = null;
@@ -1810,4 +1810,4 @@ export class GLTF1Loader implements IGLTFLoader {
     }
 }
 
-GLTFFileLoader._CreateGLTF1Loader = () => new GLTF1Loader();
+GLTFFileLoader._CreateGLTF1Loader = () => new GLTFLoader();

+ 3 - 3
loaders/src/glTF/1.0/glTFLoaderExtension.ts

@@ -1,7 +1,7 @@
 import { Scene, Texture, Material, Nullable } from "babylonjs";
 import { IGLTFLoaderData } from "../glTFFileLoader";
 import { IGLTFRuntime } from "./glTFLoaderInterfaces";
-import { GLTF1Loader, GLTFLoaderBase } from "./glTF1Loader";
+import { GLTFLoader, GLTFLoaderBase } from "./glTFLoader";
 
 /** @hidden */
 export abstract class GLTFLoaderExtension {
@@ -148,8 +148,8 @@ export abstract class GLTFLoaderExtension {
     }
 
     private static ApplyExtensions(func: (loaderExtension: GLTFLoaderExtension) => boolean, defaultFunc: () => void): void {
-        for (var extensionName in GLTF1Loader.Extensions) {
-            var loaderExtension = GLTF1Loader.Extensions[extensionName];
+        for (var extensionName in GLTFLoader.Extensions) {
+            var loaderExtension = GLTFLoader.Extensions[extensionName];
             if (func(loaderExtension)) {
                 return;
             }

+ 2 - 2
loaders/src/glTF/1.0/glTFMaterialsCommonExtension.ts

@@ -4,7 +4,7 @@ import { IGLTFRuntime, IGLTFMaterial } from "./glTFLoaderInterfaces";
 
 import { HemisphericLight, Vector3, Color3, PointLight, DirectionalLight, SpotLight, Tools, Material, StandardMaterial } from "babylonjs";
 
-import { GLTF1Loader } from "./glTF1Loader";
+import { GLTFLoader } from "./glTFLoader";
 
 interface IGLTFMaterialsCommonExtensionValues {
     ambient?: number[] | string;
@@ -181,4 +181,4 @@ export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
     }
 }
 
-GLTF1Loader.RegisterExtension(new GLTFMaterialsCommonExtension());
+GLTFLoader.RegisterExtension(new GLTFMaterialsCommonExtension());

+ 1 - 1
loaders/src/glTF/1.0/index.ts

@@ -1,5 +1,5 @@
 export * from "./glTFBinaryExtension";
-export * from "./glTF1Loader";
+export * from "./glTFLoader";
 export * from "./glTFLoaderExtension";
 export * from "./glTFLoaderInterfaces";
 export * from "./glTFLoaderUtils";

+ 5 - 5
loaders/src/glTF/2.0/Extensions/EXT_lights_image_based.ts

@@ -2,7 +2,7 @@ import { BaseTexture, Nullable, RawCubeTexture, Quaternion, Matrix, SphericalHar
 import { IChildRootProperty } from "babylonjs-gltf2interface";
 import { IScene } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader, ArrayItem } from "../glTF2Loader";
+import { GLTFLoader, ArrayItem } from "../glTFLoader";
 
 const NAME = "EXT_lights_image_based";
 
@@ -35,11 +35,11 @@ export class EXT_lights_image_based implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
     private _lights?: ILight[];
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -60,7 +60,7 @@ export class EXT_lights_image_based implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtensionAsync<ILightReference>(context, scene, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<ILightReference>(context, scene, this.name, (extensionContext, extension) => {
             const promises = new Array<Promise<any>>();
 
             promises.push(this._loader.loadSceneAsync(context, scene));
@@ -141,4 +141,4 @@ export class EXT_lights_image_based implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new EXT_lights_image_based(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new EXT_lights_image_based(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts

@@ -2,7 +2,7 @@ import { Geometry, DracoCompression, Mesh, Nullable, VertexBuffer } from "babylo
 import { MeshPrimitiveMode } from "babylonjs-gltf2interface";
 import { IBufferView, IMeshPrimitive } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader, ArrayItem } from "../glTF2Loader";
+import { GLTFLoader, ArrayItem } from "../glTFLoader";
 
 const NAME = "KHR_draco_mesh_compression";
 
@@ -25,11 +25,11 @@ export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = DracoCompression.DecoderAvailable;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
     private _dracoCompression?: DracoCompression;
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -45,7 +45,7 @@ export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
 
     /** @hidden */
     public _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
-        return GLTF2Loader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, (extensionContext, extension) => {
             if (primitive.mode != undefined) {
                 if (primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP &&
                     primitive.mode !== MeshPrimitiveMode.TRIANGLES) {
@@ -104,4 +104,4 @@ export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new KHR_draco_mesh_compression(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new KHR_draco_mesh_compression(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts

@@ -2,7 +2,7 @@ import { Mesh, Nullable, Light, DirectionalLight, Vector3, PointLight, SpotLight
 import { IChildRootProperty } from "babylonjs-gltf2interface";
 import { INode } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader, ArrayItem } from "../glTF2Loader";
+import { GLTFLoader, ArrayItem } from "../glTFLoader";
 
 const NAME = "KHR_lights_punctual";
 
@@ -41,11 +41,11 @@ export class KHR_lights implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
     private _lights?: ILight[];
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -66,7 +66,7 @@ export class KHR_lights implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
-        return GLTF2Loader.LoadExtensionAsync<ILightReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<ILightReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
             return this._loader.loadNodeAsync(context, node, (babylonMesh) => {
                 let babylonLight: Light;
 
@@ -106,4 +106,4 @@ export class KHR_lights implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new KHR_lights(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new KHR_lights(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts

@@ -1,7 +1,7 @@
 import { Material, Nullable, PBRMaterial, Color3 } from "babylonjs";
 import { ITextureInfo, IMaterial } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader } from "../glTF2Loader";
+import { GLTFLoader } from "../glTFLoader";
 
 const NAME = "KHR_materials_pbrSpecularGlossiness";
 
@@ -23,10 +23,10 @@ export class KHR_materials_pbrSpecularGlossiness implements IGLTFLoaderExtension
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -37,7 +37,7 @@ export class KHR_materials_pbrSpecularGlossiness implements IGLTFLoaderExtension
 
     /** @hidden */
     public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, this.name, (extensionContext, extension) => {
             const promises = new Array<Promise<any>>();
             promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
             promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial));
@@ -88,4 +88,4 @@ export class KHR_materials_pbrSpecularGlossiness implements IGLTFLoaderExtension
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts

@@ -1,7 +1,7 @@
 import { Material, Nullable, PBRMaterial, Color3 } from "babylonjs";
 import { IMaterial } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader } from "../glTF2Loader";
+import { GLTFLoader } from "../glTFLoader";
 
 const NAME = "KHR_materials_unlit";
 
@@ -15,10 +15,10 @@ export class KHR_materials_unlit implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -29,7 +29,7 @@ export class KHR_materials_unlit implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtensionAsync(context, material, this.name, () => {
+        return GLTFLoader.LoadExtensionAsync(context, material, this.name, () => {
             return this._loadUnlitPropertiesAsync(context, material, babylonMaterial);
         });
     }
@@ -72,4 +72,4 @@ export class KHR_materials_unlit implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new KHR_materials_unlit(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_unlit(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_texture_transform.ts

@@ -1,7 +1,7 @@
 import { BaseTexture, Nullable, Texture } from "babylonjs";
 import { ITextureInfo } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader } from "../glTF2Loader";
+import { GLTFLoader } from "../glTFLoader";
 
 const NAME = "KHR_texture_transform";
 
@@ -22,10 +22,10 @@ export class KHR_texture_transform implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -36,7 +36,7 @@ export class KHR_texture_transform implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {
-        return GLTF2Loader.LoadExtensionAsync<IKHRTextureTransform, BaseTexture>(context, textureInfo, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IKHRTextureTransform, BaseTexture>(context, textureInfo, this.name, (extensionContext, extension) => {
             return this._loader.loadTextureInfoAsync(context, textureInfo, (babylonTexture) => {
                 if (!(babylonTexture instanceof Texture)) {
                     throw new Error(`${extensionContext}: Texture type not supported`);
@@ -70,4 +70,4 @@ export class KHR_texture_transform implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new KHR_texture_transform(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new KHR_texture_transform(loader));

+ 7 - 7
loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter.ts

@@ -1,7 +1,7 @@
 import { WeightedSound, Sound, Nullable, Mesh, Vector3, Tools, AnimationGroup, AnimationEvent } from "babylonjs";
 import { IArrayItem, IScene, INode, IAnimation } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader, ArrayItem } from "../glTF2Loader";
+import { GLTFLoader, ArrayItem } from "../glTFLoader";
 
 const NAME = "MSFT_audio_emitter";
 
@@ -90,12 +90,12 @@ export class MSFT_audio_emitter implements IGLTFLoaderExtension {
     /** Defines whether this extension is enabled. */
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
     private _clips: Array<ILoaderClip>;
     private _emitters: Array<ILoaderEmitter>;
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -122,7 +122,7 @@ export class MSFT_audio_emitter implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtensionAsync<IEmittersReference>(context, scene, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IEmittersReference>(context, scene, this.name, (extensionContext, extension) => {
             const promises = new Array<Promise<any>>();
 
             promises.push(this._loader.loadSceneAsync(context, scene));
@@ -143,7 +143,7 @@ export class MSFT_audio_emitter implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
-        return GLTF2Loader.LoadExtensionAsync<IEmittersReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IEmittersReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
             const promises = new Array<Promise<any>>();
 
             return this._loader.loadNodeAsync(extensionContext, node, (babylonMesh) => {
@@ -174,7 +174,7 @@ export class MSFT_audio_emitter implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>> {
-        return GLTF2Loader.LoadExtensionAsync<ILoaderAnimationEvents, AnimationGroup>(context, animation, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<ILoaderAnimationEvents, AnimationGroup>(context, animation, this.name, (extensionContext, extension) => {
             return this._loader.loadAnimationAsync(context, animation).then((babylonAnimationGroup) => {
                 const promises = new Array<Promise<any>>();
 
@@ -300,4 +300,4 @@ export class MSFT_audio_emitter implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new MSFT_audio_emitter(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_audio_emitter(loader));

+ 6 - 6
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -1,7 +1,7 @@
 import { Observable, Nullable, Deferred, Mesh, Material } from "babylonjs";
 import { INode, IMaterial } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader, ArrayItem } from "../glTF2Loader";
+import { GLTFLoader, ArrayItem } from "../glTFLoader";
 
 const NAME = "MSFT_lod";
 
@@ -38,7 +38,7 @@ export class MSFT_lod implements IGLTFLoaderExtension {
      */
     public onMaterialLODsLoadedObservable = new Observable<number>();
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
     private _nodeIndexLOD: Nullable<number> = null;
     private _nodeSignalLODs = new Array<Deferred<void>>();
@@ -49,7 +49,7 @@ export class MSFT_lod implements IGLTFLoaderExtension {
     private _materialPromiseLODs = new Array<Array<Promise<any>>>();
 
     /** @hidden */
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -114,7 +114,7 @@ export class MSFT_lod implements IGLTFLoaderExtension {
 
     /** @hidden */
     public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
-        return GLTF2Loader.LoadExtensionAsync<IMSFTLOD, Mesh>(context, node, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IMSFTLOD, Mesh>(context, node, this.name, (extensionContext, extension) => {
             let firstPromise: Promise<Mesh>;
 
             const nodeLODs = this._getLODs(extensionContext, node, this._loader.gltf.nodes, extension.ids);
@@ -165,7 +165,7 @@ export class MSFT_lod implements IGLTFLoaderExtension {
             return null;
         }
 
-        return GLTF2Loader.LoadExtensionAsync<IMSFTLOD, Material>(context, material, this.name, (extensionContext, extension) => {
+        return GLTFLoader.LoadExtensionAsync<IMSFTLOD, Material>(context, material, this.name, (extensionContext, extension) => {
             let firstPromise: Promise<Material>;
 
             const materialLODs = this._getLODs(extensionContext, material, this._loader.gltf.materials, extension.ids);
@@ -276,4 +276,4 @@ export class MSFT_lod implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new MSFT_lod(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_lod(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/MSFT_minecraftMesh.ts

@@ -1,7 +1,7 @@
 import { Material, Nullable, PBRMaterial } from "babylonjs";
 import { IMaterial } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader } from "../glTF2Loader";
+import { GLTFLoader } from "../glTFLoader";
 
 const NAME = "MSFT_minecraftMesh";
 
@@ -10,9 +10,9 @@ export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     public readonly name = NAME;
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -21,7 +21,7 @@ export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     }
 
     public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
+        return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
             if (extra) {
                 if (!(babylonMaterial instanceof PBRMaterial)) {
                     throw new Error(`${extraContext}: Material type not supported`);
@@ -45,4 +45,4 @@ export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new MSFT_minecraftMesh(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_minecraftMesh(loader));

+ 5 - 5
loaders/src/glTF/2.0/Extensions/MSFT_sRGBFactors.ts

@@ -1,7 +1,7 @@
 import { Material, Nullable, PBRMaterial } from "babylonjs";
 import { IMaterial } from "../glTFLoaderInterfaces";
 import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
-import { GLTF2Loader } from "../glTF2Loader";
+import { GLTFLoader } from "../glTFLoader";
 
 const NAME = "MSFT_sRGBFactors";
 
@@ -10,9 +10,9 @@ export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     public readonly name = NAME;
     public enabled = true;
 
-    private _loader: GLTF2Loader;
+    private _loader: GLTFLoader;
 
-    constructor(loader: GLTF2Loader) {
+    constructor(loader: GLTFLoader) {
         this._loader = loader;
     }
 
@@ -21,7 +21,7 @@ export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     }
 
     public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
-        return GLTF2Loader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
+        return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
             if (extra) {
                 if (!(babylonMaterial instanceof PBRMaterial)) {
                     throw new Error(`${extraContext}: Material type not supported`);
@@ -45,4 +45,4 @@ export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     }
 }
 
-GLTF2Loader.RegisterExtension(NAME, (loader) => new MSFT_sRGBFactors(loader));
+GLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_sRGBFactors(loader));

+ 29 - 29
loaders/src/glTF/2.0/glTF2Loader.ts

@@ -49,7 +49,7 @@ export class ArrayItem {
 /**
  * The glTF 2.0 loader
  */
-export class GLTF2Loader implements IGLTFLoader {
+export class GLTFLoader implements IGLTFLoader {
     /** The glTF object parsed from the JSON. */
     public gltf: IGLTF;
 
@@ -74,22 +74,22 @@ export class GLTF2Loader implements IGLTFLoader {
     private static readonly _DefaultSampler: ISampler = { index: -1 };
 
     private static _ExtensionNames = new Array<string>();
-    private static _ExtensionFactories: { [name: string]: (loader: GLTF2Loader) => IGLTFLoaderExtension } = {};
+    private static _ExtensionFactories: { [name: string]: (loader: GLTFLoader) => IGLTFLoaderExtension } = {};
 
     /**
      * Registers a loader extension.
      * @param name The name of the loader extension.
      * @param factory The factory function that creates the loader extension.
      */
-    public static RegisterExtension(name: string, factory: (loader: GLTF2Loader) => IGLTFLoaderExtension): void {
-        if (GLTF2Loader.UnregisterExtension(name)) {
+    public static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void {
+        if (GLTFLoader.UnregisterExtension(name)) {
             Tools.Warn(`Extension with the name '${name}' already exists`);
         }
 
-        GLTF2Loader._ExtensionFactories[name] = factory;
+        GLTFLoader._ExtensionFactories[name] = factory;
 
         // Keep the order of registration so that extensions registered first are called first.
-        GLTF2Loader._ExtensionNames.push(name);
+        GLTFLoader._ExtensionNames.push(name);
     }
 
     /**
@@ -98,15 +98,15 @@ export class GLTF2Loader implements IGLTFLoader {
      * @returns A boolean indicating whether the extension has been unregistered
      */
     public static UnregisterExtension(name: string): boolean {
-        if (!GLTF2Loader._ExtensionFactories[name]) {
+        if (!GLTFLoader._ExtensionFactories[name]) {
             return false;
         }
 
-        delete GLTF2Loader._ExtensionFactories[name];
+        delete GLTFLoader._ExtensionFactories[name];
 
-        const index = GLTF2Loader._ExtensionNames.indexOf(name);
+        const index = GLTFLoader._ExtensionNames.indexOf(name);
         if (index !== -1) {
-            GLTF2Loader._ExtensionNames.splice(index, 1);
+            GLTFLoader._ExtensionNames.splice(index, 1);
         }
 
         return true;
@@ -346,8 +346,8 @@ export class GLTF2Loader implements IGLTFLoader {
     }
 
     private _loadExtensions(): void {
-        for (const name of GLTF2Loader._ExtensionNames) {
-            const extension = GLTF2Loader._ExtensionFactories[name](this);
+        for (const name of GLTFLoader._ExtensionNames) {
+            const extension = GLTFLoader._ExtensionFactories[name](this);
             this._extensions[name] = extension;
 
             this._parent.onExtensionLoadedObservable.notifyObservers(extension);
@@ -385,7 +385,7 @@ export class GLTF2Loader implements IGLTFLoader {
                 if (!this.babylonScene.useRightHandedSystem) {
                     rootNode.rotation = [0, 1, 0, 0];
                     rootNode.scale = [1, 1, -1];
-                    GLTF2Loader._LoadTransform(rootNode, this._rootBabylonMesh);
+                    GLTFLoader._LoadTransform(rootNode, this._rootBabylonMesh);
                 }
                 break;
             }
@@ -551,7 +551,7 @@ export class GLTF2Loader implements IGLTFLoader {
         node._babylonMesh = babylonMesh;
 
         babylonMesh.setEnabled(false);
-        GLTF2Loader._LoadTransform(node, babylonMesh);
+        GLTFLoader._LoadTransform(node, babylonMesh);
 
         if (node.mesh != undefined) {
             const mesh = ArrayItem.Get(`${context}/mesh`, this.gltf.meshes, node.mesh);
@@ -642,7 +642,7 @@ export class GLTF2Loader implements IGLTFLoader {
             });
         }));
 
-        const babylonDrawMode = GLTF2Loader._GetDrawMode(context, primitive.mode);
+        const babylonDrawMode = GLTFLoader._GetDrawMode(context, primitive.mode);
         if (primitive.material == undefined) {
             let babylonMaterial = this._defaultBabylonMaterialData[babylonDrawMode];
             if (!babylonMaterial) {
@@ -1284,7 +1284,7 @@ export class GLTF2Loader implements IGLTFLoader {
 
         const bufferView = ArrayItem.Get(`${context}/bufferView`, this.gltf.bufferViews, accessor.bufferView);
         accessor._data = this.loadBufferViewAsync(`#/bufferViews/${bufferView.index}`, bufferView).then((data) => {
-            return GLTF2Loader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, accessor.count);
+            return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, accessor.count);
         });
 
         return accessor._data as Promise<IndicesArray>;
@@ -1301,7 +1301,7 @@ export class GLTF2Loader implements IGLTFLoader {
             return accessor._data as Promise<Float32Array>;
         }
 
-        const numComponents = GLTF2Loader._GetNumComponents(context, accessor.type);
+        const numComponents = GLTFLoader._GetNumComponents(context, accessor.type);
         const length = numComponents * accessor.count;
 
         if (accessor.bufferView == undefined) {
@@ -1310,7 +1310,7 @@ export class GLTF2Loader implements IGLTFLoader {
         else {
             const bufferView = ArrayItem.Get(`${context}/bufferView`, this.gltf.bufferViews, accessor.bufferView);
             accessor._data = this.loadBufferViewAsync(`#/bufferViews/${bufferView.index}`, bufferView).then((data) => {
-                return GLTF2Loader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, length);
+                return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, length);
             });
         }
 
@@ -1323,8 +1323,8 @@ export class GLTF2Loader implements IGLTFLoader {
                     this.loadBufferViewAsync(`#/bufferViews/${indicesBufferView.index}`, indicesBufferView),
                     this.loadBufferViewAsync(`#/bufferViews/${valuesBufferView.index}`, valuesBufferView)
                 ]).then(([indicesData, valuesData]) => {
-                    const indices = GLTF2Loader._GetTypedArray(`${context}/sparse/indices`, sparse.indices.componentType, indicesData, sparse.indices.byteOffset, sparse.count) as IndicesArray;
-                    const values = GLTF2Loader._GetTypedArray(`${context}/sparse/values`, accessor.componentType, valuesData, sparse.values.byteOffset, numComponents * sparse.count) as Float32Array;
+                    const indices = GLTFLoader._GetTypedArray(`${context}/sparse/indices`, sparse.indices.componentType, indicesData, sparse.indices.byteOffset, sparse.count) as IndicesArray;
+                    const values = GLTFLoader._GetTypedArray(`${context}/sparse/values`, accessor.componentType, valuesData, sparse.values.byteOffset, numComponents * sparse.count) as Float32Array;
 
                     let valuesIndex = 0;
                     for (let indicesIndex = 0; indicesIndex < indices.length; indicesIndex++) {
@@ -1374,7 +1374,7 @@ export class GLTF2Loader implements IGLTFLoader {
         else {
             const bufferView = ArrayItem.Get(`${context}/bufferView`, this.gltf.bufferViews, accessor.bufferView);
             accessor._babylonVertexBuffer = this._loadVertexBufferViewAsync(bufferView, kind).then((babylonBuffer) => {
-                const size = GLTF2Loader._GetNumComponents(context, accessor.type);
+                const size = GLTFLoader._GetNumComponents(context, accessor.type);
                 return new VertexBuffer(this.babylonScene.getEngine(), babylonBuffer, kind, false, false, bufferView.byteStride,
                     false, accessor.byteOffset, size, accessor.componentType, accessor.normalized, true);
             });
@@ -1644,7 +1644,7 @@ export class GLTF2Loader implements IGLTFLoader {
 
         this.logOpen(`${context} ${texture.name || ""}`);
 
-        const sampler = (texture.sampler == undefined ? GLTF2Loader._DefaultSampler : ArrayItem.Get(`${context}/sampler`, this.gltf.samplers, texture.sampler));
+        const sampler = (texture.sampler == undefined ? GLTFLoader._DefaultSampler : ArrayItem.Get(`${context}/sampler`, this.gltf.samplers, texture.sampler));
         const samplerData = this._loadSampler(`#/samplers/${sampler.index}`, sampler);
 
         const deferred = new Deferred<void>();
@@ -1684,9 +1684,9 @@ export class GLTF2Loader implements IGLTFLoader {
         if (!sampler._data) {
             sampler._data = {
                 noMipMaps: (sampler.minFilter === TextureMinFilter.NEAREST || sampler.minFilter === TextureMinFilter.LINEAR),
-                samplingMode: GLTF2Loader._GetTextureSamplingMode(context, sampler),
-                wrapU: GLTF2Loader._GetTextureWrapMode(`${context}/wrapS`, sampler.wrapS),
-                wrapV: GLTF2Loader._GetTextureWrapMode(`${context}/wrapT`, sampler.wrapT)
+                samplingMode: GLTFLoader._GetTextureSamplingMode(context, sampler),
+                wrapU: GLTFLoader._GetTextureWrapMode(`${context}/wrapS`, sampler.wrapS),
+                wrapV: GLTFLoader._GetTextureWrapMode(`${context}/wrapT`, sampler.wrapT)
             };
         }
 
@@ -1729,7 +1729,7 @@ export class GLTF2Loader implements IGLTFLoader {
             return extensionPromise;
         }
 
-        if (!GLTF2Loader._ValidateUri(uri)) {
+        if (!GLTFLoader._ValidateUri(uri)) {
             throw new Error(`${context}: '${uri}' is invalid`);
         }
 
@@ -1956,7 +1956,7 @@ export class GLTF2Loader implements IGLTFLoader {
     }
 
     private _forEachExtensions(action: (extension: IGLTFLoaderExtension) => void): void {
-        for (const name of GLTF2Loader._ExtensionNames) {
+        for (const name of GLTFLoader._ExtensionNames) {
             const extension = this._extensions[name];
             if (extension.enabled) {
                 action(extension);
@@ -1965,7 +1965,7 @@ export class GLTF2Loader implements IGLTFLoader {
     }
 
     private _applyExtensions<T>(property: IProperty, actionAsync: (extension: IGLTFLoaderExtension) => Nullable<T> | undefined): Nullable<T> {
-        for (const name of GLTF2Loader._ExtensionNames) {
+        for (const name of GLTFLoader._ExtensionNames) {
             const extension = this._extensions[name];
             if (extension.enabled) {
                 const loaderProperty = property as ILoaderProperty;
@@ -2124,4 +2124,4 @@ export class GLTF2Loader implements IGLTFLoader {
     }
 }
 
-GLTFFileLoader._CreateGLTF2Loader = (parent) => new GLTF2Loader(parent);
+GLTFFileLoader._CreateGLTF2Loader = (parent) => new GLTFLoader(parent);

+ 1 - 1
loaders/src/glTF/2.0/index.ts

@@ -1,4 +1,4 @@
-export * from "./glTF2Loader";
+export * from "./glTFLoader";
 export * from "./glTFLoaderExtension";
 export * from "./glTFLoaderInterfaces";
 export * from "./Extensions";