David Catuhe 7 سال پیش
والد
کامیت
91b917bb44
36فایلهای تغییر یافته به همراه21552 افزوده شده و 18152 حذف شده
  1. 9614 9593
      Playground/babylon.d.txt
  2. 7957 7957
      dist/preview release/babylon.d.ts
  3. 10 10
      dist/preview release/babylon.js
  4. 8 5
      dist/preview release/babylon.max.js
  5. 8 5
      dist/preview release/babylon.no-module.max.js
  6. 10 10
      dist/preview release/babylon.worker.js
  7. 8 5
      dist/preview release/es6.js
  8. 1 1
      dist/preview release/gui/babylon.gui.min.js
  9. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  10. 2328 0
      dist/preview release/gui/babylon.gui.module.d.ts
  11. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  12. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  13. 0 1
      dist/preview release/inspector/babylon.inspector.d.ts
  14. 1041 0
      dist/preview release/inspector/babylon.inspector.module.d.ts
  15. 34 34
      dist/preview release/loaders/babylon.glTF1FileLoader.d.ts
  16. 70 70
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  17. 87 87
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  18. 3 3
      dist/preview release/loaders/babylon.objFileLoader.d.ts
  19. 3 3
      dist/preview release/loaders/babylon.stlFileLoader.d.ts
  20. 93 93
      dist/preview release/loaders/babylonjs.loaders.d.ts
  21. 93 93
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  22. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts
  23. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.d.ts
  24. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts
  25. 2 2
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts
  26. 2 2
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts
  27. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.d.ts
  28. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.module.d.ts
  29. 51 51
      dist/preview release/serializers/babylon.glTF2Serializer.d.ts
  30. 51 51
      dist/preview release/serializers/babylonjs.serializers.d.ts
  31. 51 51
      dist/preview release/serializers/babylonjs.serializers.module.d.ts
  32. 0 2
      dist/preview release/viewer/babylon.viewer.d.ts
  33. 3 3
      dist/preview release/viewer/babylon.viewer.js
  34. 3 3
      dist/preview release/viewer/babylon.viewer.max.js
  35. 1 1
      gui/src/2D/controls/control.ts
  36. 6 2
      src/Cameras/babylon.targetCamera.ts

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 9614 - 9593
Playground/babylon.d.txt


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 7957 - 7957
dist/preview release/babylon.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 10 - 10
dist/preview release/babylon.js


+ 8 - 5
dist/preview release/babylon.max.js

@@ -10491,7 +10491,6 @@ var BABYLON;
         };
         InternalPromise.prototype._moveChildren = function (children) {
             var _this = this;
-            var _a;
             (_a = this._children).push.apply(_a, children.splice(0, children.length));
             this._children.forEach(function (child) {
                 child._parent = _this;
@@ -10508,6 +10507,7 @@ var BABYLON;
                     child._reject(this._reason);
                 }
             }
+            var _a;
         };
         InternalPromise.prototype._resolve = function (value) {
             try {
@@ -46444,13 +46444,16 @@ var BABYLON;
         TargetCamera.prototype._computeViewMatrix = function (position, target, up) {
             if (this.parent) {
                 var parentWorldMatrix = this.parent.getWorldMatrix();
-                BABYLON.Vector3.TransformCoordinatesToRef(this.position, parentWorldMatrix, this._globalPosition);
+                BABYLON.Vector3.TransformCoordinatesToRef(position, parentWorldMatrix, this._globalPosition);
                 BABYLON.Vector3.TransformCoordinatesToRef(target, parentWorldMatrix, this._globalCurrentTarget);
                 BABYLON.Vector3.TransformNormalToRef(up, parentWorldMatrix, this._globalCurrentUpVector);
                 this._markSyncedWithParent();
             }
             else {
-                this._globalPosition.copyFrom(this.position);
+                if (BABYLON.Scalar.WithinEpsilon(position.y, target.y, BABYLON.Epsilon) && BABYLON.Scalar.WithinEpsilon(position.z, target.z, BABYLON.Epsilon)) {
+                    position.z += BABYLON.Epsilon;
+                }
+                this._globalPosition.copyFrom(position);
                 this._globalCurrentTarget.copyFrom(target);
                 this._globalCurrentUpVector.copyFrom(up);
             }
@@ -68776,7 +68779,6 @@ var BABYLON;
          */
         ShadowGenerator.prototype.addShadowCaster = function (mesh, includeDescendants) {
             if (includeDescendants === void 0) { includeDescendants = true; }
-            var _a;
             if (!this._shadowMap) {
                 return this;
             }
@@ -68788,6 +68790,7 @@ var BABYLON;
                 (_a = this._shadowMap.renderList).push.apply(_a, mesh.getChildMeshes());
             }
             return this;
+            var _a;
         };
         /**
          * Helper function to remove a mesh and its descendants from the list of shadow casters
@@ -72127,7 +72130,6 @@ var BABYLON;
             return this.subMaterials[index];
         };
         MultiMaterial.prototype.getActiveTextures = function () {
-            var _a;
             return (_a = _super.prototype.getActiveTextures.call(this)).concat.apply(_a, this.subMaterials.map(function (subMaterial) {
                 if (subMaterial) {
                     return subMaterial.getActiveTextures();
@@ -72136,6 +72138,7 @@ var BABYLON;
                     return [];
                 }
             }));
+            var _a;
         };
         // Methods
         MultiMaterial.prototype.getClassName = function () {

+ 8 - 5
dist/preview release/babylon.no-module.max.js

@@ -10458,7 +10458,6 @@ var BABYLON;
         };
         InternalPromise.prototype._moveChildren = function (children) {
             var _this = this;
-            var _a;
             (_a = this._children).push.apply(_a, children.splice(0, children.length));
             this._children.forEach(function (child) {
                 child._parent = _this;
@@ -10475,6 +10474,7 @@ var BABYLON;
                     child._reject(this._reason);
                 }
             }
+            var _a;
         };
         InternalPromise.prototype._resolve = function (value) {
             try {
@@ -46411,13 +46411,16 @@ var BABYLON;
         TargetCamera.prototype._computeViewMatrix = function (position, target, up) {
             if (this.parent) {
                 var parentWorldMatrix = this.parent.getWorldMatrix();
-                BABYLON.Vector3.TransformCoordinatesToRef(this.position, parentWorldMatrix, this._globalPosition);
+                BABYLON.Vector3.TransformCoordinatesToRef(position, parentWorldMatrix, this._globalPosition);
                 BABYLON.Vector3.TransformCoordinatesToRef(target, parentWorldMatrix, this._globalCurrentTarget);
                 BABYLON.Vector3.TransformNormalToRef(up, parentWorldMatrix, this._globalCurrentUpVector);
                 this._markSyncedWithParent();
             }
             else {
-                this._globalPosition.copyFrom(this.position);
+                if (BABYLON.Scalar.WithinEpsilon(position.y, target.y, BABYLON.Epsilon) && BABYLON.Scalar.WithinEpsilon(position.z, target.z, BABYLON.Epsilon)) {
+                    position.z += BABYLON.Epsilon;
+                }
+                this._globalPosition.copyFrom(position);
                 this._globalCurrentTarget.copyFrom(target);
                 this._globalCurrentUpVector.copyFrom(up);
             }
@@ -68743,7 +68746,6 @@ var BABYLON;
          */
         ShadowGenerator.prototype.addShadowCaster = function (mesh, includeDescendants) {
             if (includeDescendants === void 0) { includeDescendants = true; }
-            var _a;
             if (!this._shadowMap) {
                 return this;
             }
@@ -68755,6 +68757,7 @@ var BABYLON;
                 (_a = this._shadowMap.renderList).push.apply(_a, mesh.getChildMeshes());
             }
             return this;
+            var _a;
         };
         /**
          * Helper function to remove a mesh and its descendants from the list of shadow casters
@@ -72094,7 +72097,6 @@ var BABYLON;
             return this.subMaterials[index];
         };
         MultiMaterial.prototype.getActiveTextures = function () {
-            var _a;
             return (_a = _super.prototype.getActiveTextures.call(this)).concat.apply(_a, this.subMaterials.map(function (subMaterial) {
                 if (subMaterial) {
                     return subMaterial.getActiveTextures();
@@ -72103,6 +72105,7 @@ var BABYLON;
                     return [];
                 }
             }));
+            var _a;
         };
         // Methods
         MultiMaterial.prototype.getClassName = function () {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 10 - 10
dist/preview release/babylon.worker.js


+ 8 - 5
dist/preview release/es6.js

@@ -10458,7 +10458,6 @@ var BABYLON;
         };
         InternalPromise.prototype._moveChildren = function (children) {
             var _this = this;
-            var _a;
             (_a = this._children).push.apply(_a, children.splice(0, children.length));
             this._children.forEach(function (child) {
                 child._parent = _this;
@@ -10475,6 +10474,7 @@ var BABYLON;
                     child._reject(this._reason);
                 }
             }
+            var _a;
         };
         InternalPromise.prototype._resolve = function (value) {
             try {
@@ -46411,13 +46411,16 @@ var BABYLON;
         TargetCamera.prototype._computeViewMatrix = function (position, target, up) {
             if (this.parent) {
                 var parentWorldMatrix = this.parent.getWorldMatrix();
-                BABYLON.Vector3.TransformCoordinatesToRef(this.position, parentWorldMatrix, this._globalPosition);
+                BABYLON.Vector3.TransformCoordinatesToRef(position, parentWorldMatrix, this._globalPosition);
                 BABYLON.Vector3.TransformCoordinatesToRef(target, parentWorldMatrix, this._globalCurrentTarget);
                 BABYLON.Vector3.TransformNormalToRef(up, parentWorldMatrix, this._globalCurrentUpVector);
                 this._markSyncedWithParent();
             }
             else {
-                this._globalPosition.copyFrom(this.position);
+                if (BABYLON.Scalar.WithinEpsilon(position.y, target.y, BABYLON.Epsilon) && BABYLON.Scalar.WithinEpsilon(position.z, target.z, BABYLON.Epsilon)) {
+                    position.z += BABYLON.Epsilon;
+                }
+                this._globalPosition.copyFrom(position);
                 this._globalCurrentTarget.copyFrom(target);
                 this._globalCurrentUpVector.copyFrom(up);
             }
@@ -68743,7 +68746,6 @@ var BABYLON;
          */
         ShadowGenerator.prototype.addShadowCaster = function (mesh, includeDescendants) {
             if (includeDescendants === void 0) { includeDescendants = true; }
-            var _a;
             if (!this._shadowMap) {
                 return this;
             }
@@ -68755,6 +68757,7 @@ var BABYLON;
                 (_a = this._shadowMap.renderList).push.apply(_a, mesh.getChildMeshes());
             }
             return this;
+            var _a;
         };
         /**
          * Helper function to remove a mesh and its descendants from the list of shadow casters
@@ -72094,7 +72097,6 @@ var BABYLON;
             return this.subMaterials[index];
         };
         MultiMaterial.prototype.getActiveTextures = function () {
-            var _a;
             return (_a = _super.prototype.getActiveTextures.call(this)).concat.apply(_a, this.subMaterials.map(function (subMaterial) {
                 if (subMaterial) {
                     return subMaterial.getActiveTextures();
@@ -72103,6 +72105,7 @@ var BABYLON;
                     return [];
                 }
             }));
+            var _a;
         };
         // Methods
         MultiMaterial.prototype.getClassName = function () {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2328 - 0
dist/preview release/gui/babylon.gui.module.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 0 - 1
dist/preview release/inspector/babylon.inspector.d.ts

@@ -22,7 +22,6 @@ declare module INSPECTOR {
 declare module INSPECTOR {
 }
 declare module INSPECTOR {
-    import "../sass/main.scss";
     export class Inspector {
             /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
             static DOCUMENT: HTMLDocument;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1041 - 0
dist/preview release/inspector/babylon.inspector.module.d.ts


+ 34 - 34
dist/preview release/loaders/babylon.glTF1FileLoader.d.ts

@@ -11,7 +11,7 @@ declare module BABYLON {
         /**
          * Sets the useRightHandedSystem flag on the scene.
          */
-        FORCE_RIGHT_HANDED = 1
+        FORCE_RIGHT_HANDED = 1,
     }
     /**
      * Mode that determines what animations will start.
@@ -28,7 +28,7 @@ declare module BABYLON {
         /**
          * All animations will start.
          */
-        ALL = 2
+        ALL = 2,
     }
     /**
      * Interface that contains the data for the glTF asset.
@@ -71,7 +71,7 @@ declare module BABYLON {
         /**
          * The asset is completely loaded.
          */
