sebastien 6 rokov pred
rodič
commit
fc52a2da59

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 11371 - 11558
Playground/babylon.d.txt


+ 23 - 1
Tools/Gulp/config.json

@@ -1790,6 +1790,10 @@
                     {
                         "path": "babylonjs-loaders/src/glTF/2.0/Extensions",
                         "namespace": "BABYLON.GLTF2.Loader.Extensions"
+                    },
+                    {
+                        "path": "babylonjs-loaders/src/glTF/2.0",
+                        "namespace": "BABYLON.GLTF2"
                     }
                 ],
                 "importsToRemove": [],
@@ -1838,7 +1842,25 @@
                     "babylonjs-loaders": "BABYLON",
                     "babylonjs-serializers": "BABYLON",
                     "babylonjs-gltf2interface": "BABYLON.GLTF2"
-                }
+                },
+                "moduleSpecifics": [
+                    {
+                        "path": "babylonjs-serializers/src/glTF/2.0/Extensions",
+                        "namespace": "BABYLON.GLTF2.Exporter.Extensions"
+                    },
+                    {
+                        "path": "babylonjs-serializers/src/glTF/2.0/glTFData",
+                        "namespace": "BABYLON"
+                    },
+                    {
+                        "path": "babylonjs-serializers/src/glTF/2.0/glTFSerializer",
+                        "namespace": "BABYLON"
+                    },
+                    {
+                        "path": "babylonjs-serializers/src/glTF/2.0",
+                        "namespace": "BABYLON.GLTF2.Exporter"
+                    }
+                ]
             }
         }
     },

+ 2 - 2
Viewer/src/loader/plugins/msftLodLoaderPlugin.ts

@@ -1,5 +1,5 @@
 import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from 'babylonjs';
-import { IGLTFLoaderExtension, MSFT_lod } from 'babylonjs-loaders';
+import { IGLTFLoaderExtension, GLTF2 } from 'babylonjs-loaders';
 
 import { ViewerModel } from '../../model/viewerModel';
 import { ILoaderPlugin } from './loaderPlugin';
@@ -17,7 +17,7 @@ export class MSFTLodLoaderPlugin implements ILoaderPlugin {
 
     public onExtensionLoaded(extension: IGLTFLoaderExtension) {
         if (extension.name === "MSFT_lod" && this._model.configuration.loaderConfiguration) {
-            const MSFT_lod = extension as MSFT_lod;
+            const MSFT_lod = extension as GLTF2.MSFT_lod;
             MSFT_lod.enabled = !!this._model.configuration.loaderConfiguration.progressiveLoading;
             MSFT_lod.maxLODsToLoad = this._model.configuration.loaderConfiguration.maxLODsToLoad || Number.MAX_VALUE;
         }

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


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

@@ -1064,7 +1064,7 @@ declare module BABYLON.GLTF1 {
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: BABYLON.Material) => void, onError: (message: string) => void): boolean;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /**
         * Helper class for working with arrays when loading the glTF asset
         */
@@ -1259,7 +1259,7 @@ declare module BABYLON {
             endPerformanceCounter(counterName: string): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export var __IGLTFLoaderExtension: number;
     /**
@@ -1352,7 +1352,7 @@ declare module BABYLON {
             _loadUriAsync?(context: string, uri: string): BABYLON.Nullable<Promise<ArrayBufferView>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export var __IGLTFLoaderInterfacesV2: number;
     /**
@@ -1547,7 +1547,7 @@ declare module BABYLON {
             textures?: ITexture[];
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
       */
@@ -1566,7 +1566,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadSceneAsync(context: string, scene: IScene): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
       */
@@ -1583,7 +1583,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: BABYLON.Mesh): BABYLON.Nullable<Promise<BABYLON.Geometry>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
       */
@@ -1602,7 +1602,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadNodeAsync(context: string, node: INode, assign: (babylonMesh: BABYLON.Mesh) => void): BABYLON.Nullable<Promise<BABYLON.Mesh>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
       */
@@ -1619,7 +1619,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
       */
@@ -1636,7 +1636,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
       */
@@ -1653,7 +1653,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BABYLON.BaseTexture) => void): BABYLON.Nullable<Promise<BABYLON.BaseTexture>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
       */
@@ -1676,7 +1676,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadAnimationAsync(context: string, animation: IAnimation): BABYLON.Nullable<Promise<BABYLON.AnimationGroup>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
         * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
         */
@@ -1715,7 +1715,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
             _loadUriAsync(context: string, uri: string): BABYLON.Nullable<Promise<ArrayBufferView>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
@@ -1725,7 +1725,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;

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

