Pārlūkot izejas kodu

Fix .ts for validation tests.

sebastien 6 gadi atpakaļ
vecāks
revīzija
9d9ffc0d63

+ 3 - 0
src/Loading/Plugins/babylonFileLoader.ts

@@ -28,6 +28,9 @@ import { CannonJSPlugin } from "Physics/Plugins/cannonJSPlugin";
 import { OimoJSPlugin } from "Physics/Plugins/oimoJSPlugin";
 import { ReflectionProbe } from "Probes/reflectionProbe";
 
+    /** @hidden */
+    export var _BabylonLoaderRegistered = true;
+
     var parseMaterialById = (id: string, parsedData: any, scene: Scene, rootUrl: string) => {
         for (var index = 0, cache = parsedData.materials.length; index < cache; index++) {
             var parsedMaterial = parsedData.materials[index];

+ 3 - 2
src/Materials/Textures/Loaders/ddsTextureLoader.ts

@@ -8,8 +8,9 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
 import { DDSTools, DDSInfo } from "Misc/dds";
     /**
      * Implementation of the DDS Texture Loader.
+     * @hidden
      */
-    class DDSTextureLoader implements IInternalTextureLoader {
+    export class _DDSTextureLoader implements IInternalTextureLoader {
         /**
          * Defines wether the loader supports cascade loading the different faces.
          */
@@ -126,4 +127,4 @@ import { DDSTools, DDSInfo } from "Misc/dds";
     }
 
     // Register the loader.
-    Engine._TextureLoaders.push(new DDSTextureLoader());
+    Engine._TextureLoaders.push(new _DDSTextureLoader());

+ 3 - 2
src/Materials/Textures/Loaders/envTextureLoader.ts

@@ -7,8 +7,9 @@ import { _TimeToken } from "Instrumentation/timeToken";
 import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     /**
      * Implementation of the ENV Texture Loader.
+     * @hidden
      */
-    class ENVTextureLoader implements IInternalTextureLoader {
+    export class _ENVTextureLoader implements IInternalTextureLoader {
         /**
          * Defines wether the loader supports cascade loading the different faces.
          */
@@ -92,4 +93,4 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     }
 
     // Register the loader.
-    Engine._TextureLoaders.push(new ENVTextureLoader());
+    Engine._TextureLoaders.push(new _ENVTextureLoader());

+ 3 - 2
src/Materials/Textures/Loaders/ktxTextureLoader.ts

@@ -7,8 +7,9 @@ import { _TimeToken } from "Instrumentation/timeToken";
 import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     /**
      * Implementation of the KTX Texture Loader.
+     * @hidden
      */
-    class KTXTextureLoader implements IInternalTextureLoader {
+    export class _KTXTextureLoader implements IInternalTextureLoader {
         /**
          * Defines wether the loader supports cascade loading the different faces.
          */
@@ -99,4 +100,4 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     }
 
     // Register the loader.
-    Engine._TextureLoaders.unshift(new KTXTextureLoader());
+    Engine._TextureLoaders.unshift(new _KTXTextureLoader());

+ 3 - 2
src/Materials/Textures/Loaders/tgaTextureLoader.ts

@@ -7,8 +7,9 @@ import { _TimeToken } from "Instrumentation/timeToken";
 import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     /**
      * Implementation of the TGA Texture Loader.
+     * @hidden
      */
-    class TGATextureLoader implements IInternalTextureLoader {
+    export class _TGATextureLoader implements IInternalTextureLoader {
         /**
          * Defines wether the loader supports cascade loading the different faces.
          */
@@ -77,4 +78,4 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
     }
 
     // Register the loader.
-    Engine._TextureLoaders.push(new TGATextureLoader());
+    Engine._TextureLoaders.push(new _TGATextureLoader());

+ 2 - 2
src/Misc/tools.ts

@@ -198,11 +198,11 @@ declare type Engine = import("Engines/engine").Engine;
             return null;
         }
 
-        if (source.getClassName && source.getClassName === "Mesh") {
+        if (source.getClassName && source.getClassName() === "Mesh") {
             return null;
         }
 
-        if (source.getClassName && source.getClassName === "SubMesh") {
+        if (source.getClassName && source.getClassName() === "SubMesh") {
             return source.clone(destinationObject);
         } else if (source.clone) {
             return source.clone();