-        COMPLETE = 2
+        COMPLETE = 2,
     }
     /** @hidden */
     interface IGLTFLoader extends IDisposable {
@@ -303,14 +303,14 @@ declare module BABYLON {
          * @returns the created plugin
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        private _parse;
-        private _getLoader;
-        private _parseBinary;
-        private _parseV1;
-        private _parseV2;
-        private static _parseVersion;
-        private static _compareVersion;
-        private static _decodeBufferToText;
+        private _parse(data);
+        private _getLoader(loaderData);
+        private _parseBinary(data);
+        private _parseV1(binaryReader);
+        private _parseV2(binaryReader);
+        private static _parseVersion(version);
+        private static _compareVersion(a, b);
+        private static _decodeBufferToText(buffer);
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -320,17 +320,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled;
-        private _logDisabled;
+        private _logEnabled(message);
+        private _logDisabled(message);
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled;
-        private _startPerformanceCounterDisabled;
-        private _endPerformanceCounterEnabled;
-        private _endPerformanceCounterDisabled;
+        private _startPerformanceCounterEnabled(counterName);
+        private _startPerformanceCounterDisabled(counterName);
+        private _endPerformanceCounterEnabled(counterName);
+        private _endPerformanceCounterDisabled(counterName);
     }
 }
 
@@ -344,11 +344,11 @@ declare module BABYLON.GLTF1 {
         UNSIGNED_BYTE = 5121,
         SHORT = 5122,
         UNSIGNED_SHORT = 5123,
-        FLOAT = 5126
+        FLOAT = 5126,
     }
     enum EShaderType {
         FRAGMENT = 35632,
-        VERTEX = 35633
+        VERTEX = 35633,
     }
     enum EParameterType {
         BYTE = 5120,
@@ -371,12 +371,12 @@ declare module BABYLON.GLTF1 {
         FLOAT_MAT2 = 35674,
         FLOAT_MAT3 = 35675,
         FLOAT_MAT4 = 35676,
-        SAMPLER_2D = 35678
+        SAMPLER_2D = 35678,
     }
     enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
-        REPEAT = 10497
+        REPEAT = 10497,
     }
     enum ETextureFilterType {
         NEAREST = 9728,
@@ -384,19 +384,19 @@ declare module BABYLON.GLTF1 {
         NEAREST_MIPMAP_NEAREST = 9984,
         LINEAR_MIPMAP_NEAREST = 9985,
         NEAREST_MIPMAP_LINEAR = 9986,
-        LINEAR_MIPMAP_LINEAR = 9987
+        LINEAR_MIPMAP_LINEAR = 9987,
     }
     enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
         RGBA = 6408,
         LUMINANCE = 6409,
-        LUMINANCE_ALPHA = 6410
+        LUMINANCE_ALPHA = 6410,
     }
     enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
-        FRONT_AND_BACK = 1032
+        FRONT_AND_BACK = 1032,
     }
     enum EBlendingFunction {
         ZERO = 0,
@@ -413,7 +413,7 @@ declare module BABYLON.GLTF1 {
         ONE_MINUS_CONSTANT_COLOR = 32770,
         CONSTANT_ALPHA = 32771,
         ONE_MINUS_CONSTANT_ALPHA = 32772,
-        SRC_ALPHA_SATURATE = 776
+        SRC_ALPHA_SATURATE = 776,
     }
     /**
     * Interfaces
@@ -729,7 +729,7 @@ declare module BABYLON.GLTF1 {
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
-        private _importMeshAsync;
+        private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports one or more meshes from a loaded gltf file and adds them to the scene
         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
@@ -745,7 +745,7 @@ declare module BABYLON.GLTF1 {
             skeletons: Skeleton[];
             animationGroups: AnimationGroup[];
         }>;
-        private _loadAsync;
+        private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports all objects from a loaded gltf file and adds them to the scene
         * @param scene the scene the objects should be added to
@@ -755,9 +755,9 @@ declare module BABYLON.GLTF1 {
         * @returns a promise which completes when objects have been loaded to the scene
         */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadShadersAsync;
-        private _loadBuffersAsync;
-        private _createNodes;
+        private _loadShadersAsync(gltfRuntime, onload);
+        private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
+        private _createNodes(gltfRuntime);
     }
 }
 
@@ -868,9 +868,9 @@ declare module BABYLON.GLTF1 {
         static LoadTextureAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
         static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderData: string | ArrayBuffer) => void, onError: (message: string) => void): void;
         static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
-        private static LoadTextureBufferAsync;
-        private static CreateTextureAsync;
-        private static ApplyExtensions;
+        private static LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+        private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+        private static ApplyExtensions(func, defaultFunc);
     }
 }
 
@@ -892,6 +892,6 @@ declare module BABYLON.GLTF1 {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
-        private _loadTexture;
+        private _loadTexture(gltfRuntime, id, material, propertyPath, onError);
     }
 }

+ 70 - 70
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -11,7 +11,7 @@ declare module BABYLON {
         /**
          * Sets the useRightHandedSystem flag on the scene.
          */
-        FORCE_RIGHT_HANDED = 1
+        FORCE_RIGHT_HANDED = 1,
     }
     /**
      * Mode that determines what animations will start.
@@ -28,7 +28,7 @@ declare module BABYLON {
         /**
          * All animations will start.
          */
-        ALL = 2
+        ALL = 2,
     }
     /**
      * Interface that contains the data for the glTF asset.
@@ -71,7 +71,7 @@ declare module BABYLON {
         /**
          * The asset is completely loaded.
          */
-        COMPLETE = 2
+        COMPLETE = 2,
     }
     /** @hidden */
     interface IGLTFLoader extends IDisposable {
@@ -303,14 +303,14 @@ declare module BABYLON {
          * @returns the created plugin
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        private _parse;
-        private _getLoader;
-        private _parseBinary;
-        private _parseV1;
-        private _parseV2;
-        private static _parseVersion;
-        private static _compareVersion;
-        private static _decodeBufferToText;
+        private _parse(data);
+        private _getLoader(loaderData);
+        private _parseBinary(data);
+        private _parseV1(binaryReader);
+        private _parseV2(binaryReader);
+        private static _parseVersion(version);
+        private static _compareVersion(a, b);
+        private static _decodeBufferToText(buffer);
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -320,17 +320,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled;
-        private _logDisabled;
+        private _logEnabled(message);
+        private _logDisabled(message);
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled;
-        private _startPerformanceCounterDisabled;
-        private _endPerformanceCounterEnabled;
-        private _endPerformanceCounterDisabled;
+        private _startPerformanceCounterEnabled(counterName);
+        private _startPerformanceCounterDisabled(counterName);
+        private _endPerformanceCounterEnabled(counterName);
+        private _endPerformanceCounterDisabled(counterName);
     }
 }
 
@@ -483,46 +483,46 @@ declare module BABYLON.GLTF2 {
             animationGroups: AnimationGroup[];
         }>;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadAsync;
-        private _loadData;
-        private _setupData;
-        private _loadExtensions;
-        private _checkExtensions;
-        private _setState;
-        private _createRootNode;
+        private _loadAsync(nodes);
+        private _loadData(data);
+        private _setupData();
+        private _loadExtensions();
+        private _checkExtensions();
+        private _setState(state);
+        private _createRootNode();
         _loadSceneAsync(context: string, scene: _ILoaderScene): Promise<void>;
-        private _forEachPrimitive;
-        private _getMeshes;
-        private _getSkeletons;
-        private _getAnimationGroups;
-        private _startAnimations;
+        private _forEachPrimitive(node, callback);
+        private _getMeshes();
+        private _getSkeletons();
+        private _getAnimationGroups();
+        private _startAnimations();
         _loadNodeAsync(context: string, node: _ILoaderNode): Promise<void>;
-        private _loadMeshAsync;
-        private _loadPrimitiveAsync;
-        private _loadVertexDataAsync;
-        private _createMorphTargets;
-        private _loadMorphTargetsAsync;
-        private _loadMorphTargetVertexDataAsync;
-        private static _LoadTransform;
-        private _loadSkinAsync;
-        private _loadBones;
-        private _loadBone;
-        private _loadSkinInverseBindMatricesDataAsync;
-        private _updateBoneMatrices;
-        private _getNodeMatrix;
-        private _loadCamera;
-        private _loadAnimationsAsync;
-        private _loadAnimationAsync;
-        private _loadAnimationChannelAsync;
-        private _loadAnimationSamplerAsync;
-        private _loadBufferAsync;
+        private _loadMeshAsync(context, node, mesh, babylonMesh);
+        private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
+        private _loadVertexDataAsync(context, primitive, babylonMesh);
+        private _createMorphTargets(context, node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry);
+        private _loadMorphTargetVertexDataAsync(context, babylonGeometry, attributes, babylonMorphTarget);
+        private static _LoadTransform(node, babylonNode);
+        private _loadSkinAsync(context, node, mesh, skin);
+        private _loadBones(context, skin);
+        private _loadBone(node, skin, babylonBones);
+        private _loadSkinInverseBindMatricesDataAsync(context, skin);
+        private _updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);
+        private _getNodeMatrix(node);
+        private _loadCamera(context, camera, babylonMesh);
+        private _loadAnimationsAsync();
+        private _loadAnimationAsync(context, animation);
+        private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
+        private _loadAnimationSamplerAsync(context, sampler);
+        private _loadBufferAsync(context, buffer);
         _loadBufferViewAsync(context: string, bufferView: _ILoaderBufferView): Promise<ArrayBufferView>;
-        private _loadIndicesAccessorAsync;
-        private _loadFloatAccessorAsync;
+        private _loadIndicesAccessorAsync(context, accessor);
+        private _loadFloatAccessorAsync(context, accessor);
         _loadVertexBufferViewAsync(context: string, bufferView: _ILoaderBufferView, kind: string): Promise<Buffer>;
-        private _loadVertexAccessorAsync;
-        private _getDefaultMaterial;
-        private _loadMaterialMetallicRoughnessPropertiesAsync;
+        private _loadVertexAccessorAsync(context, accessor, kind);
+        private _getDefaultMaterial(drawMode);
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
         _loadMaterialAsync(context: string, material: _ILoaderMaterial, mesh: _ILoaderMesh, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
         _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Promise<void>;
         _createMaterial(name: string, drawMode: number): PBRMaterial;
@@ -530,19 +530,19 @@ declare module BABYLON.GLTF2 {
         _loadMaterialAlphaProperties(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): void;
         _loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: Texture) => void): Promise<void>;
         _loadTextureAsync(context: string, texture: _ILoaderTexture, assign: (babylonTexture: Texture) => void): Promise<void>;
-        private _loadSampler;
+        private _loadSampler(context, sampler);
         _loadImageAsync(context: string, image: _ILoaderImage): Promise<ArrayBufferView>;
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
-        private _onProgress;
+        private _onProgress();
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
-        private static _GetTextureWrapMode;
-        private static _GetTextureSamplingMode;
-        private static _GetTypedArray;
-        private static _GetNumComponents;
-        private static _ValidateUri;
-        private static _GetDrawMode;
-        private _compileMaterialsAsync;
-        private _compileShadowGeneratorsAsync;
+        private static _GetTextureWrapMode(context, mode);
+        private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
+        private static _GetTypedArray(context, componentType, bufferView, byteOffset, length);
+        private static _GetNumComponents(context, type);
+        private static _ValidateUri(uri);
+        private static _GetDrawMode(context, mode);
+        private _compileMaterialsAsync();
+        private _compileShadowGeneratorsAsync();
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
         _forEachExtensions(action: (extension: GLTFLoaderExtension) => void): void;
     }
@@ -561,7 +561,7 @@ declare module BABYLON.GLTF2 {
         /**
          * Gets or sets extension name
          */
-        abstract readonly name: string;
+        readonly abstract name: string;
         protected _loader: GLTFLoader;
         /**
          * Creates new GLTFLoaderExtension
@@ -725,8 +725,8 @@ declare module BABYLON.GLTF2.Extensions {
         /**
          * Gets an array of LOD properties from lowest to highest.
          */
-        private _getLODs;
-        private _disposeUnusedMaterials;
+        private _getLODs<T>(context, property, array, ids);
+        private _disposeUnusedMaterials();
     }
 }
 
@@ -745,7 +745,7 @@ declare module BABYLON.GLTF2.Extensions {
     class MSFT_sRGBFactors extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _convertColorsToLinear;
+        private _convertColorsToLinear(babylonMaterial);
     }
 }
 
@@ -771,7 +771,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadSpecularGlossinessPropertiesAsync;
+        private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }
 }
 
@@ -783,7 +783,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_unlit extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadUnlitPropertiesAsync;
+        private _loadUnlitPropertiesAsync(context, material, babylonMaterial);
     }
 }
 
@@ -822,6 +822,6 @@ declare module BABYLON.GLTF2.Extensions {
         private _lights?;
         protected _onLoading(): void;
         protected _loadSceneAsync(context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        private _loadLightAsync;
+        private _loadLightAsync(context, light);
     }
 }

+ 87 - 87
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -11,7 +11,7 @@ declare module BABYLON {
         /**
          * Sets the useRightHandedSystem flag on the scene.
          */
-        FORCE_RIGHT_HANDED = 1
+        FORCE_RIGHT_HANDED = 1,
     }
     /**
      * Mode that determines what animations will start.
@@ -28,7 +28,7 @@ declare module BABYLON {
         /**
          * All animations will start.
          */
-        ALL = 2
+        ALL = 2,
     }
     /**
      * Interface that contains the data for the glTF asset.
@@ -71,7 +71,7 @@ declare module BABYLON {
         /**
          * The asset is completely loaded.
          */