@@ -2946,7 +2946,7 @@ declare module BABYLON.GLTF1 {
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: BABYLON.Material) => void, onError: (message: string) => void): boolean;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /**
         * Helper class for working with arrays when loading the glTF asset
         */
@@ -3141,7 +3141,7 @@ declare module BABYLON {
             endPerformanceCounter(counterName: string): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export var __IGLTFLoaderExtension: number;
     /**
@@ -3234,7 +3234,7 @@ declare module BABYLON {
             _loadUriAsync?(context: string, uri: string): BABYLON.Nullable<Promise<ArrayBufferView>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export var __IGLTFLoaderInterfacesV2: number;
     /**
@@ -3429,7 +3429,7 @@ declare module BABYLON {
             textures?: ITexture[];
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
       */
@@ -3448,7 +3448,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadSceneAsync(context: string, scene: IScene): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
       */
@@ -3465,7 +3465,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: BABYLON.Mesh): BABYLON.Nullable<Promise<BABYLON.Geometry>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
       */
@@ -3484,7 +3484,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadNodeAsync(context: string, node: INode, assign: (babylonMesh: BABYLON.Mesh) => void): BABYLON.Nullable<Promise<BABYLON.Mesh>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
       */
@@ -3501,7 +3501,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
       */
@@ -3518,7 +3518,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
       */
@@ -3535,7 +3535,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BABYLON.BaseTexture) => void): BABYLON.Nullable<Promise<BABYLON.BaseTexture>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
       * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
       */
@@ -3558,7 +3558,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadAnimationAsync(context: string, animation: IAnimation): BABYLON.Nullable<Promise<BABYLON.AnimationGroup>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /**
         * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
         */
@@ -3597,7 +3597,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
             _loadUriAsync(context: string, uri: string): BABYLON.Nullable<Promise<ArrayBufferView>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
@@ -3607,7 +3607,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: BABYLON.Material): BABYLON.Nullable<Promise<void>>;
     }
 }