-        COMPLETE = 2
+        COMPLETE = 2,
     }
     /** @hidden */
     interface IGLTFLoader extends IDisposable {
@@ -303,14 +303,14 @@ declare module BABYLON {
          * @returns the created plugin
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        private _parse;
-        private _getLoader;
-        private _parseBinary;
-        private _parseV1;
-        private _parseV2;
-        private static _parseVersion;
-        private static _compareVersion;
-        private static _decodeBufferToText;
+        private _parse(data);
+        private _getLoader(loaderData);
+        private _parseBinary(data);
+        private _parseV1(binaryReader);
+        private _parseV2(binaryReader);
+        private static _parseVersion(version);
+        private static _compareVersion(a, b);
+        private static _decodeBufferToText(buffer);
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -320,17 +320,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled;
-        private _logDisabled;
+        private _logEnabled(message);
+        private _logDisabled(message);
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled;
-        private _startPerformanceCounterDisabled;
-        private _endPerformanceCounterEnabled;
-        private _endPerformanceCounterDisabled;
+        private _startPerformanceCounterEnabled(counterName);
+        private _startPerformanceCounterDisabled(counterName);
+        private _endPerformanceCounterEnabled(counterName);
+        private _endPerformanceCounterDisabled(counterName);
     }
 }
 
@@ -344,11 +344,11 @@ declare module BABYLON.GLTF1 {
         UNSIGNED_BYTE = 5121,
         SHORT = 5122,
         UNSIGNED_SHORT = 5123,
-        FLOAT = 5126
+        FLOAT = 5126,
     }
     enum EShaderType {
         FRAGMENT = 35632,
-        VERTEX = 35633
+        VERTEX = 35633,
     }
     enum EParameterType {
         BYTE = 5120,
@@ -371,12 +371,12 @@ declare module BABYLON.GLTF1 {
         FLOAT_MAT2 = 35674,
         FLOAT_MAT3 = 35675,
         FLOAT_MAT4 = 35676,
-        SAMPLER_2D = 35678
+        SAMPLER_2D = 35678,
     }
     enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
-        REPEAT = 10497
+        REPEAT = 10497,
     }
     enum ETextureFilterType {
         NEAREST = 9728,
@@ -384,19 +384,19 @@ declare module BABYLON.GLTF1 {
         NEAREST_MIPMAP_NEAREST = 9984,
         LINEAR_MIPMAP_NEAREST = 9985,
         NEAREST_MIPMAP_LINEAR = 9986,
-        LINEAR_MIPMAP_LINEAR = 9987
+        LINEAR_MIPMAP_LINEAR = 9987,
     }
     enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
         RGBA = 6408,
         LUMINANCE = 6409,
-        LUMINANCE_ALPHA = 6410
+        LUMINANCE_ALPHA = 6410,
     }
     enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
-        FRONT_AND_BACK = 1032
+        FRONT_AND_BACK = 1032,
     }
     enum EBlendingFunction {
         ZERO = 0,
@@ -413,7 +413,7 @@ declare module BABYLON.GLTF1 {
         ONE_MINUS_CONSTANT_COLOR = 32770,
         CONSTANT_ALPHA = 32771,
         ONE_MINUS_CONSTANT_ALPHA = 32772,
-        SRC_ALPHA_SATURATE = 776
+        SRC_ALPHA_SATURATE = 776,
     }
     /**
     * Interfaces
@@ -729,7 +729,7 @@ declare module BABYLON.GLTF1 {
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
-        private _importMeshAsync;
+        private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports one or more meshes from a loaded gltf file and adds them to the scene
         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
@@ -745,7 +745,7 @@ declare module BABYLON.GLTF1 {
             skeletons: Skeleton[];
             animationGroups: AnimationGroup[];
         }>;
-        private _loadAsync;
+        private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports all objects from a loaded gltf file and adds them to the scene
         * @param scene the scene the objects should be added to
@@ -755,9 +755,9 @@ declare module BABYLON.GLTF1 {
         * @returns a promise which completes when objects have been loaded to the scene
         */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadShadersAsync;
-        private _loadBuffersAsync;
-        private _createNodes;
+        private _loadShadersAsync(gltfRuntime, onload);
+        private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
+        private _createNodes(gltfRuntime);
     }
 }
 
@@ -868,9 +868,9 @@ declare module BABYLON.GLTF1 {
         static LoadTextureAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
         static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderData: string | ArrayBuffer) => void, onError: (message: string) => void): void;
         static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
-        private static LoadTextureBufferAsync;
-        private static CreateTextureAsync;
-        private static ApplyExtensions;
+        private static LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+        private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+        private static ApplyExtensions(func, defaultFunc);
     }
 }
 
@@ -892,7 +892,7 @@ declare module BABYLON.GLTF1 {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
-        private _loadTexture;
+        private _loadTexture(gltfRuntime, id, material, propertyPath, onError);
     }
 }
 
@@ -1045,46 +1045,46 @@ declare module BABYLON.GLTF2 {
             animationGroups: AnimationGroup[];
         }>;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadAsync;
-        private _loadData;
-        private _setupData;
-        private _loadExtensions;
-        private _checkExtensions;
-        private _setState;
-        private _createRootNode;
+        private _loadAsync(nodes);
+        private _loadData(data);
+        private _setupData();
+        private _loadExtensions();
+        private _checkExtensions();
+        private _setState(state);
+        private _createRootNode();
         _loadSceneAsync(context: string, scene: _ILoaderScene): Promise<void>;
-        private _forEachPrimitive;
-        private _getMeshes;
-        private _getSkeletons;
-        private _getAnimationGroups;
-        private _startAnimations;
+        private _forEachPrimitive(node, callback);
+        private _getMeshes();
+        private _getSkeletons();
+        private _getAnimationGroups();
+        private _startAnimations();
         _loadNodeAsync(context: string, node: _ILoaderNode): Promise<void>;
-        private _loadMeshAsync;
-        private _loadPrimitiveAsync;
-        private _loadVertexDataAsync;
-        private _createMorphTargets;
-        private _loadMorphTargetsAsync;
-        private _loadMorphTargetVertexDataAsync;
-        private static _LoadTransform;
-        private _loadSkinAsync;
-        private _loadBones;
-        private _loadBone;
-        private _loadSkinInverseBindMatricesDataAsync;
-        private _updateBoneMatrices;
-        private _getNodeMatrix;
-        private _loadCamera;
-        private _loadAnimationsAsync;
-        private _loadAnimationAsync;
-        private _loadAnimationChannelAsync;
-        private _loadAnimationSamplerAsync;
-        private _loadBufferAsync;
+        private _loadMeshAsync(context, node, mesh, babylonMesh);
+        private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
+        private _loadVertexDataAsync(context, primitive, babylonMesh);
+        private _createMorphTargets(context, node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry);
+        private _loadMorphTargetVertexDataAsync(context, babylonGeometry, attributes, babylonMorphTarget);
+        private static _LoadTransform(node, babylonNode);
+        private _loadSkinAsync(context, node, mesh, skin);
+        private _loadBones(context, skin);
+        private _loadBone(node, skin, babylonBones);
+        private _loadSkinInverseBindMatricesDataAsync(context, skin);
+        private _updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);
+        private _getNodeMatrix(node);
+        private _loadCamera(context, camera, babylonMesh);
+        private _loadAnimationsAsync();
+        private _loadAnimationAsync(context, animation);
+        private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
+        private _loadAnimationSamplerAsync(context, sampler);
+        private _loadBufferAsync(context, buffer);
         _loadBufferViewAsync(context: string, bufferView: _ILoaderBufferView): Promise<ArrayBufferView>;
-        private _loadIndicesAccessorAsync;
-        private _loadFloatAccessorAsync;
+        private _loadIndicesAccessorAsync(context, accessor);
+        private _loadFloatAccessorAsync(context, accessor);
         _loadVertexBufferViewAsync(context: string, bufferView: _ILoaderBufferView, kind: string): Promise<Buffer>;
-        private _loadVertexAccessorAsync;
-        private _getDefaultMaterial;
-        private _loadMaterialMetallicRoughnessPropertiesAsync;
+        private _loadVertexAccessorAsync(context, accessor, kind);
+        private _getDefaultMaterial(drawMode);
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
         _loadMaterialAsync(context: string, material: _ILoaderMaterial, mesh: _ILoaderMesh, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
         _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Promise<void>;
         _createMaterial(name: string, drawMode: number): PBRMaterial;
@@ -1092,19 +1092,19 @@ declare module BABYLON.GLTF2 {
         _loadMaterialAlphaProperties(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): void;
         _loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: Texture) => void): Promise<void>;
         _loadTextureAsync(context: string, texture: _ILoaderTexture, assign: (babylonTexture: Texture) => void): Promise<void>;
-        private _loadSampler;
+        private _loadSampler(context, sampler);
         _loadImageAsync(context: string, image: _ILoaderImage): Promise<ArrayBufferView>;
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
-        private _onProgress;
+        private _onProgress();
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
-        private static _GetTextureWrapMode;
-        private static _GetTextureSamplingMode;
-        private static _GetTypedArray;
-        private static _GetNumComponents;
-        private static _ValidateUri;
-        private static _GetDrawMode;
-        private _compileMaterialsAsync;
-        private _compileShadowGeneratorsAsync;
+        private static _GetTextureWrapMode(context, mode);
+        private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
+        private static _GetTypedArray(context, componentType, bufferView, byteOffset, length);
+        private static _GetNumComponents(context, type);
+        private static _ValidateUri(uri);
+        private static _GetDrawMode(context, mode);
+        private _compileMaterialsAsync();
+        private _compileShadowGeneratorsAsync();
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
         _forEachExtensions(action: (extension: GLTFLoaderExtension) => void): void;
     }
@@ -1123,7 +1123,7 @@ declare module BABYLON.GLTF2 {
         /**
          * Gets or sets extension name
          */
-        abstract readonly name: string;
+        readonly abstract name: string;
         protected _loader: GLTFLoader;
         /**
          * Creates new GLTFLoaderExtension
@@ -1287,8 +1287,8 @@ declare module BABYLON.GLTF2.Extensions {
         /**
          * Gets an array of LOD properties from lowest to highest.
          */
-        private _getLODs;
-        private _disposeUnusedMaterials;
+        private _getLODs<T>(context, property, array, ids);
+        private _disposeUnusedMaterials();
     }
 }
 
@@ -1307,7 +1307,7 @@ declare module BABYLON.GLTF2.Extensions {
     class MSFT_sRGBFactors extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _convertColorsToLinear;
+        private _convertColorsToLinear(babylonMaterial);
     }
 }
 
@@ -1333,7 +1333,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadSpecularGlossinessPropertiesAsync;
+        private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }
 }
 
@@ -1345,7 +1345,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_unlit extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadUnlitPropertiesAsync;
+        private _loadUnlitPropertiesAsync(context, material, babylonMaterial);
     }
 }
 
@@ -1384,6 +1384,6 @@ declare module BABYLON.GLTF2.Extensions {
         private _lights?;
         protected _onLoading(): void;
         protected _loadSceneAsync(context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        private _loadLightAsync;
+        private _loadLightAsync(context, light);
     }
 }

+ 3 - 3
dist/preview release/loaders/babylon.objFileLoader.d.ts

@@ -26,7 +26,7 @@ declare module BABYLON {
          * @param value The value stored in the mtl
          * @return The Texture
          */
-        private static _getTexture;
+        private static _getTexture(rootUrl, value, scene);
     }
     class OBJFileLoader implements ISceneLoaderPluginAsync {
         static OPTIMIZE_WITH_UV: boolean;
@@ -57,7 +57,7 @@ declare module BABYLON {
          * @param onSuccess Callback function to be called when the MTL file is loaded
          * @private
          */
-        private _loadMTL;
+        private _loadMTL(url, rootUrl, onSuccess);
         importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: IParticleSystem[];
@@ -78,6 +78,6 @@ declare module BABYLON {
          * @returns Array<AbstractMesh>
          * @private
          */
-        private _parseSolid;
+        private _parseSolid(meshesNames, scene, data, rootUrl);
     }
 }

+ 3 - 3
dist/preview release/loaders/babylon.stlFileLoader.d.ts

@@ -10,8 +10,8 @@ declare module BABYLON {
         importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
         load(scene: Scene, data: any, rootUrl: string): boolean;
         loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
-        private isBinary;
-        private parseBinary;
-        private parseASCII;
+        private isBinary(data);
+        private parseBinary(mesh, data);
+        private parseASCII(mesh, solidData);
     }
 }

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

@@ -10,9 +10,9 @@ declare module BABYLON {
         importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
         load(scene: Scene, data: any, rootUrl: string): boolean;
         loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
-        private isBinary;
-        private parseBinary;
-        private parseASCII;
+        private isBinary(data);
+        private parseBinary(mesh, data);
+        private parseASCII(mesh, solidData);
     }
 }
 
@@ -44,7 +44,7 @@ declare module BABYLON {
          * @param value The value stored in the mtl
          * @return The Texture
          */
-        private static _getTexture;
+        private static _getTexture(rootUrl, value, scene);
     }
     class OBJFileLoader implements ISceneLoaderPluginAsync {
         static OPTIMIZE_WITH_UV: boolean;
@@ -75,7 +75,7 @@ declare module BABYLON {
          * @param onSuccess Callback function to be called when the MTL file is loaded
          * @private
          */
-        private _loadMTL;
+        private _loadMTL(url, rootUrl, onSuccess);
         importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: IParticleSystem[];
@@ -96,7 +96,7 @@ declare module BABYLON {
          * @returns Array<AbstractMesh>
          * @private
          */
-        private _parseSolid;
+        private _parseSolid(meshesNames, scene, data, rootUrl);
     }
 }
 
@@ -113,7 +113,7 @@ declare module BABYLON {
         /**
          * Sets the useRightHandedSystem flag on the scene.
          */
-        FORCE_RIGHT_HANDED = 1
+        FORCE_RIGHT_HANDED = 1,
     }
     /**
      * Mode that determines what animations will start.
@@ -130,7 +130,7 @@ declare module BABYLON {
         /**
          * All animations will start.
          */
-        ALL = 2
+        ALL = 2,
     }
     /**
      * Interface that contains the data for the glTF asset.
@@ -173,7 +173,7 @@ declare module BABYLON {
         /**
          * The asset is completely loaded.
          */
-        COMPLETE = 2
+        COMPLETE = 2,
     }
     /** @hidden */
     interface IGLTFLoader extends IDisposable {
@@ -405,14 +405,14 @@ declare module BABYLON {
          * @returns the created plugin
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        private _parse;
-        private _getLoader;
-        private _parseBinary;
-        private _parseV1;
-        private _parseV2;
-        private static _parseVersion;
-        private static _compareVersion;
-        private static _decodeBufferToText;
+        private _parse(data);
+        private _getLoader(loaderData);
+        private _parseBinary(data);
+        private _parseV1(binaryReader);
+        private _parseV2(binaryReader);
+        private static _parseVersion(version);
+        private static _compareVersion(a, b);
+        private static _decodeBufferToText(buffer);
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -422,17 +422,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled;
-        private _logDisabled;
+        private _logEnabled(message);
+        private _logDisabled(message);
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled;
-        private _startPerformanceCounterDisabled;
-        private _endPerformanceCounterEnabled;
-        private _endPerformanceCounterDisabled;
+        private _startPerformanceCounterEnabled(counterName);
+        private _startPerformanceCounterDisabled(counterName);
+        private _endPerformanceCounterEnabled(counterName);
+        private _endPerformanceCounterDisabled(counterName);
     }
 }
 
@@ -446,11 +446,11 @@ declare module BABYLON.GLTF1 {
         UNSIGNED_BYTE = 5121,
         SHORT = 5122,
         UNSIGNED_SHORT = 5123,
-        FLOAT = 5126
+        FLOAT = 5126,
     }
     enum EShaderType {
         FRAGMENT = 35632,
-        VERTEX = 35633
+        VERTEX = 35633,
     }
     enum EParameterType {
         BYTE = 5120,
@@ -473,12 +473,12 @@ declare module BABYLON.GLTF1 {
         FLOAT_MAT2 = 35674,
         FLOAT_MAT3 = 35675,
         FLOAT_MAT4 = 35676,
-        SAMPLER_2D = 35678
+        SAMPLER_2D = 35678,
     }
     enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
-        REPEAT = 10497
+        REPEAT = 10497,
     }
     enum ETextureFilterType {
         NEAREST = 9728,
@@ -486,19 +486,19 @@ declare module BABYLON.GLTF1 {
         NEAREST_MIPMAP_NEAREST = 9984,
         LINEAR_MIPMAP_NEAREST = 9985,
         NEAREST_MIPMAP_LINEAR = 9986,
-        LINEAR_MIPMAP_LINEAR = 9987
+        LINEAR_MIPMAP_LINEAR = 9987,
     }
     enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
         RGBA = 6408,
         LUMINANCE = 6409,
-        LUMINANCE_ALPHA = 6410
+        LUMINANCE_ALPHA = 6410,
     }
     enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
-        FRONT_AND_BACK = 1032
+        FRONT_AND_BACK = 1032,
     }
     enum EBlendingFunction {
         ZERO = 0,
@@ -515,7 +515,7 @@ declare module BABYLON.GLTF1 {
         ONE_MINUS_CONSTANT_COLOR = 32770,
         CONSTANT_ALPHA = 32771,
         ONE_MINUS_CONSTANT_ALPHA = 32772,
-        SRC_ALPHA_SATURATE = 776
+        SRC_ALPHA_SATURATE = 776,
     }
     /**
     * Interfaces
@@ -831,7 +831,7 @@ declare module BABYLON.GLTF1 {
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
-        private _importMeshAsync;
+        private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports one or more meshes from a loaded gltf file and adds them to the scene
         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
@@ -847,7 +847,7 @@ declare module BABYLON.GLTF1 {
             skeletons: Skeleton[];
             animationGroups: AnimationGroup[];
         }>;
-        private _loadAsync;
+        private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports all objects from a loaded gltf file and adds them to the scene
         * @param scene the scene the objects should be added to
@@ -857,9 +857,9 @@ declare module BABYLON.GLTF1 {
         * @returns a promise which completes when objects have been loaded to the scene
         */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadShadersAsync;
-        private _loadBuffersAsync;
-        private _createNodes;
+        private _loadShadersAsync(gltfRuntime, onload);
+        private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
+        private _createNodes(gltfRuntime);
     }
 }
 
@@ -970,9 +970,9 @@ declare module BABYLON.GLTF1 {
         static LoadTextureAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
         static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderData: string | ArrayBuffer) => void, onError: (message: string) => void): void;
         static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
-        private static LoadTextureBufferAsync;
-        private static CreateTextureAsync;
-        private static ApplyExtensions;
+        private static LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+        private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+        private static ApplyExtensions(func, defaultFunc);
     }
 }
 
@@ -994,7 +994,7 @@ declare module BABYLON.GLTF1 {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
-        private _loadTexture;
+        private _loadTexture(gltfRuntime, id, material, propertyPath, onError);
     }
 }
 
@@ -1147,46 +1147,46 @@ declare module BABYLON.GLTF2 {
             animationGroups: AnimationGroup[];
         }>;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadAsync;
-        private _loadData;
-        private _setupData;
-        private _loadExtensions;
-        private _checkExtensions;
-        private _setState;
-        private _createRootNode;
+        private _loadAsync(nodes);
+        private _loadData(data);
+        private _setupData();
+        private _loadExtensions();
+        private _checkExtensions();
+        private _setState(state);
+        private _createRootNode();
         _loadSceneAsync(context: string, scene: _ILoaderScene): Promise<void>;
-        private _forEachPrimitive;
-        private _getMeshes;
-        private _getSkeletons;
-        private _getAnimationGroups;
-        private _startAnimations;
+        private _forEachPrimitive(node, callback);
+        private _getMeshes();
+        private _getSkeletons();
+        private _getAnimationGroups();
+        private _startAnimations();
         _loadNodeAsync(context: string, node: _ILoaderNode): Promise<void>;
-        private _loadMeshAsync;
-        private _loadPrimitiveAsync;
-        private _loadVertexDataAsync;
-        private _createMorphTargets;
-        private _loadMorphTargetsAsync;
-        private _loadMorphTargetVertexDataAsync;
-        private static _LoadTransform;
-        private _loadSkinAsync;
-        private _loadBones;
-        private _loadBone;
-        private _loadSkinInverseBindMatricesDataAsync;
-        private _updateBoneMatrices;
-        private _getNodeMatrix;
-        private _loadCamera;
-        private _loadAnimationsAsync;
-        private _loadAnimationAsync;
-        private _loadAnimationChannelAsync;
-        private _loadAnimationSamplerAsync;
-        private _loadBufferAsync;
+        private _loadMeshAsync(context, node, mesh, babylonMesh);
+        private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
+        private _loadVertexDataAsync(context, primitive, babylonMesh);
+        private _createMorphTargets(context, node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry);
+        private _loadMorphTargetVertexDataAsync(context, babylonGeometry, attributes, babylonMorphTarget);
+        private static _LoadTransform(node, babylonNode);
+        private _loadSkinAsync(context, node, mesh, skin);
+        private _loadBones(context, skin);
+        private _loadBone(node, skin, babylonBones);
+        private _loadSkinInverseBindMatricesDataAsync(context, skin);
+        private _updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);
+        private _getNodeMatrix(node);
+        private _loadCamera(context, camera, babylonMesh);
+        private _loadAnimationsAsync();
+        private _loadAnimationAsync(context, animation);
+        private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
+        private _loadAnimationSamplerAsync(context, sampler);
+        private _loadBufferAsync(context, buffer);
         _loadBufferViewAsync(context: string, bufferView: _ILoaderBufferView): Promise<ArrayBufferView>;
-        private _loadIndicesAccessorAsync;
-        private _loadFloatAccessorAsync;
+        private _loadIndicesAccessorAsync(context, accessor);
+        private _loadFloatAccessorAsync(context, accessor);
         _loadVertexBufferViewAsync(context: string, bufferView: _ILoaderBufferView, kind: string): Promise<Buffer>;
-        private _loadVertexAccessorAsync;
-        private _getDefaultMaterial;
-        private _loadMaterialMetallicRoughnessPropertiesAsync;
+        private _loadVertexAccessorAsync(context, accessor, kind);
+        private _getDefaultMaterial(drawMode);
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
         _loadMaterialAsync(context: string, material: _ILoaderMaterial, mesh: _ILoaderMesh, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
         _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Promise<void>;
         _createMaterial(name: string, drawMode: number): PBRMaterial;
@@ -1194,19 +1194,19 @@ declare module BABYLON.GLTF2 {
         _loadMaterialAlphaProperties(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): void;
         _loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: Texture) => void): Promise<void>;
         _loadTextureAsync(context: string, texture: _ILoaderTexture, assign: (babylonTexture: Texture) => void): Promise<void>;
-        private _loadSampler;
+        private _loadSampler(context, sampler);
         _loadImageAsync(context: string, image: _ILoaderImage): Promise<ArrayBufferView>;
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
-        private _onProgress;
+        private _onProgress();
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
-        private static _GetTextureWrapMode;
-        private static _GetTextureSamplingMode;
-        private static _GetTypedArray;
-        private static _GetNumComponents;
-        private static _ValidateUri;
-        private static _GetDrawMode;
-        private _compileMaterialsAsync;
-        private _compileShadowGeneratorsAsync;
+        private static _GetTextureWrapMode(context, mode);
+        private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
+        private static _GetTypedArray(context, componentType, bufferView, byteOffset, length);
+        private static _GetNumComponents(context, type);
+        private static _ValidateUri(uri);
+        private static _GetDrawMode(context, mode);
+        private _compileMaterialsAsync();
+        private _compileShadowGeneratorsAsync();
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
         _forEachExtensions(action: (extension: GLTFLoaderExtension) => void): void;
     }
@@ -1225,7 +1225,7 @@ declare module BABYLON.GLTF2 {
         /**
          * Gets or sets extension name
          */
-        abstract readonly name: string;
+        readonly abstract name: string;
         protected _loader: GLTFLoader;
         /**
          * Creates new GLTFLoaderExtension
@@ -1389,8 +1389,8 @@ declare module BABYLON.GLTF2.Extensions {
         /**
          * Gets an array of LOD properties from lowest to highest.
          */
-        private _getLODs;
-        private _disposeUnusedMaterials;
+        private _getLODs<T>(context, property, array, ids);
+        private _disposeUnusedMaterials();
     }
 }
 
@@ -1409,7 +1409,7 @@ declare module BABYLON.GLTF2.Extensions {
     class MSFT_sRGBFactors extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _convertColorsToLinear;
+        private _convertColorsToLinear(babylonMaterial);
     }
 }
 
@@ -1435,7 +1435,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadSpecularGlossinessPropertiesAsync;
+        private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }
 }
 
@@ -1447,7 +1447,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_unlit extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadUnlitPropertiesAsync;
+        private _loadUnlitPropertiesAsync(context, material, babylonMaterial);
     }
 }
 
@@ -1486,6 +1486,6 @@ declare module BABYLON.GLTF2.Extensions {
         private _lights?;
         protected _onLoading(): void;
         protected _loadSceneAsync(context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        private _loadLightAsync;
+        private _loadLightAsync(context, light);
     }
 }

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

@@ -17,9 +17,9 @@ declare module BABYLON {
         importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
         load(scene: Scene, data: any, rootUrl: string): boolean;
         loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
-        private isBinary;
-        private parseBinary;
-        private parseASCII;
+        private isBinary(data);
+        private parseBinary(mesh, data);
+        private parseASCII(mesh, solidData);
     }
 }
 