-declare module BABYLON.GLTF2.Loader.Extensions {
+declare module BABYLON.GLTF2 {
     /** @hidden */
     export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;

+ 8 - 8
dist/preview release/serializers/babylonjs.serializers.d.ts

@@ -46,7 +46,7 @@ declare module BABYLON {
             required: boolean;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         * Interface to store animation data.
@@ -140,7 +140,7 @@ declare module BABYLON {
             }, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Class for holding and downloading glTF file data
         */
@@ -161,7 +161,7 @@ declare module BABYLON {
             downloadFiles(): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Converts Babylon BABYLON.Scene into glTF 2.0.
         * @hidden
@@ -302,7 +302,7 @@ declare module BABYLON {
             setUInt32(entry: number, byteOffset?: number): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /** @hidden */
     export var __IGLTFExporterExtensionV2: number;
     /**
@@ -328,7 +328,7 @@ declare module BABYLON {
             postExportMeshPrimitiveAsync?(context: string, meshPrimitive: BABYLON.GLTF2.IMeshPrimitive, babylonSubMesh: BABYLON.SubMesh, binaryWriter: _BinaryWriter): BABYLON.Nullable<Promise<BABYLON.GLTF2.IMeshPrimitive>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Utility methods for working with glTF material conversion properties.  This class should only be used internally
         * @hidden
@@ -421,7 +421,7 @@ declare module BABYLON {
             _exportTextureInfoAsync(babylonTexture: BABYLON.BaseTexture, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<BABYLON.Nullable<BABYLON.GLTF2.ITextureInfo>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Holds a collection of exporter options and parameters
         */
@@ -464,7 +464,7 @@ declare module BABYLON {
             static GLBAsync(scene: BABYLON.Scene, filePrefix: string, options?: IExportOptions): Promise<GLTFData>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         */
@@ -558,7 +558,7 @@ declare module BABYLON {
             static _NormalizeTangentFromRef(tangent: BABYLON.Vector4): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         */

+ 8 - 8
dist/preview release/serializers/babylonjs.serializers.module.d.ts

@@ -697,7 +697,7 @@ declare module BABYLON {
             required: boolean;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         * Interface to store animation data.
@@ -791,7 +791,7 @@ declare module BABYLON {
             }, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Class for holding and downloading glTF file data
         */
@@ -812,7 +812,7 @@ declare module BABYLON {
             downloadFiles(): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Converts Babylon BABYLON.Scene into glTF 2.0.
         * @hidden
@@ -953,7 +953,7 @@ declare module BABYLON {
             setUInt32(entry: number, byteOffset?: number): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /** @hidden */
     export var __IGLTFExporterExtensionV2: number;
     /**
@@ -979,7 +979,7 @@ declare module BABYLON {
             postExportMeshPrimitiveAsync?(context: string, meshPrimitive: BABYLON.GLTF2.IMeshPrimitive, babylonSubMesh: BABYLON.SubMesh, binaryWriter: _BinaryWriter): BABYLON.Nullable<Promise<BABYLON.GLTF2.IMeshPrimitive>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Utility methods for working with glTF material conversion properties.  This class should only be used internally
         * @hidden
@@ -1072,7 +1072,7 @@ declare module BABYLON {
             _exportTextureInfoAsync(babylonTexture: BABYLON.BaseTexture, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<BABYLON.Nullable<BABYLON.GLTF2.ITextureInfo>>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * Holds a collection of exporter options and parameters
         */
@@ -1115,7 +1115,7 @@ declare module BABYLON {
             static GLBAsync(scene: BABYLON.Scene, filePrefix: string, options?: IExportOptions): Promise<GLTFData>;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         */
@@ -1209,7 +1209,7 @@ declare module BABYLON {
             static _NormalizeTangentFromRef(tangent: BABYLON.Vector4): void;
     }
 }
-declare module BABYLON {
+declare module BABYLON.GLTF2.Exporter {
     /**
         * @hidden
         */

+ 0 - 25
dist/preview release/viewer/babylon.viewer.d.ts

@@ -2051,31 +2051,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    export interface ISceneOptimizerConfiguration {
-        targetFrameRate?: number;
-        trackerDuration?: number;
-        autoGeneratePriorities?: boolean;
-        improvementMode?: boolean;
-        degradation?: string;
-        types?: {
-            texture?: ISceneOptimizerParameters;
-            hardwareScaling?: ISceneOptimizerParameters;
-            shadow?: ISceneOptimizerParameters;
-            postProcess?: ISceneOptimizerParameters;
-            lensFlare?: ISceneOptimizerParameters;
-            particles?: ISceneOptimizerParameters;
-            renderTarget?: ISceneOptimizerParameters;
-            mergeMeshes?: ISceneOptimizerParameters;
-        };
-        custom?: string;
-    }
-    export interface ISceneOptimizerParameters {
-        priority?: number;
-        maximumSize?: number;
-        step?: number;
-    }
-}
-declare module BabylonViewer {
     export interface ISkyboxConfiguration {
         cubeTexture?: {
             noMipMap?: boolean;

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


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


+ 1 - 23
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -2211,29 +2211,7 @@ declare module 'babylonjs-viewer/configuration/interfaces/sceneConfiguration' {
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/sceneOptimizerConfiguration' {
-    export interface ISceneOptimizerConfiguration {
-        targetFrameRate?: number;
-        trackerDuration?: number;
-        autoGeneratePriorities?: boolean;
-        improvementMode?: boolean;
-        degradation?: string;
-        types?: {
-            texture?: ISceneOptimizerParameters;
-            hardwareScaling?: ISceneOptimizerParameters;
-            shadow?: ISceneOptimizerParameters;
-            postProcess?: ISceneOptimizerParameters;
-            lensFlare?: ISceneOptimizerParameters;
-            particles?: ISceneOptimizerParameters;
-            renderTarget?: ISceneOptimizerParameters;
-            mergeMeshes?: ISceneOptimizerParameters;
-        };
-        custom?: string;
-    }
-    export interface ISceneOptimizerParameters {
-        priority?: number;
-        maximumSize?: number;
-        step?: number;
-    }
+    
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/skyboxConfiguration' {

+ 2 - 2
tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts

@@ -351,7 +351,7 @@ describe('Babylon Scene Loader', function() {
 
             BABYLON.SceneLoader.OnPluginActivatedObservable.addOnce((loader: BABYLON.GLTFFileLoader) => {
                 const observer = loader.onExtensionLoadedObservable.add((extension) => {
-                    if (extension instanceof BABYLON.MSFT_lod) {
+                    if (extension instanceof BABYLON.GLTF2.Loader.Extensions.MSFT_lod) {
                         loader.onExtensionLoadedObservable.remove(observer);
                         extension.onMaterialLODsLoadedObservable.add((indexLOD) => {
                             const expectedMaterialName = `LOD${2 - indexLOD}`;
@@ -377,7 +377,7 @@ describe('Babylon Scene Loader', function() {
 
             BABYLON.SceneLoader.OnPluginActivatedObservable.addOnce((loader: BABYLON.GLTFFileLoader) => {
                 const observer = loader.onExtensionLoadedObservable.add((extension) => {
-                    if (extension instanceof BABYLON.MSFT_lod) {
+                    if (extension instanceof BABYLON.GLTF2.Loader.Extensions.MSFT_lod) {
                         loader.onExtensionLoadedObservable.remove(observer);
                         extension.onMaterialLODsLoadedObservable.add((indexLOD) => {
                             expect(indexLOD, "indexLOD").to.equal(0);