@@ -51,7 +51,7 @@ declare module BABYLON {
          * @param value The value stored in the mtl
          * @return The Texture
          */
-        private static _getTexture;
+        private static _getTexture(rootUrl, value, scene);
     }
     class OBJFileLoader implements ISceneLoaderPluginAsync {
         static OPTIMIZE_WITH_UV: boolean;
@@ -82,7 +82,7 @@ declare module BABYLON {
          * @param onSuccess Callback function to be called when the MTL file is loaded
          * @private
          */
-        private _loadMTL;
+        private _loadMTL(url, rootUrl, onSuccess);
         importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: IParticleSystem[];
@@ -103,7 +103,7 @@ declare module BABYLON {
          * @returns Array<AbstractMesh>
          * @private
          */
-        private _parseSolid;
+        private _parseSolid(meshesNames, scene, data, rootUrl);
     }
 }
 
@@ -120,7 +120,7 @@ declare module BABYLON {
         /**
          * Sets the useRightHandedSystem flag on the scene.
          */
-        FORCE_RIGHT_HANDED = 1
+        FORCE_RIGHT_HANDED = 1,
     }
     /**
      * Mode that determines what animations will start.
@@ -137,7 +137,7 @@ declare module BABYLON {
         /**
          * All animations will start.
          */
-        ALL = 2
+        ALL = 2,
     }
     /**
      * Interface that contains the data for the glTF asset.
@@ -180,7 +180,7 @@ declare module BABYLON {
         /**
          * The asset is completely loaded.
          */
-        COMPLETE = 2
+        COMPLETE = 2,
     }
     /** @hidden */
     interface IGLTFLoader extends IDisposable {
@@ -412,14 +412,14 @@ declare module BABYLON {
          * @returns the created plugin
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        private _parse;
-        private _getLoader;
-        private _parseBinary;
-        private _parseV1;
-        private _parseV2;
-        private static _parseVersion;
-        private static _compareVersion;
-        private static _decodeBufferToText;
+        private _parse(data);
+        private _getLoader(loaderData);
+        private _parseBinary(data);
+        private _parseV1(binaryReader);
+        private _parseV2(binaryReader);
+        private static _parseVersion(version);
+        private static _compareVersion(a, b);
+        private static _decodeBufferToText(buffer);
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -429,17 +429,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled;
-        private _logDisabled;
+        private _logEnabled(message);
+        private _logDisabled(message);
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled;
-        private _startPerformanceCounterDisabled;
-        private _endPerformanceCounterEnabled;
-        private _endPerformanceCounterDisabled;
+        private _startPerformanceCounterEnabled(counterName);
+        private _startPerformanceCounterDisabled(counterName);
+        private _endPerformanceCounterEnabled(counterName);
+        private _endPerformanceCounterDisabled(counterName);
     }
 }
 
@@ -453,11 +453,11 @@ declare module BABYLON.GLTF1 {
         UNSIGNED_BYTE = 5121,
         SHORT = 5122,
         UNSIGNED_SHORT = 5123,
-        FLOAT = 5126
+        FLOAT = 5126,
     }
     enum EShaderType {
         FRAGMENT = 35632,
-        VERTEX = 35633
+        VERTEX = 35633,
     }
     enum EParameterType {
         BYTE = 5120,
@@ -480,12 +480,12 @@ declare module BABYLON.GLTF1 {
         FLOAT_MAT2 = 35674,
         FLOAT_MAT3 = 35675,
         FLOAT_MAT4 = 35676,
-        SAMPLER_2D = 35678
+        SAMPLER_2D = 35678,
     }
     enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
-        REPEAT = 10497
+        REPEAT = 10497,
     }
     enum ETextureFilterType {
         NEAREST = 9728,
@@ -493,19 +493,19 @@ declare module BABYLON.GLTF1 {
         NEAREST_MIPMAP_NEAREST = 9984,
         LINEAR_MIPMAP_NEAREST = 9985,
         NEAREST_MIPMAP_LINEAR = 9986,
-        LINEAR_MIPMAP_LINEAR = 9987
+        LINEAR_MIPMAP_LINEAR = 9987,
     }
     enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
         RGBA = 6408,
         LUMINANCE = 6409,
-        LUMINANCE_ALPHA = 6410
+        LUMINANCE_ALPHA = 6410,
     }
     enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
-        FRONT_AND_BACK = 1032
+        FRONT_AND_BACK = 1032,
     }
     enum EBlendingFunction {
         ZERO = 0,
@@ -522,7 +522,7 @@ declare module BABYLON.GLTF1 {
         ONE_MINUS_CONSTANT_COLOR = 32770,
         CONSTANT_ALPHA = 32771,
         ONE_MINUS_CONSTANT_ALPHA = 32772,
-        SRC_ALPHA_SATURATE = 776
+        SRC_ALPHA_SATURATE = 776,
     }
     /**
     * Interfaces
@@ -838,7 +838,7 @@ declare module BABYLON.GLTF1 {
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
-        private _importMeshAsync;
+        private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports one or more meshes from a loaded gltf file and adds them to the scene
         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
@@ -854,7 +854,7 @@ declare module BABYLON.GLTF1 {
             skeletons: Skeleton[];
             animationGroups: AnimationGroup[];
         }>;
-        private _loadAsync;
+        private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
         /**
         * Imports all objects from a loaded gltf file and adds them to the scene
         * @param scene the scene the objects should be added to
@@ -864,9 +864,9 @@ declare module BABYLON.GLTF1 {
         * @returns a promise which completes when objects have been loaded to the scene
         */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadShadersAsync;
-        private _loadBuffersAsync;
-        private _createNodes;
+        private _loadShadersAsync(gltfRuntime, onload);
+        private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
+        private _createNodes(gltfRuntime);
     }
 }
 
@@ -977,9 +977,9 @@ declare module BABYLON.GLTF1 {
         static LoadTextureAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
         static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderData: string | ArrayBuffer) => void, onError: (message: string) => void): void;
         static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
-        private static LoadTextureBufferAsync;
-        private static CreateTextureAsync;
-        private static ApplyExtensions;
+        private static LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
+        private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
+        private static ApplyExtensions(func, defaultFunc);
     }
 }
 
@@ -1001,7 +1001,7 @@ declare module BABYLON.GLTF1 {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
         loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
-        private _loadTexture;
+        private _loadTexture(gltfRuntime, id, material, propertyPath, onError);
     }
 }
 
@@ -1154,46 +1154,46 @@ declare module BABYLON.GLTF2 {
             animationGroups: AnimationGroup[];
         }>;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
-        private _loadAsync;
-        private _loadData;
-        private _setupData;
-        private _loadExtensions;
-        private _checkExtensions;
-        private _setState;
-        private _createRootNode;
+        private _loadAsync(nodes);
+        private _loadData(data);
+        private _setupData();
+        private _loadExtensions();
+        private _checkExtensions();
+        private _setState(state);
+        private _createRootNode();
         _loadSceneAsync(context: string, scene: _ILoaderScene): Promise<void>;
-        private _forEachPrimitive;
-        private _getMeshes;
-        private _getSkeletons;
-        private _getAnimationGroups;
-        private _startAnimations;
+        private _forEachPrimitive(node, callback);
+        private _getMeshes();
+        private _getSkeletons();
+        private _getAnimationGroups();
+        private _startAnimations();
         _loadNodeAsync(context: string, node: _ILoaderNode): Promise<void>;
-        private _loadMeshAsync;
-        private _loadPrimitiveAsync;
-        private _loadVertexDataAsync;
-        private _createMorphTargets;
-        private _loadMorphTargetsAsync;
-        private _loadMorphTargetVertexDataAsync;
-        private static _LoadTransform;
-        private _loadSkinAsync;
-        private _loadBones;
-        private _loadBone;
-        private _loadSkinInverseBindMatricesDataAsync;
-        private _updateBoneMatrices;
-        private _getNodeMatrix;
-        private _loadCamera;
-        private _loadAnimationsAsync;
-        private _loadAnimationAsync;
-        private _loadAnimationChannelAsync;
-        private _loadAnimationSamplerAsync;
-        private _loadBufferAsync;
+        private _loadMeshAsync(context, node, mesh, babylonMesh);
+        private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
+        private _loadVertexDataAsync(context, primitive, babylonMesh);
+        private _createMorphTargets(context, node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry);
+        private _loadMorphTargetVertexDataAsync(context, babylonGeometry, attributes, babylonMorphTarget);
+        private static _LoadTransform(node, babylonNode);
+        private _loadSkinAsync(context, node, mesh, skin);
+        private _loadBones(context, skin);
+        private _loadBone(node, skin, babylonBones);
+        private _loadSkinInverseBindMatricesDataAsync(context, skin);
+        private _updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);
+        private _getNodeMatrix(node);
+        private _loadCamera(context, camera, babylonMesh);
+        private _loadAnimationsAsync();
+        private _loadAnimationAsync(context, animation);
+        private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
+        private _loadAnimationSamplerAsync(context, sampler);
+        private _loadBufferAsync(context, buffer);
         _loadBufferViewAsync(context: string, bufferView: _ILoaderBufferView): Promise<ArrayBufferView>;
-        private _loadIndicesAccessorAsync;
-        private _loadFloatAccessorAsync;
+        private _loadIndicesAccessorAsync(context, accessor);
+        private _loadFloatAccessorAsync(context, accessor);
         _loadVertexBufferViewAsync(context: string, bufferView: _ILoaderBufferView, kind: string): Promise<Buffer>;
-        private _loadVertexAccessorAsync;
-        private _getDefaultMaterial;
-        private _loadMaterialMetallicRoughnessPropertiesAsync;
+        private _loadVertexAccessorAsync(context, accessor, kind);
+        private _getDefaultMaterial(drawMode);
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
         _loadMaterialAsync(context: string, material: _ILoaderMaterial, mesh: _ILoaderMesh, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
         _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Promise<void>;
         _createMaterial(name: string, drawMode: number): PBRMaterial;
@@ -1201,19 +1201,19 @@ declare module BABYLON.GLTF2 {
         _loadMaterialAlphaProperties(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): void;
         _loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: Texture) => void): Promise<void>;
         _loadTextureAsync(context: string, texture: _ILoaderTexture, assign: (babylonTexture: Texture) => void): Promise<void>;
-        private _loadSampler;
+        private _loadSampler(context, sampler);
         _loadImageAsync(context: string, image: _ILoaderImage): Promise<ArrayBufferView>;
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
-        private _onProgress;
+        private _onProgress();
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
-        private static _GetTextureWrapMode;
-        private static _GetTextureSamplingMode;
-        private static _GetTypedArray;
-        private static _GetNumComponents;
-        private static _ValidateUri;
-        private static _GetDrawMode;
-        private _compileMaterialsAsync;
-        private _compileShadowGeneratorsAsync;
+        private static _GetTextureWrapMode(context, mode);
+        private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
+        private static _GetTypedArray(context, componentType, bufferView, byteOffset, length);
+        private static _GetNumComponents(context, type);
+        private static _ValidateUri(uri);
+        private static _GetDrawMode(context, mode);
+        private _compileMaterialsAsync();
+        private _compileShadowGeneratorsAsync();
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
         _forEachExtensions(action: (extension: GLTFLoaderExtension) => void): void;
     }
@@ -1232,7 +1232,7 @@ declare module BABYLON.GLTF2 {
         /**
          * Gets or sets extension name
          */
-        abstract readonly name: string;
+        readonly abstract name: string;
         protected _loader: GLTFLoader;
         /**
          * Creates new GLTFLoaderExtension
@@ -1396,8 +1396,8 @@ declare module BABYLON.GLTF2.Extensions {
         /**
          * Gets an array of LOD properties from lowest to highest.
          */
-        private _getLODs;
-        private _disposeUnusedMaterials;
+        private _getLODs<T>(context, property, array, ids);
+        private _disposeUnusedMaterials();
     }
 }
 
@@ -1416,7 +1416,7 @@ declare module BABYLON.GLTF2.Extensions {
     class MSFT_sRGBFactors extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _convertColorsToLinear;
+        private _convertColorsToLinear(babylonMaterial);
     }
 }
 
@@ -1442,7 +1442,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadSpecularGlossinessPropertiesAsync;
+        private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }
 }
 
@@ -1454,7 +1454,7 @@ declare module BABYLON.GLTF2.Extensions {
     class KHR_materials_unlit extends GLTFLoaderExtension {
         readonly name: string;
         protected _loadMaterialPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
-        private _loadUnlitPropertiesAsync;
+        private _loadUnlitPropertiesAsync(context, material, babylonMaterial);
     }
 }
 
@@ -1493,6 +1493,6 @@ declare module BABYLON.GLTF2.Extensions {
         private _lights?;
         protected _onLoading(): void;
         protected _loadSceneAsync(context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        private _loadLightAsync;
+        private _loadLightAsync(context, light);
     }
 }

+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts

@@ -92,7 +92,7 @@ declare module BABYLON {
         getAlphaTestTexture(): Nullable<BaseTexture>;
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        private _createRenderTargets;
+        private _createRenderTargets(scene, renderTargetSize);
         getAnimatables(): IAnimatable[];
         getActiveTextures(): BaseTexture[];
         hasTexture(texture: BaseTexture): boolean;

+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.d.ts

@@ -234,7 +234,7 @@ declare module BABYLON {
         getAlphaTestTexture(): Nullable<BaseTexture>;
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        private _createRenderTargets;
+        private _createRenderTargets(scene, renderTargetSize);
         getAnimatables(): IAnimatable[];
         getActiveTextures(): BaseTexture[];
         hasTexture(texture: BaseTexture): boolean;

+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts

@@ -239,7 +239,7 @@ declare module BABYLON {
         getAlphaTestTexture(): Nullable<BaseTexture>;
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        private _createRenderTargets;
+        private _createRenderTargets(scene, renderTargetSize);
         getAnimatables(): IAnimatable[];
         getActiveTextures(): BaseTexture[];
         hasTexture(texture: BaseTexture): boolean;

+ 2 - 2
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts

@@ -27,13 +27,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current AsciiArtTexture.
          * @return the clone of the texture.

+ 2 - 2
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts

@@ -27,13 +27,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

+ 4 - 4
dist/preview release/postProcessesLibrary/babylonjs.postProcess.d.ts

@@ -27,13 +27,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current AsciiArtTexture.
          * @return the clone of the texture.
@@ -130,13 +130,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

+ 4 - 4
dist/preview release/postProcessesLibrary/babylonjs.postProcess.module.d.ts

@@ -32,13 +32,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current AsciiArtTexture.
          * @return the clone of the texture.
@@ -135,13 +135,13 @@ declare module BABYLON {
          * @param font the font to use, use the W3C CSS notation
          * @return the max char width
          */
-        private getFontWidth;
+        private getFontWidth(font);
         /**
          * Gets the max char height of a font.
          * @param font the font to use, use the W3C CSS notation
          * @return the max char height
          */
-        private getFontHeight;
+        private getFontHeight(font);
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

+ 51 - 51
dist/preview release/serializers/babylon.glTF2Serializer.d.ts

@@ -142,7 +142,7 @@ declare module BABYLON.GLTF2 {
          * Lazy load a local engine with premultiplied alpha set to false
          */
         _getLocalEngine(): Engine;
-        private reorderIndicesBasedOnPrimitiveMode;
+        private reorderIndicesBasedOnPrimitiveMode(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attribute data based on the primitive mode.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -154,7 +154,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderVertexAttributeDataBasedOnPrimitiveMode;
+        private reorderVertexAttributeDataBasedOnPrimitiveMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle mode order .  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -166,7 +166,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFillMode;
+        private reorderTriangleFillMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle strip order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -178,7 +178,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleStripDrawMode;
+        private reorderTriangleStripDrawMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle fan order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -190,7 +190,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFanMode;
+        private reorderTriangleFanMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Writes the vertex attribute data to binary
          * @param vertices The vertices to write to the binary writer
@@ -199,7 +199,7 @@ declare module BABYLON.GLTF2 {
          * @param meshAttributeArray The vertex attribute data
          * @param binaryWriter The writer containing the binary data
          */
-        private writeVertexAttributeData;
+        private writeVertexAttributeData(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
         /**
          * Writes mesh attribute data to a data buffer
          * Returns the bytelength of the data
@@ -208,7 +208,7 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter The buffer to write the binary data to
          * @param indices Used to specify the order of the vertex data
          */
-        private writeAttributeData;
+        private writeAttributeData(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
         /**
          * Generates glTF json data
          * @param shouldUseGlb Indicates whether the json should be written for a glb file
@@ -216,7 +216,7 @@ declare module BABYLON.GLTF2 {
          * @param prettyPrint Indicates whether the json file should be pretty printed (true) or not (false)
          * @returns json data as string
          */
-        private generateJSON;
+        private generateJSON(shouldUseGlb, glTFPrefix?, prettyPrint?);
         /**
          * Generates data for .gltf and .bin files based on the glTF prefix string
          * @param glTFPrefix Text to use when prefixing a glTF file
@@ -227,13 +227,13 @@ declare module BABYLON.GLTF2 {
          * Creates a binary buffer for glTF
          * @returns array buffer for binary data
          */
-        private _generateBinaryAsync;
+        private _generateBinaryAsync();
         /**
          * Pads the number to a multiple of 4
          * @param num number to pad
          * @returns padded number
          */
-        private _getPadding;
+        private _getPadding(num);
         /**
          * Generates a glb file from the json and binary data
          * Returns an object with the glb file name as the key and data as the value
@@ -246,47 +246,47 @@ declare module BABYLON.GLTF2 {
          * @param node glTF Node for storing the transformation data
          * @param babylonTransformNode Babylon mesh used as the source for the transformation data
          */
-        private setNodeTransformation;
-        private getVertexBufferFromMesh;
+        private setNodeTransformation(node, babylonTransformNode);
+        private getVertexBufferFromMesh(attributeKind, bufferMesh);
         /**
          * Creates a bufferview based on the vertices type for the Babylon mesh
          * @param kind Indicates the type of vertices data
          * @param babylonTransformNode The Babylon mesh to get the vertices data from
          * @param binaryWriter The buffer to write the bufferview data to
          */
-        private createBufferViewKind;
+        private createBufferViewKind(kind, babylonTransformNode, binaryWriter, byteStride);
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode;
+        private getMeshPrimitiveMode(babylonMesh);
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode;
+        private setPrimitiveMode(meshPrimitive, primitiveMode);
         /**
          * Sets the vertex attribute accessor based of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param attributeKind vertex attribute
          * @returns boolean specifying if uv coordinates are present
          */
-        private setAttributeKind;
+        private setAttributeKind(meshPrimitive, attributeKind);
         /**
          * Sets data for the primitive attributes of each submesh
          * @param mesh glTF Mesh object to store the primitive attribute information
          * @param babylonTransformNode Babylon mesh to get the primitive attribute data from
          * @param binaryWriter Buffer to write the attribute data to
          */
-        private setPrimitiveAttributes;
+        private setPrimitiveAttributes(mesh, babylonTransformNode, binaryWriter);
         /**
          * Creates a glTF scene based on the array of meshes
          * Returns the the total byte offset
          * @param babylonScene Babylon scene to get the mesh data from
          * @param binaryWriter Buffer to write binary data to
          */
-        private createSceneAsync;
+        private createSceneAsync(babylonScene, binaryWriter);
         /**
          * Creates a mapping of Node unique id to node index and handles animations
          * @param babylonScene Babylon Scene
@@ -295,14 +295,14 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter Buffer to write binary data to
          * @returns Node mapping of unique id to index
          */
-        private createNodeMapAndAnimations;
+        private createNodeMapAndAnimations(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
         /**
          * Creates a glTF node from a Babylon mesh
          * @param babylonMesh Source Babylon mesh
          * @param binaryWriter Buffer for storing geometry data
          * @returns glTF node
          */
-        private createNode;
+        private createNode(babylonTransformNode, binaryWriter);
     }
     /**
      * @hidden
@@ -331,7 +331,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer;
+        private resizeBuffer(byteLength);
         /**
          * Get an array buffer with the length of the byte offset
          * @returns ArrayBuffer resized to the byte offset
@@ -429,7 +429,7 @@ declare module BABYLON.GLTF2 {
          * @param color2 second color to compare to
          * @param epsilon threshold value
          */
-        private static FuzzyEquals;
+        private static FuzzyEquals(color1, color2, epsilon);
         /**
          * Gets the materials from a Babylon scene and converts them to glTF materials
          * @param scene babylonjs scene
@@ -503,7 +503,7 @@ declare module BABYLON.GLTF2 {
          * @param mimeType mimetype of the image
          * @returns base64 image string
          */
-        private _createBase64FromCanvasAsync;
+        private _createBase64FromCanvasAsync(buffer, width, height, mimeType);
         /**
          * Generates a white texture based on the specified width and height
          * @param width width of the texture in pixels
@@ -511,7 +511,7 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns white texture
          */
-        private _createWhiteTexture;
+        private _createWhiteTexture(width, height, scene);
         /**
          * Resizes the two source textures to the same dimensions.  If a texture is null, a default white texture is generated.  If both textures are null, returns null
          * @param texture1 first texture to resize
@@ -519,14 +519,14 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns resized textures or null
          */
-        private _resizeTexturesToSameDimensions;
+        private _resizeTexturesToSameDimensions(texture1, texture2, scene);
         /**
          * Converts an array of pixels to a Float32Array
          * Throws an error if the pixel format is not supported
          * @param pixels - array buffer containing pixel values
          * @returns Float32 of pixels
          */
-        private _convertPixelArrayToFloat32;
+        private _convertPixelArrayToFloat32(pixels);
         /**
          * Convert Specular Glossiness Textures to Metallic Roughness
          * See link below for info on the material conversions from PBR Metallic/Roughness and Specular/Glossiness
@@ -537,25 +537,25 @@ declare module BABYLON.GLTF2 {
          * @param mimeType the mime type to use for the texture
          * @returns pbr metallic roughness interface or null
          */
-        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync(diffuseTexture, specularGlossinessTexture, factors, mimeType);
         /**
          * Converts specular glossiness material properties to metallic roughness
          * @param specularGlossiness interface with specular glossiness material properties
          * @returns interface with metallic roughness material properties
          */
-        private _convertSpecularGlossinessToMetallicRoughness;
+        private _convertSpecularGlossinessToMetallicRoughness(specularGlossiness);
         /**
          * Calculates the surface reflectance, independent of lighting conditions
          * @param color Color source to calculate brightness from
          * @returns number representing the perceived brightness, or zero if color is undefined
          */
-        private _getPerceivedBrightness;
+        private _getPerceivedBrightness(color);
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent;
+        private _getMaxComponent(color);
         /**
          * Convert a PBRMaterial (Metallic/Roughness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -567,10 +567,10 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
-        private _getGLTFTextureSampler;
-        private _getGLTFTextureWrapMode;
-        private _getGLTFTextureWrapModesSampler;
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _getGLTFTextureSampler(texture);
+        private _getGLTFTextureWrapMode(wrapMode);
+        private _getGLTFTextureWrapModesSampler(texture);
         /**
          * Convert a PBRMaterial (Specular/Glossiness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -582,7 +582,7 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
         /**
          * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -594,8 +594,8 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          */
         _convertPBRMaterialAsync(babylonPBRMaterial: PBRMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<void>;
-        private setMetallicRoughnessPbrMaterial;
-        private getPixelsFromTexture;
+        private setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
+        private getPixelsFromTexture(babylonTexture);
         /**
          * Extracts a texture from a Babylon texture into file data and glTF data
          * @param babylonTexture Babylon texture to extract
@@ -605,7 +605,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image file name and data
          * @return glTF texture info, or null if the texture format is not supported
          */
-        private _exportTextureAsync;
+        private _exportTextureAsync(babylonTexture, mimeType);
         /**
          * Builds a texture from base64 string
          * @param base64Texture base64 texture string
@@ -616,7 +616,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image data
          * @returns glTF texture info, or null if the texture format is not supported
          */
-        private _getTextureInfoFromBase64;
+        private _getTextureInfoFromBase64(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
     }
 }
 
@@ -682,7 +682,7 @@ declare module BABYLON.GLTF2 {
          * @returns nullable IAnimationData
          */
         static _CreateNodeAnimation(babylonTransformNode: TransformNode, animation: Animation, animationChannelTargetPath: AnimationChannelTargetPath, convertToRightHandedSystem: boolean, useQuaternion: boolean, animationSampleRate: number): Nullable<_IAnimationData>;
-        private static _DeduceAnimationInfo;
+        private static _DeduceAnimationInfo(animation);
         /**
          * @ignore
          * Create node animations from the transform node animations
@@ -714,7 +714,7 @@ declare module BABYLON.GLTF2 {
         static _CreateNodeAnimationFromAnimationGroups(babylonScene: Scene, glTFAnimations: IAnimation[], nodeMap: {
             [key: number]: number;
         }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
-        private static AddAnimation;
+        private static AddAnimation(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
         /**
          * Create a baked animation
          * @param babylonTransformNode BabylonJS mesh
@@ -728,9 +728,9 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem converts the values to right-handed
          * @param useQuaternion specifies if quaternions should be used
          */
-        private static _CreateBakedAnimation;
-        private static _ConvertFactorToVector3OrQuaternion;
-        private static _SetInterpolatedValue;
+        private static _CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minFrame, maxFrame, fps, sampleRate, inputs, outputs, minMaxFrames, convertToRightHandedSystem, useQuaternion);
+        private static _ConvertFactorToVector3OrQuaternion(factor, babylonTransformNode, animation, animationType, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _SetInterpolatedValue(babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates linear animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -742,7 +742,7 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateLinearOrStepAnimation;
+        private static _CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates cubic spline animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -754,8 +754,8 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateCubicSplineAnimation;
-        private static _GetBasePositionRotationOrScale;
+        private static _CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -766,14 +766,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue;
+        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation;
+        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
         /**
          * Adds an input tangent or output tangent to the output data
          * If an input tangent or output tangent is missing, it uses the zero vector or zero quaternion
@@ -786,13 +786,13 @@ declare module BABYLON.GLTF2 {
          * @param useQuaternion Specifies if quaternions are used
          * @param convertToRightHandedSystem Specifies if the values should be converted to right-handed
          */
-        private static AddSplineTangent;
+        private static AddSplineTangent(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
         /**
          * Get the minimum and maximum key frames' frame values
          * @param keyFrames animation key frames
          * @returns the minimum and maximum key frame value
          */
-        private static calculateMinMaxKeyFrames;
+        private static calculateMinMaxKeyFrames(keyFrames);
     }
 }
 

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

@@ -150,7 +150,7 @@ declare module BABYLON.GLTF2 {
          * Lazy load a local engine with premultiplied alpha set to false
          */
         _getLocalEngine(): Engine;
-        private reorderIndicesBasedOnPrimitiveMode;
+        private reorderIndicesBasedOnPrimitiveMode(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attribute data based on the primitive mode.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -162,7 +162,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderVertexAttributeDataBasedOnPrimitiveMode;
+        private reorderVertexAttributeDataBasedOnPrimitiveMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle mode order .  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -174,7 +174,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFillMode;
+        private reorderTriangleFillMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle strip order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -186,7 +186,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleStripDrawMode;
+        private reorderTriangleStripDrawMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle fan order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -198,7 +198,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFanMode;
+        private reorderTriangleFanMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Writes the vertex attribute data to binary
          * @param vertices The vertices to write to the binary writer
@@ -207,7 +207,7 @@ declare module BABYLON.GLTF2 {
          * @param meshAttributeArray The vertex attribute data
          * @param binaryWriter The writer containing the binary data
          */
-        private writeVertexAttributeData;
+        private writeVertexAttributeData(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
         /**
          * Writes mesh attribute data to a data buffer
          * Returns the bytelength of the data
@@ -216,7 +216,7 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter The buffer to write the binary data to
          * @param indices Used to specify the order of the vertex data
          */
-        private writeAttributeData;
+        private writeAttributeData(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
         /**
          * Generates glTF json data
          * @param shouldUseGlb Indicates whether the json should be written for a glb file
@@ -224,7 +224,7 @@ declare module BABYLON.GLTF2 {
          * @param prettyPrint Indicates whether the json file should be pretty printed (true) or not (false)
          * @returns json data as string
          */
-        private generateJSON;
+        private generateJSON(shouldUseGlb, glTFPrefix?, prettyPrint?);
         /**
          * Generates data for .gltf and .bin files based on the glTF prefix string
          * @param glTFPrefix Text to use when prefixing a glTF file
@@ -235,13 +235,13 @@ declare module BABYLON.GLTF2 {
          * Creates a binary buffer for glTF
          * @returns array buffer for binary data
          */
-        private _generateBinaryAsync;
+        private _generateBinaryAsync();
         /**
          * Pads the number to a multiple of 4
          * @param num number to pad
          * @returns padded number
          */
-        private _getPadding;
+        private _getPadding(num);
         /**
          * Generates a glb file from the json and binary data
          * Returns an object with the glb file name as the key and data as the value
@@ -254,47 +254,47 @@ declare module BABYLON.GLTF2 {
          * @param node glTF Node for storing the transformation data
          * @param babylonTransformNode Babylon mesh used as the source for the transformation data
          */
-        private setNodeTransformation;
-        private getVertexBufferFromMesh;
+        private setNodeTransformation(node, babylonTransformNode);
+        private getVertexBufferFromMesh(attributeKind, bufferMesh);
         /**
          * Creates a bufferview based on the vertices type for the Babylon mesh
          * @param kind Indicates the type of vertices data
          * @param babylonTransformNode The Babylon mesh to get the vertices data from
          * @param binaryWriter The buffer to write the bufferview data to
          */
-        private createBufferViewKind;
+        private createBufferViewKind(kind, babylonTransformNode, binaryWriter, byteStride);
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode;
+        private getMeshPrimitiveMode(babylonMesh);
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode;
+        private setPrimitiveMode(meshPrimitive, primitiveMode);
         /**
          * Sets the vertex attribute accessor based of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param attributeKind vertex attribute
          * @returns boolean specifying if uv coordinates are present
          */
-        private setAttributeKind;
+        private setAttributeKind(meshPrimitive, attributeKind);
         /**
          * Sets data for the primitive attributes of each submesh
          * @param mesh glTF Mesh object to store the primitive attribute information
          * @param babylonTransformNode Babylon mesh to get the primitive attribute data from
          * @param binaryWriter Buffer to write the attribute data to
          */
-        private setPrimitiveAttributes;
+        private setPrimitiveAttributes(mesh, babylonTransformNode, binaryWriter);
         /**
          * Creates a glTF scene based on the array of meshes
          * Returns the the total byte offset
          * @param babylonScene Babylon scene to get the mesh data from
          * @param binaryWriter Buffer to write binary data to
          */
-        private createSceneAsync;
+        private createSceneAsync(babylonScene, binaryWriter);
         /**
          * Creates a mapping of Node unique id to node index and handles animations
          * @param babylonScene Babylon Scene
@@ -303,14 +303,14 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter Buffer to write binary data to
          * @returns Node mapping of unique id to index
          */
-        private createNodeMapAndAnimations;
+        private createNodeMapAndAnimations(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
         /**
          * Creates a glTF node from a Babylon mesh
          * @param babylonMesh Source Babylon mesh
          * @param binaryWriter Buffer for storing geometry data
          * @returns glTF node
          */
-        private createNode;
+        private createNode(babylonTransformNode, binaryWriter);
     }
     /**
      * @hidden
@@ -339,7 +339,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer;
+        private resizeBuffer(byteLength);
         /**
          * Get an array buffer with the length of the byte offset
          * @returns ArrayBuffer resized to the byte offset
@@ -437,7 +437,7 @@ declare module BABYLON.GLTF2 {
          * @param color2 second color to compare to
          * @param epsilon threshold value
          */
-        private static FuzzyEquals;
+        private static FuzzyEquals(color1, color2, epsilon);
         /**
          * Gets the materials from a Babylon scene and converts them to glTF materials
          * @param scene babylonjs scene
@@ -511,7 +511,7 @@ declare module BABYLON.GLTF2 {
          * @param mimeType mimetype of the image
          * @returns base64 image string
          */
-        private _createBase64FromCanvasAsync;
+        private _createBase64FromCanvasAsync(buffer, width, height, mimeType);
         /**
          * Generates a white texture based on the specified width and height
          * @param width width of the texture in pixels
@@ -519,7 +519,7 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns white texture
          */
-        private _createWhiteTexture;
+        private _createWhiteTexture(width, height, scene);
         /**
          * Resizes the two source textures to the same dimensions.  If a texture is null, a default white texture is generated.  If both textures are null, returns null
          * @param texture1 first texture to resize
@@ -527,14 +527,14 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns resized textures or null
          */
-        private _resizeTexturesToSameDimensions;
+        private _resizeTexturesToSameDimensions(texture1, texture2, scene);
         /**
          * Converts an array of pixels to a Float32Array
          * Throws an error if the pixel format is not supported
          * @param pixels - array buffer containing pixel values
          * @returns Float32 of pixels
          */
-        private _convertPixelArrayToFloat32;
+        private _convertPixelArrayToFloat32(pixels);
         /**
          * Convert Specular Glossiness Textures to Metallic Roughness
          * See link below for info on the material conversions from PBR Metallic/Roughness and Specular/Glossiness
@@ -545,25 +545,25 @@ declare module BABYLON.GLTF2 {
          * @param mimeType the mime type to use for the texture
          * @returns pbr metallic roughness interface or null
          */
-        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync(diffuseTexture, specularGlossinessTexture, factors, mimeType);
         /**
          * Converts specular glossiness material properties to metallic roughness
          * @param specularGlossiness interface with specular glossiness material properties
          * @returns interface with metallic roughness material properties
          */
-        private _convertSpecularGlossinessToMetallicRoughness;
+        private _convertSpecularGlossinessToMetallicRoughness(specularGlossiness);
         /**
          * Calculates the surface reflectance, independent of lighting conditions
          * @param color Color source to calculate brightness from
          * @returns number representing the perceived brightness, or zero if color is undefined
          */
-        private _getPerceivedBrightness;
+        private _getPerceivedBrightness(color);
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent;
+        private _getMaxComponent(color);
         /**
          * Convert a PBRMaterial (Metallic/Roughness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -575,10 +575,10 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
-        private _getGLTFTextureSampler;
-        private _getGLTFTextureWrapMode;
-        private _getGLTFTextureWrapModesSampler;
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _getGLTFTextureSampler(texture);
+        private _getGLTFTextureWrapMode(wrapMode);
+        private _getGLTFTextureWrapModesSampler(texture);
         /**
          * Convert a PBRMaterial (Specular/Glossiness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -590,7 +590,7 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
         /**
          * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -602,8 +602,8 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          */
         _convertPBRMaterialAsync(babylonPBRMaterial: PBRMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<void>;
-        private setMetallicRoughnessPbrMaterial;
-        private getPixelsFromTexture;
+        private setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
+        private getPixelsFromTexture(babylonTexture);
         /**
          * Extracts a texture from a Babylon texture into file data and glTF data
          * @param babylonTexture Babylon texture to extract
@@ -613,7 +613,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image file name and data
          * @return glTF texture info, or null if the texture format is not supported
          */
-        private _exportTextureAsync;
+        private _exportTextureAsync(babylonTexture, mimeType);
         /**
          * Builds a texture from base64 string
          * @param base64Texture base64 texture string
@@ -624,7 +624,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image data
          * @returns glTF texture info, or null if the texture format is not supported
          */
-        private _getTextureInfoFromBase64;
+        private _getTextureInfoFromBase64(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
     }
 }
 
@@ -690,7 +690,7 @@ declare module BABYLON.GLTF2 {
          * @returns nullable IAnimationData
          */
         static _CreateNodeAnimation(babylonTransformNode: TransformNode, animation: Animation, animationChannelTargetPath: AnimationChannelTargetPath, convertToRightHandedSystem: boolean, useQuaternion: boolean, animationSampleRate: number): Nullable<_IAnimationData>;
-        private static _DeduceAnimationInfo;
+        private static _DeduceAnimationInfo(animation);
         /**
          * @ignore
          * Create node animations from the transform node animations
@@ -722,7 +722,7 @@ declare module BABYLON.GLTF2 {
         static _CreateNodeAnimationFromAnimationGroups(babylonScene: Scene, glTFAnimations: IAnimation[], nodeMap: {
             [key: number]: number;
         }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
-        private static AddAnimation;
+        private static AddAnimation(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
         /**
          * Create a baked animation
          * @param babylonTransformNode BabylonJS mesh
@@ -736,9 +736,9 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem converts the values to right-handed
          * @param useQuaternion specifies if quaternions should be used
          */
-        private static _CreateBakedAnimation;
-        private static _ConvertFactorToVector3OrQuaternion;
-        private static _SetInterpolatedValue;
+        private static _CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minFrame, maxFrame, fps, sampleRate, inputs, outputs, minMaxFrames, convertToRightHandedSystem, useQuaternion);
+        private static _ConvertFactorToVector3OrQuaternion(factor, babylonTransformNode, animation, animationType, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _SetInterpolatedValue(babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates linear animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -750,7 +750,7 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateLinearOrStepAnimation;
+        private static _CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates cubic spline animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -762,8 +762,8 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateCubicSplineAnimation;
-        private static _GetBasePositionRotationOrScale;
+        private static _CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -774,14 +774,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue;
+        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation;
+        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
         /**
          * Adds an input tangent or output tangent to the output data
          * If an input tangent or output tangent is missing, it uses the zero vector or zero quaternion
@@ -794,13 +794,13 @@ declare module BABYLON.GLTF2 {
          * @param useQuaternion Specifies if quaternions are used
          * @param convertToRightHandedSystem Specifies if the values should be converted to right-handed
          */
-        private static AddSplineTangent;
+        private static AddSplineTangent(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
         /**
          * Get the minimum and maximum key frames' frame values
          * @param keyFrames animation key frames
          * @returns the minimum and maximum key frame value
          */
-        private static calculateMinMaxKeyFrames;
+        private static calculateMinMaxKeyFrames(keyFrames);
     }
 }
 

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

@@ -157,7 +157,7 @@ declare module BABYLON.GLTF2 {
          * Lazy load a local engine with premultiplied alpha set to false
          */
         _getLocalEngine(): Engine;
-        private reorderIndicesBasedOnPrimitiveMode;
+        private reorderIndicesBasedOnPrimitiveMode(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attribute data based on the primitive mode.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -169,7 +169,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderVertexAttributeDataBasedOnPrimitiveMode;
+        private reorderVertexAttributeDataBasedOnPrimitiveMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle mode order .  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -181,7 +181,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFillMode;
+        private reorderTriangleFillMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle strip order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -193,7 +193,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleStripDrawMode;
+        private reorderTriangleStripDrawMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Reorders the vertex attributes in the correct triangle fan order.  This is necessary when indices are not available and the winding order is
          * clock-wise during export to glTF
@@ -205,7 +205,7 @@ declare module BABYLON.GLTF2 {
          * @param byteOffset The offset to the binary data
          * @param binaryWriter The binary data for the glTF file
          */
-        private reorderTriangleFanMode;
+        private reorderTriangleFanMode(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
         /**
          * Writes the vertex attribute data to binary
          * @param vertices The vertices to write to the binary writer
@@ -214,7 +214,7 @@ declare module BABYLON.GLTF2 {
          * @param meshAttributeArray The vertex attribute data
          * @param binaryWriter The writer containing the binary data
          */
-        private writeVertexAttributeData;
+        private writeVertexAttributeData(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
         /**
          * Writes mesh attribute data to a data buffer
          * Returns the bytelength of the data
@@ -223,7 +223,7 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter The buffer to write the binary data to
          * @param indices Used to specify the order of the vertex data
          */
-        private writeAttributeData;
+        private writeAttributeData(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
         /**
          * Generates glTF json data
          * @param shouldUseGlb Indicates whether the json should be written for a glb file
@@ -231,7 +231,7 @@ declare module BABYLON.GLTF2 {
          * @param prettyPrint Indicates whether the json file should be pretty printed (true) or not (false)
          * @returns json data as string
          */
-        private generateJSON;
+        private generateJSON(shouldUseGlb, glTFPrefix?, prettyPrint?);
         /**
          * Generates data for .gltf and .bin files based on the glTF prefix string
          * @param glTFPrefix Text to use when prefixing a glTF file
@@ -242,13 +242,13 @@ declare module BABYLON.GLTF2 {
          * Creates a binary buffer for glTF
          * @returns array buffer for binary data
          */
-        private _generateBinaryAsync;
+        private _generateBinaryAsync();
         /**
          * Pads the number to a multiple of 4
          * @param num number to pad
          * @returns padded number
          */
-        private _getPadding;
+        private _getPadding(num);
         /**
          * Generates a glb file from the json and binary data
          * Returns an object with the glb file name as the key and data as the value
@@ -261,47 +261,47 @@ declare module BABYLON.GLTF2 {
          * @param node glTF Node for storing the transformation data
          * @param babylonTransformNode Babylon mesh used as the source for the transformation data
          */
-        private setNodeTransformation;
-        private getVertexBufferFromMesh;
+        private setNodeTransformation(node, babylonTransformNode);
+        private getVertexBufferFromMesh(attributeKind, bufferMesh);
         /**
          * Creates a bufferview based on the vertices type for the Babylon mesh
          * @param kind Indicates the type of vertices data
          * @param babylonTransformNode The Babylon mesh to get the vertices data from
          * @param binaryWriter The buffer to write the bufferview data to
          */
-        private createBufferViewKind;
+        private createBufferViewKind(kind, babylonTransformNode, binaryWriter, byteStride);
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode;
+        private getMeshPrimitiveMode(babylonMesh);
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode;
+        private setPrimitiveMode(meshPrimitive, primitiveMode);
         /**
          * Sets the vertex attribute accessor based of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param attributeKind vertex attribute
          * @returns boolean specifying if uv coordinates are present
          */
-        private setAttributeKind;
+        private setAttributeKind(meshPrimitive, attributeKind);
         /**
          * Sets data for the primitive attributes of each submesh
          * @param mesh glTF Mesh object to store the primitive attribute information
          * @param babylonTransformNode Babylon mesh to get the primitive attribute data from
          * @param binaryWriter Buffer to write the attribute data to
          */
-        private setPrimitiveAttributes;
+        private setPrimitiveAttributes(mesh, babylonTransformNode, binaryWriter);
         /**
          * Creates a glTF scene based on the array of meshes
          * Returns the the total byte offset
          * @param babylonScene Babylon scene to get the mesh data from
          * @param binaryWriter Buffer to write binary data to
          */
-        private createSceneAsync;
+        private createSceneAsync(babylonScene, binaryWriter);
         /**
          * Creates a mapping of Node unique id to node index and handles animations
          * @param babylonScene Babylon Scene
@@ -310,14 +310,14 @@ declare module BABYLON.GLTF2 {
          * @param binaryWriter Buffer to write binary data to
          * @returns Node mapping of unique id to index
          */
-        private createNodeMapAndAnimations;
+        private createNodeMapAndAnimations(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
         /**
          * Creates a glTF node from a Babylon mesh
          * @param babylonMesh Source Babylon mesh
          * @param binaryWriter Buffer for storing geometry data
          * @returns glTF node
          */
-        private createNode;
+        private createNode(babylonTransformNode, binaryWriter);
     }
     /**
      * @hidden
@@ -346,7 +346,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer;
+        private resizeBuffer(byteLength);
         /**
          * Get an array buffer with the length of the byte offset
          * @returns ArrayBuffer resized to the byte offset
@@ -444,7 +444,7 @@ declare module BABYLON.GLTF2 {
          * @param color2 second color to compare to
          * @param epsilon threshold value
          */
-        private static FuzzyEquals;
+        private static FuzzyEquals(color1, color2, epsilon);
         /**
          * Gets the materials from a Babylon scene and converts them to glTF materials
          * @param scene babylonjs scene
@@ -518,7 +518,7 @@ declare module BABYLON.GLTF2 {
          * @param mimeType mimetype of the image
          * @returns base64 image string
          */
-        private _createBase64FromCanvasAsync;
+        private _createBase64FromCanvasAsync(buffer, width, height, mimeType);
         /**
          * Generates a white texture based on the specified width and height
          * @param width width of the texture in pixels
@@ -526,7 +526,7 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns white texture
          */
-        private _createWhiteTexture;
+        private _createWhiteTexture(width, height, scene);
         /**
          * Resizes the two source textures to the same dimensions.  If a texture is null, a default white texture is generated.  If both textures are null, returns null
          * @param texture1 first texture to resize
@@ -534,14 +534,14 @@ declare module BABYLON.GLTF2 {
          * @param scene babylonjs scene
          * @returns resized textures or null
          */
-        private _resizeTexturesToSameDimensions;
+        private _resizeTexturesToSameDimensions(texture1, texture2, scene);
         /**
          * Converts an array of pixels to a Float32Array
          * Throws an error if the pixel format is not supported
          * @param pixels - array buffer containing pixel values
          * @returns Float32 of pixels
          */
-        private _convertPixelArrayToFloat32;
+        private _convertPixelArrayToFloat32(pixels);
         /**
          * Convert Specular Glossiness Textures to Metallic Roughness
          * See link below for info on the material conversions from PBR Metallic/Roughness and Specular/Glossiness
@@ -552,25 +552,25 @@ declare module BABYLON.GLTF2 {
          * @param mimeType the mime type to use for the texture
          * @returns pbr metallic roughness interface or null
          */
-        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync(diffuseTexture, specularGlossinessTexture, factors, mimeType);
         /**
          * Converts specular glossiness material properties to metallic roughness
          * @param specularGlossiness interface with specular glossiness material properties
          * @returns interface with metallic roughness material properties
          */
-        private _convertSpecularGlossinessToMetallicRoughness;
+        private _convertSpecularGlossinessToMetallicRoughness(specularGlossiness);
         /**
          * Calculates the surface reflectance, independent of lighting conditions
          * @param color Color source to calculate brightness from
          * @returns number representing the perceived brightness, or zero if color is undefined
          */
-        private _getPerceivedBrightness;
+        private _getPerceivedBrightness(color);
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent;
+        private _getMaxComponent(color);
         /**
          * Convert a PBRMaterial (Metallic/Roughness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -582,10 +582,10 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
-        private _getGLTFTextureSampler;
-        private _getGLTFTextureWrapMode;
-        private _getGLTFTextureWrapModesSampler;
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _getGLTFTextureSampler(texture);
+        private _getGLTFTextureWrapMode(wrapMode);
+        private _getGLTFTextureWrapModesSampler(texture);
         /**
          * Convert a PBRMaterial (Specular/Glossiness) to Metallic Roughness factors
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -597,7 +597,7 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          * @returns glTF PBR Metallic Roughness factors
          */
-        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
         /**
          * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
          * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -609,8 +609,8 @@ declare module BABYLON.GLTF2 {
          * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
          */
         _convertPBRMaterialAsync(babylonPBRMaterial: PBRMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<void>;
-        private setMetallicRoughnessPbrMaterial;
-        private getPixelsFromTexture;
+        private setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
+        private getPixelsFromTexture(babylonTexture);
         /**
          * Extracts a texture from a Babylon texture into file data and glTF data
          * @param babylonTexture Babylon texture to extract
@@ -620,7 +620,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image file name and data
          * @return glTF texture info, or null if the texture format is not supported
          */
-        private _exportTextureAsync;
+        private _exportTextureAsync(babylonTexture, mimeType);
         /**
          * Builds a texture from base64 string
          * @param base64Texture base64 texture string
@@ -631,7 +631,7 @@ declare module BABYLON.GLTF2 {
          * @param imageData map of image data
          * @returns glTF texture info, or null if the texture format is not supported
          */
-        private _getTextureInfoFromBase64;
+        private _getTextureInfoFromBase64(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
     }
 }
 
@@ -697,7 +697,7 @@ declare module BABYLON.GLTF2 {
          * @returns nullable IAnimationData
          */
         static _CreateNodeAnimation(babylonTransformNode: TransformNode, animation: Animation, animationChannelTargetPath: AnimationChannelTargetPath, convertToRightHandedSystem: boolean, useQuaternion: boolean, animationSampleRate: number): Nullable<_IAnimationData>;
-        private static _DeduceAnimationInfo;
+        private static _DeduceAnimationInfo(animation);
         /**
          * @ignore
          * Create node animations from the transform node animations
@@ -729,7 +729,7 @@ declare module BABYLON.GLTF2 {
         static _CreateNodeAnimationFromAnimationGroups(babylonScene: Scene, glTFAnimations: IAnimation[], nodeMap: {
             [key: number]: number;
         }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
-        private static AddAnimation;
+        private static AddAnimation(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
         /**
          * Create a baked animation
          * @param babylonTransformNode BabylonJS mesh
@@ -743,9 +743,9 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem converts the values to right-handed
          * @param useQuaternion specifies if quaternions should be used
          */
-        private static _CreateBakedAnimation;
-        private static _ConvertFactorToVector3OrQuaternion;
-        private static _SetInterpolatedValue;
+        private static _CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minFrame, maxFrame, fps, sampleRate, inputs, outputs, minMaxFrames, convertToRightHandedSystem, useQuaternion);
+        private static _ConvertFactorToVector3OrQuaternion(factor, babylonTransformNode, animation, animationType, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _SetInterpolatedValue(babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates linear animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -757,7 +757,7 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateLinearOrStepAnimation;
+        private static _CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
         /**
          * Creates cubic spline animation from the animation key frames
          * @param babylonTransformNode BabylonJS mesh
@@ -769,8 +769,8 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
          * @param useQuaternion Specifies if quaternions are used in the animation
          */
-        private static _CreateCubicSplineAnimation;
-        private static _GetBasePositionRotationOrScale;
+        private static _CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -781,14 +781,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue;
+        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation;
+        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
         /**
          * Adds an input tangent or output tangent to the output data
          * If an input tangent or output tangent is missing, it uses the zero vector or zero quaternion
@@ -801,13 +801,13 @@ declare module BABYLON.GLTF2 {
          * @param useQuaternion Specifies if quaternions are used
          * @param convertToRightHandedSystem Specifies if the values should be converted to right-handed
          */
-        private static AddSplineTangent;
+        private static AddSplineTangent(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
         /**
          * Get the minimum and maximum key frames' frame values
          * @param keyFrames animation key frames
          * @returns the minimum and maximum key frame value
          */
-        private static calculateMinMaxKeyFrames;
+        private static calculateMinMaxKeyFrames(keyFrames);
     }
 }
 

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

@@ -12,8 +12,6 @@ declare module BabylonViewer {
         *
         * An HTML-Based viewer for 3D models, based on BabylonJS and its extensions.
         */
-    import 'babylonjs-loaders';
-    import 'pepjs';
     let disableInit: boolean;
     /**
         * Dispose all viewers currently registered

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
gui/src/2D/controls/control.ts

@@ -915,7 +915,7 @@ export class Control {
         }
 
         if (this._alphaSet) {
-            context.globalAlpha = this._alpha;
+            context.globalAlpha = this.parent ? this.parent.alpha * this._alpha : this._alpha;
         }
     }
 

+ 6 - 2
src/Cameras/babylon.targetCamera.ts

@@ -298,12 +298,16 @@
         protected _computeViewMatrix(position: Vector3, target: Vector3, up: Vector3): void {
             if (this.parent) {
                 const parentWorldMatrix = this.parent.getWorldMatrix();
-                Vector3.TransformCoordinatesToRef(this.position, parentWorldMatrix, this._globalPosition);
+                Vector3.TransformCoordinatesToRef(position, parentWorldMatrix, this._globalPosition);
                 Vector3.TransformCoordinatesToRef(target, parentWorldMatrix, this._globalCurrentTarget);
                 Vector3.TransformNormalToRef(up, parentWorldMatrix, this._globalCurrentUpVector);
                 this._markSyncedWithParent();
             } else {
-                this._globalPosition.copyFrom(this.position);
+                if (Scalar.WithinEpsilon(position.y, target.y, BABYLON.Epsilon) && Scalar.WithinEpsilon(position.z, target.z, BABYLON.Epsilon)) {
+                    position.z += BABYLON.Epsilon;
+                }
+
+                this._globalPosition.copyFrom(position);
                 this._globalCurrentTarget.copyFrom(target);
                 this._globalCurrentUpVector.copyFrom(up);
             }