فهرست منبع

Merge branch 'master' into dev_support_webgl2_textures

Nicolas 7 سال پیش
والد
کامیت
d2570e5703
100فایلهای تغییر یافته به همراه14664 افزوده شده و 19547 حذف شده
  1. 1 0
      .travis.yml
  2. 3561 2999
      Playground/babylon.d.txt
  3. 1 1
      Tools/Gulp/gulp-addDtsExport.js
  4. 2 2
      Tools/Gulp/gulp-addES6Exports.js
  5. 1 1
      Tools/Gulp/gulp-addModuleExports.js
  6. 1 1
      Tools/Gulp/gulp-appendSrcToVariable.js
  7. 1 1
      Tools/Gulp/gulp-babylonModule.js
  8. 1 1
      Tools/Gulp/gulp-decorateAndExtends.js
  9. 1 1
      Tools/Gulp/gulp-dtsModuleSupport.js
  10. 1 1
      Tools/Gulp/gulp-es6ModuleExports.js
  11. 42 42
      Tools/Gulp/gulp-removeShaderComments.js
  12. 30 30
      Tools/Gulp/gulp-validateTypedoc.js
  13. 293 154
      Tools/Gulp/gulpfile.js
  14. 26 35
      Tools/Gulp/package.json
  15. 7 1
      Tools/Publisher/index.js
  16. 18 17
      Tools/Publisher/package.json
  17. 2759 2655
      dist/preview release/babylon.d.ts
  18. 1 65
      dist/preview release/babylon.js
  19. 294 41
      dist/preview release/babylon.max.js
  20. 294 42
      dist/preview release/babylon.no-module.max.js
  21. 1 67
      dist/preview release/babylon.worker.js
  22. 297 44
      dist/preview release/es6.js
  23. 170 2
      dist/preview release/gui/babylon.gui.d.ts
  24. 2 9165
      dist/preview release/gui/babylon.gui.js
  25. 1 1
      dist/preview release/gui/babylon.gui.min.js
  26. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  27. 354 4
      dist/preview release/gui/babylon.gui.module.d.ts
  28. 34 34
      dist/preview release/loaders/babylon.glTF1FileLoader.d.ts
  29. 1 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  30. 584 294
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  31. 955 896
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  32. 1 3
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  33. 601 311
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  34. 963 896
      dist/preview release/loaders/babylon.glTFFileLoader.js
  35. 1 4
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  36. 3 3
      dist/preview release/loaders/babylon.objFileLoader.d.ts
  37. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  38. 3 3
      dist/preview release/loaders/babylon.stlFileLoader.d.ts
  39. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  40. 607 317
      dist/preview release/loaders/babylonjs.loaders.d.ts
  41. 960 803
      dist/preview release/loaders/babylonjs.loaders.js
  42. 1 4
      dist/preview release/loaders/babylonjs.loaders.min.js
  43. 607 317
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  44. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  46. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  47. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  48. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  49. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  50. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  51. 1 1
      dist/preview release/materialsLibrary/babylon.mixMaterial.min.js
  52. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  53. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  54. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  55. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  56. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  58. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts
  59. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  60. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.d.ts
  61. 1 6
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  62. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts
  63. 2 2
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts
  64. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  65. 2 2
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts
  66. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  67. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.d.ts
  68. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  69. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.module.d.ts
  70. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js
  71. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js
  72. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js
  73. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js
  74. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js
  75. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.min.js
  76. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.min.js
  77. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js
  78. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js
  79. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js
  80. 1 1
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js
  81. 51 51
      dist/preview release/serializers/babylon.glTF2Serializer.d.ts
  82. 1 2
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  83. 1 1
      dist/preview release/serializers/babylon.objSerializer.min.js
  84. 51 51
      dist/preview release/serializers/babylonjs.serializers.d.ts
  85. 1 2
      dist/preview release/serializers/babylonjs.serializers.min.js
  86. 51 51
      dist/preview release/serializers/babylonjs.serializers.module.d.ts
  87. 2 12
      dist/preview release/typedocValidationBaseline.json
  88. 19 5
      dist/preview release/viewer/babylon.viewer.d.ts
  89. 3 3
      dist/preview release/viewer/babylon.viewer.js
  90. 6 6
      dist/preview release/viewer/babylon.viewer.max.js
  91. 22 5
      dist/preview release/viewer/babylon.viewer.module.d.ts
  92. 13 5
      dist/preview release/what's new.md
  93. 11 3
      gui/src/2D/advancedDynamicTexture.ts
  94. 32 0
      gui/src/2D/controls/checkbox.ts
  95. 14 0
      gui/src/2D/controls/container.ts
  96. 71 37
      gui/src/2D/controls/displayGrid.ts
  97. 374 0
      gui/src/3D/charting/barGraph.ts
  98. 250 0
      gui/src/3D/charting/chart.ts
  99. 162 0
      gui/src/3D/charting/dataSeries.ts
  100. 0 0
      gui/src/3D/charting/index.ts

+ 1 - 0
.travis.yml

@@ -33,6 +33,7 @@ jobs:
     - gulp tests-unit
     - travis_retry gulp tests-validation-virtualscreen
     - travis_retry gulp tests-validation-browserstack
+    - gulp tests-modules
     - travis_retry gulp tests-viewer-validation-virtualscreen
     - travis_retry gulp tests-viewer-validation-browserstack
 notifications:

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


+ 1 - 1
Tools/Gulp/gulp-addDtsExport.js

@@ -46,7 +46,7 @@ declare module '${moduleName}' {
         }
 
         try {
-            file.contents = new Buffer(moduleExportsAddition + String(file.contents));
+            file.contents = Buffer.from(moduleExportsAddition + String(file.contents));
             this.push(file);
 
         } catch (err) {

+ 2 - 2
Tools/Gulp/gulp-addES6Exports.js

@@ -75,10 +75,10 @@ ${exportsText}
         try {
             if (externalUsingBabylon) {
                 //file.contents = new Buffer(optionalRequire.concat(String(file.contents)));
-                file.contents = new Buffer(optionalRequire.concat(new Buffer(String(file.contents).concat(moduleExportAddition(baseModule)))));
+                file.contents = Buffer.from(optionalRequire.concat(Buffer.from(String(file.contents).concat(moduleExportAddition(baseModule)))));
             } else {
                 let pretext = subModule ? optionalRequire : '';
-                file.contents = new Buffer(pretext.concat(decorateAddition).concat(new Buffer(extendsAddition.concat(String(file.contents)).concat(moduleExportAddition(baseModule)))));
+                file.contents = Buffer.from(pretext.concat(decorateAddition).concat(Buffer.from(extendsAddition.concat(String(file.contents)).concat(moduleExportAddition(baseModule)))));
             }
             this.push(file);
         } catch (err) {

+ 1 - 1
Tools/Gulp/gulp-addModuleExports.js

@@ -99,7 +99,7 @@ if(typeof earcut !== 'undefined') {
 
         try {
             //if (config.externalUsingBabylon) {
-            file.contents = new Buffer(String('').concat(moduleExportAddition(varName)));
+            file.contents = Buffer.from(String('').concat(moduleExportAddition(varName)));
             /*} else {
                 let pretext = '';
                 file.contents = new Buffer(decorateAddition.concat(new Buffer(extendsAddition.concat(String('')).concat(moduleExportAddition(varName)))));

+ 1 - 1
Tools/Gulp/gulp-appendSrcToVariable.js

@@ -85,7 +85,7 @@ module.exports["${name}"] = data;
             cwd: firstFile.cwd,
             base: firstFile.base,
             path: joinedPath,
-            contents: new Buffer(content)
+            contents: Buffer.from(content)
         });
 
         this.push(joinedFile);

+ 1 - 1
Tools/Gulp/gulp-babylonModule.js

@@ -123,7 +123,7 @@ if(typeof require !== 'undefined'){
         }
 
         try {
-            file.contents = new Buffer(dependenciesText.concat(new Buffer(String(content).concat(exportsText))));
+            file.contents = Buffer.from(dependenciesText.concat(Buffer.from(String(content).concat(exportsText))));
             this.push(file);
         } catch (err) {
             this.emit('error', new gutil.PluginError('gulp-add-babylon-module', err, { fileName: file.path }));

+ 1 - 1
Tools/Gulp/gulp-decorateAndExtends.js

@@ -27,7 +27,7 @@ module.exports = function (varName, config) {
         }
 
         try {
-            file.contents = new Buffer(decorateAddition.concat(extendsAddition).concat(file.contents));
+            file.contents = Buffer.from(decorateAddition.concat(extendsAddition).concat(file.contents));
             this.push(file);
         } catch (err) {
             this.emit('error', new gutil.PluginError('gulp-decorate-and-extends', err, { fileName: file.path }));

+ 1 - 1
Tools/Gulp/gulp-dtsModuleSupport.js

@@ -84,7 +84,7 @@ module.exports = function (moduleName, inject, declarations, perFile, dependency
         }
 
         try {
-            file.contents = new Buffer(String(file.contents) + '\n' + importsString);
+            file.contents = Buffer.from(String(file.contents) + '\n' + importsString);
             this.push(file);
 
         } catch (err) {

+ 1 - 1
Tools/Gulp/gulp-es6ModuleExports.js

@@ -204,7 +204,7 @@ globalObject["BABYLON"] = BABYLON;
         }
 
         try {
-            file.contents = new Buffer(dependenciesText.concat(new Buffer(String(content).concat(exportsText))));
+            file.contents = Buffer.from(dependenciesText.concat(Buffer.from(String(content).concat(exportsText))));
             this.push(file);
         } catch (err) {
             this.emit('error', new gutil.PluginError('gulp-es6-module-exports', err, { fileName: file.path }));

+ 42 - 42
Tools/Gulp/gulp-removeShaderComments.js

@@ -8,12 +8,12 @@ var multiComment = 2;
 function uncomment(str, opts) {
     opts = opts || {};
 
-	var currentChar;
-	var nextChar;
-	var insideString = false;
-	var insideComment = 0;
-	var offset = 0;
-	var ret = '';
+    var currentChar;
+    var nextChar;
+    var insideString = false;
+    var insideComment = 0;
+    var offset = 0;
+    var ret = '';
 
     str = str.replace(/\r\n/g, '\n');
     str = str.replace(/[ \f\t\v]+/g, ' ');
@@ -34,45 +34,45 @@ function uncomment(str, opts) {
     str = str.replace(/, /g, ',');
     str = str.replace(/\n\n/g, '\n');
     str = str.replace(/\n /g, '\n');
-    
-	for (var i = 0; i < str.length; i++) {
-		currentChar = str[i];
-		nextChar = str[i + 1];
 
-		if (!insideComment && currentChar === '"') {
-			var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\';
-			if (!escaped) {
-				insideString = !insideString;
-			}
-		}
+    for (var i = 0; i < str.length; i++) {
+        currentChar = str[i];
+        nextChar = str[i + 1];
 
-		if (insideString) {
-			continue;
-		}
+        if (!insideComment && currentChar === '"') {
+            var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\';
+            if (!escaped) {
+                insideString = !insideString;
+            }
+        }
+
+        if (insideString) {
+            continue;
+        }
 
-		if (!insideComment && currentChar + nextChar === '//') {
-			ret += str.slice(offset, i);
-			offset = i;
-			insideComment = singleComment;
-			i++;
-		} else if (insideComment === singleComment && currentChar === '\n') {
-			insideComment = 0;
-			offset = i;
-		} else if (!insideComment && currentChar + nextChar === '/*') {
-			ret += str.slice(offset, i);
-			offset = i;
-			insideComment = multiComment;
-			i++;
-			continue;
-		} else if (insideComment === multiComment && currentChar + nextChar === '*/') {
-			i++;
-			insideComment = 0;
-			offset = i + 1;
-			continue;
-		}
-	}
+        if (!insideComment && currentChar + nextChar === '//') {
+            ret += str.slice(offset, i);
+            offset = i;
+            insideComment = singleComment;
+            i++;
+        } else if (insideComment === singleComment && currentChar === '\n') {
+            insideComment = 0;
+            offset = i;
+        } else if (!insideComment && currentChar + nextChar === '/*') {
+            ret += str.slice(offset, i);
+            offset = i;
+            insideComment = multiComment;
+            i++;
+            continue;
+        } else if (insideComment === multiComment && currentChar + nextChar === '*/') {
+            i++;
+            insideComment = 0;
+            offset = i + 1;
+            continue;
+        }
+    }
 
-	return ret + (insideComment ? '' : str.substr(offset));
+    return ret + (insideComment ? '' : str.substr(offset));
 }
 
 function gulpUncomment(options) {
@@ -88,7 +88,7 @@ function main(options, func) {
         if (file.isStream()) {
             cb(new PluginError("Remove Shader Comments", "Streaming not supported."));
         }
-        file.contents = new Buffer(func(file.contents.toString(), options));
+        file.contents = Buffer.from(func(file.contents.toString(), options));
         this.push(file);
         return cb();
     });

+ 30 - 30
Tools/Gulp/gulp-validateTypedoc.js

@@ -11,19 +11,19 @@ var supportsColor = require('color-support');
 
 var hasColors = supportsColor();
 
-var red =       hasColors ? '\x1b[31m' : '';
-var yellow =    hasColors ? '\x1b[33m' : '';
-var green =     hasColors ? '\x1b[32m' : '';
-var gray =      hasColors ? '\x1b[90m' : '';
-var white =     hasColors ? '\x1b[97m' : '';
-var clear =     hasColors ? '\x1b[0m' : '';
+var red = hasColors ? '\x1b[31m' : '';
+var yellow = hasColors ? '\x1b[33m' : '';
+var green = hasColors ? '\x1b[32m' : '';
+var gray = hasColors ? '\x1b[90m' : '';
+var white = hasColors ? '\x1b[97m' : '';
+var clear = hasColors ? '\x1b[0m' : '';
 
 var currentColor = undefined;
 
 function getTimestamp() {
     var time = new Date();
-    var timeInString = ("0" + time.getHours()).slice(-2) + ":" + 
-        ("0" + time.getMinutes()).slice(-2) + ":" + 
+    var timeInString = ("0" + time.getHours()).slice(-2) + ":" +
+        ("0" + time.getMinutes()).slice(-2) + ":" +
         ("0" + time.getSeconds()).slice(-2);
 
     if (currentColor) {
@@ -59,7 +59,7 @@ function err() {
     var time = getTimestamp();
     process.stderr.write(time + ' ');
     currentColor = undefined;
-    
+
     console.error.apply(console, arguments);
     return this;
 }
@@ -86,13 +86,13 @@ function Validate(validationBaselineFileName, namespaceName, validateNamingConve
     this.validateNamingConvention = validateNamingConvention;
     this.generateBaseLine = generateBaseLine;
 
-    this.previousResults = { };
+    this.previousResults = {};
     this.results = {
         errors: 0
     };
 }
 
-Validate.hasTag = function(node, tagName) {
+Validate.hasTag = function (node, tagName) {
     tagName = tagName.trim().toLowerCase();
 
     if (node.comment && node.comment.tags) {
@@ -106,7 +106,7 @@ Validate.hasTag = function(node, tagName) {
     return false;
 }
 
-Validate.position = function(node) {
+Validate.position = function (node) {
     if (!node.sources) {
         log(node);
     }
@@ -126,12 +126,12 @@ Validate.prototype.errorCallback = function (parent, node, nodeKind, category, t
     if (node === "toString") {
         node = "ToString";
     }
-    
+
     // Checks against previous results.
     var previousResults = this.previousResults[this.filePath];
     if (previousResults) {
         var previousRootName = parent ? parent : node;
-        var needCheck = true; 
+        var needCheck = true;
 
         if (Array.isArray(previousRootName)) {
             while (previousRootName.length > 1) {
@@ -165,7 +165,7 @@ Validate.prototype.errorCallback = function (parent, node, nodeKind, category, t
                             if (previousType) {
                                 // Early exit as it was already in the previous build.
                                 return;
-                            }    
+                            }
                         }
                     }
                 }
@@ -179,19 +179,19 @@ Validate.prototype.errorCallback = function (parent, node, nodeKind, category, t
     if (Array.isArray(rootName)) {
         while (rootName.length > 1) {
             var first = rootName.shift();
-            current = current[first] = current[first] || { };
+            current = current[first] = current[first] || {};
         }
         rootName = rootName.shift();
     }
 
-    current = current[rootName] = current[rootName] || { };
-    current = current[nodeKind] = current[nodeKind] || { };    
+    current = current[rootName] = current[rootName] || {};
+    current = current[nodeKind] = current[nodeKind] || {};
     if (parent) {
-        current = current[node] = current[node] || { };
+        current = current[node] = current[node] || {};
     }
-    current = current[category] = current[category] || { };
+    current = current[category] = current[category] || {};
     current = current[type] = true;
-    
+
     results.errors++;
 
     if (!this.generateBaseLine) {
@@ -216,7 +216,7 @@ Validate.prototype.add = function (filePath, content) {
     this.filePath = filePath && unixStylePath(filePath);
 
     if (!Buffer.isBuffer(content)) {
-        content = new Buffer(content);
+        content = Buffer.from(content);
     }
 
     var contentString = content.toString();
@@ -271,7 +271,7 @@ Validate.prototype.validateTypedocNamespaces = function (namespaces) {
 /**
  * Validate classes and modules attach to a declaration file from a TypeDoc JSON file
  */
-Validate.prototype.validateTypedocNamespace = function(namespace) {
+Validate.prototype.validateTypedocNamespace = function (namespace) {
     var containerNode;
     var childNode;
     var children;
@@ -294,7 +294,7 @@ Validate.prototype.validateTypedocNamespace = function(namespace) {
         if (!containerNode.flags.isPublic &&
             !containerNode.flags.isPrivate &&
             !containerNode.flags.isProtected) {
-                containerNode.flags.isPublic = true;
+            containerNode.flags.isPublic = true;
         }
         isPublic = containerNode.flags.isPublic;
 
@@ -408,7 +408,7 @@ Validate.prototype.validateTypedocNamespace = function(namespace) {
 /**
  * Validate that tags are recognized
  */
-Validate.prototype.validateTags = function(node) {
+Validate.prototype.validateTags = function (node) {
     var tags;
     var errorTags = [];
 
@@ -433,7 +433,7 @@ Validate.prototype.validateTags = function(node) {
 /**
  * Validate that a JSON node has the correct TypeDoc comments
  */
-Validate.prototype.validateComment = function(node) {
+Validate.prototype.validateComment = function (node) {
 
     // Return-only methods are allowed to just have a @return tag
     if ((node.kindString === "Call signature" || node.kindString === "Accessor") && !node.parameters && node.comment && node.comment.returns) {
@@ -453,7 +453,7 @@ Validate.prototype.validateComment = function(node) {
     // Return true for overwrited properties
     if (node.overwrites) {
         return true;
-    } 
+    }
 
     // Check comments.
     if (node.comment) {
@@ -475,7 +475,7 @@ Validate.prototype.validateComment = function(node) {
 /**
  * Validate comments for paramters on a node
  */
-Validate.prototype.validateParameters = function(containerNode, method, signature, parameters, isPublic) {
+Validate.prototype.validateParameters = function (containerNode, method, signature, parameters, isPublic) {
     var parametersNode;
     for (var parameter in parameters) {
         parametersNode = parameters[parameter];
@@ -504,7 +504,7 @@ Validate.prototype.validateParameters = function(containerNode, method, signatur
 /**
  * Validate naming conventions of a node
  */
-Validate.prototype.validateNaming = function(parent, node) {
+Validate.prototype.validateNaming = function (parent, node) {
     if (!this.validateNamingConvention) {
         return;
     }
@@ -712,7 +712,7 @@ function gulpValidateTypedoc(validationBaselineFileName, namespaceName, validate
 
         var action = generateBaseLine ? "baseline generation" : "validation";
         var self = this;
-        var error = function(message) {
+        var error = function (message) {
             generateBaseLine ? warn : err;
             if (generateBaseLine) {
                 warn(message);

+ 293 - 154
Tools/Gulp/gulpfile.js

@@ -16,7 +16,6 @@ var merge2 = require("merge2");
 var concat = require("gulp-concat");
 var rename = require("gulp-rename");
 var cleants = require("gulp-clean-ts-extends");
-var runSequence = require("run-sequence");
 var replace = require("gulp-replace");
 var uncommentShader = require("./gulp-removeShaderComments");
 var expect = require("gulp-expect-file");
@@ -181,7 +180,7 @@ gulp.task("includeShaders", function (cb) {
     cb();
 });
 
-gulp.task("shaders", ["includeShaders"], function (cb) {
+gulp.task("shaders", gulp.series("includeShaders", function (cb) {
     var filesToProcess = determineFilesToProcess("shaders");
     shadersStream = gulp.src(filesToProcess).
         pipe(expect.real({ errorOnFailure: true }, filesToProcess)).
@@ -190,7 +189,7 @@ gulp.task("shaders", ["includeShaders"], function (cb) {
             variableName: "BABYLON.Effect.ShadersStore", asMap: true, namingCallback: shadersName
         }));
     cb();
-});
+}));
 
 gulp.task("workers", function (cb) {
     workersStream = config.workers.map(function (workerDef) {
@@ -207,7 +206,7 @@ gulp.task("workers", function (cb) {
 /**
  * Build tasks to concat minify uflify optimise the BJS js in different flavor (workers...).
  */
-gulp.task("buildWorker", ["workers", "shaders"], function () {
+gulp.task("buildWorker", gulp.series("workers", "shaders", function () {
     var filesToProcess = determineFilesToProcess("files");
     return merge2(
         gulp.src(filesToProcess).
@@ -227,18 +226,19 @@ gulp.task("buildWorker", ["workers", "shaders"], function () {
         .pipe(uglify())
         .pipe(optimisejs())
         .pipe(gulp.dest(config.build.outputDirectory));
-});
+}));
 
-gulp.task("build", ["shaders"], function () {
+gulp.task("build", gulp.series("shaders", function build() {
     var filesToProcess = determineFilesToProcess("files");
     var directFilesToProcess = determineFilesToProcess("directFiles");
-    let mergedStreams = merge2(
-        gulp.src(filesToProcess).
-            pipe(expect.real({ errorOnFailure: true }, filesToProcess)),
+    let merged = [gulp.src(filesToProcess).
+        pipe(expect.real({ errorOnFailure: true }, filesToProcess)),
         shadersStream,
-        includeShadersStream,
-        gulp.src(directFilesToProcess)
-    )
+        includeShadersStream];
+    if (directFilesToProcess.length) {
+        merged.push(gulp.src(directFilesToProcess));
+    }
+    let mergedStreams = merge2(merged);
     return merge2(
         mergedStreams
             .pipe(concat(config.build.noModuleFilename))
@@ -264,7 +264,7 @@ gulp.task("build", ["shaders"], function () {
             .pipe(addES6Exports("BABYLON"))
             .pipe(gulp.dest(config.build.outputDirectory))
     );
-});
+}));
 
 /*
 * Compiles all typescript files and creating a js and a declaration file.
@@ -357,36 +357,64 @@ var buildExternalLibraries = function (settings) {
 }
 
 var buildExternalLibrary = function (library, settings, watch) {
-    var tsProcess = gulp.src(library.files, { base: settings.build.srcOutputDirectory })
-        .pipe(sourcemaps.init())
-        .pipe(typescript(externalTsConfig));
-
-    var includeShader = gulp.src(library.shadersIncludeFiles || [], { base: settings.build.srcOutputDirectory })
-        .pipe(uncommentShader())
-        .pipe(appendSrcToVariable("BABYLON.Effect.IncludesShadersStore", includeShadersName, library.output + ".include.fx"))
-        .pipe(gulp.dest(settings.build.srcOutputDirectory));
-
-    var shader = gulp.src(library.shaderFiles || [], { base: settings.build.srcOutputDirectory })
-        .pipe(uncommentShader())
-        .pipe(appendSrcToVariable("BABYLON.Effect.ShadersStore", shadersName, library.output + ".fx"))
-        .pipe(gulp.dest(settings.build.srcOutputDirectory));
-
-    var dev = tsProcess.js
-        .pipe(sourcemaps.write("./", {
-            includeContent: false,
-            sourceRoot: (filePath) => {
-                return "";
-            }
-        })).pipe(gulp.dest(settings.build.srcOutputDirectory));
+    var tsProcess;
+    if (library.files && library.files.length) {
+        tsProcess = gulp.src(library.files, { base: settings.build.srcOutputDirectory })
+            .pipe(sourcemaps.init())
+            .pipe(typescript(externalTsConfig));
+    }
+
+    let tasks = [];
+
+    let shaderTask;
+
+    let shadersIndlueTask;
+
+    if (library.shadersIncludeFiles && library.shadersIncludeFiles.length) {
+        shadersIndlueTask = gulp.src(library.shadersIncludeFiles, { base: settings.build.srcOutputDirectory })
+            .pipe(uncommentShader())
+            .pipe(appendSrcToVariable("BABYLON.Effect.IncludesShadersStore", includeShadersName, library.output + ".include.fx"))
+            .pipe(gulp.dest(settings.build.srcOutputDirectory));
+        tasks.push(shadersIndlueTask);
+    }
+
+    if (library.shaderFiles && library.shaderFiles.length) {
+        shaderTask = gulp.src(library.shaderFiles, { base: settings.build.srcOutputDirectory })
+            .pipe(uncommentShader())
+            .pipe(appendSrcToVariable("BABYLON.Effect.ShadersStore", shadersName, library.output + ".fx"))
+            .pipe(gulp.dest(settings.build.srcOutputDirectory));
+        tasks.push(shaderTask);
+    }
+
+    var dev;
+
+    if (tsProcess) {
+        dev = tsProcess.js
+            .pipe(sourcemaps.write("./", {
+                includeContent: false,
+                sourceRoot: (filePath) => {
+                    return "";
+                }
+            })).pipe(gulp.dest(settings.build.srcOutputDirectory));
+
+        tasks.push(dev);
+    }
 
     var outputDirectory = config.build.outputDirectory + settings.build.distOutputDirectory;
-    var css = gulp.src(library.sassFiles || [])
-        .pipe(sass().on("error", sass.logError))
-        .pipe(concat(library.output.replace(".js", ".css")))
-        .pipe(gulp.dest(outputDirectory));
+
+    let cssTask;
+
+    if (library.sassFiles && library.sassFiles.length) {
+        cssTask = gulp.src(library.sassFiles)
+            .pipe(sass().on("error", sass.logError))
+            .pipe(concat(library.output.replace(".js", ".css")))
+            .pipe(gulp.dest(outputDirectory));
+        tasks.push(cssTask);
+    }
+
 
     if (watch) {
-        return merge2([shader, includeShader, dev, css]);
+        return merge2(tasks);
     }
     else {
         /*if (library.bundle) {
@@ -405,48 +433,88 @@ var buildExternalLibrary = function (library, settings, watch) {
                 .pipe(optimisejs())
                 .pipe(gulp.dest(outputDirectory));
         } else {*/
-        var code = merge2([tsProcess.js, shader, includeShader])
-            .pipe(concat(library.output))
+        let currentTasks = [];
+        if (tsProcess) {
+            currentTasks.push(tsProcess.js);
+        }
+        if (shaderTask) {
+            currentTasks.push(shaderTask);
+        }
+        if (shadersIndlueTask) {
+            currentTasks.push(shadersIndlueTask);
+        }
+        var code;
+
+        if (currentTasks.length) {
+            code = merge2(currentTasks)
+                .pipe(concat(library.output));
+        }
 
-        if (library.buildAsModule) {
+        if (library.buildAsModule && code) {
             code = code.pipe(replace(extendsSearchRegex, ""))
                 .pipe(replace(decorateSearchRegex, ""))
                 .pipe(addDecorateAndExtends())
                 .pipe(addModuleExports(library.moduleDeclaration, { subModule: true, extendsRoot: library.extendsRoot }))
         }
 
-        code = code.pipe(gulp.dest(outputDirectory))
-            .pipe(cleants())
-            .pipe(rename({ extname: ".min.js" }))
-            .pipe(uglify())
-            .pipe(optimisejs())
-            .pipe(gulp.dest(outputDirectory));
-        /*}*/
+        if (code) {
+
+            code = code.pipe(gulp.dest(outputDirectory))
+                .pipe(cleants())
+                .pipe(rename({ extname: ".min.js" }))
+                .pipe(uglify())
+                .pipe(optimisejs())
+                .pipe(gulp.dest(outputDirectory));
+            /*}*/
 
+        }
 
+        var dts;
 
-        var dts = tsProcess.dts
-            .pipe(concat(library.output))
-            .pipe(replace(referenceSearchRegex, ""))
-            .pipe(rename({ extname: ".d.ts" }))
-            .pipe(gulp.dest(outputDirectory));
+        if (tsProcess) {
+            dts = tsProcess.dts
+                .pipe(concat(library.output))
+                .pipe(replace(referenceSearchRegex, ""))
+                .pipe(rename({ extname: ".d.ts" }))
+                .pipe(gulp.dest(outputDirectory));
+        }
 
         var waitAll;
+        let waitAllTasks = [];
+        if (cssTask) {
+            waitAllTasks.push(cssTask);
+        }
+
+        if (dev) {
+            waitAllTasks.push(dev);
+        }
+
+        if (code) {
+            waitAllTasks.push(code);
+        }
+
+        if (dts) {
+            waitAllTasks.push(dts);
+        }
 
-        if (library.buildAsModule) {
+        if (library.buildAsModule && tsProcess) {
             var dts2 = tsProcess.dts
                 .pipe(concat(library.output))
                 .pipe(replace(referenceSearchRegex, ""))
                 .pipe(addDtsExport(library.moduleDeclaration, library.moduleName, true, library.extendsRoot, config.build.extraTypesDependencies))
                 .pipe(rename({ extname: ".module.d.ts" }))
                 .pipe(gulp.dest(outputDirectory));
-            waitAll = merge2([dev, code, css, dts, dts2]);
-        } else {
-            waitAll = merge2([dev, code, css, dts]);
+            waitAllTasks.push(dts2);
+        }
+        if (waitAllTasks.length) {
+            waitAll = merge2(waitAllTasks);
         }
 
         if (library.webpack) {
-            let sequence = [waitAll];
+            let sequence = [];
+            if (waitAll) {
+                sequence.push(waitAll);
+            }
 
             if (settings.build.outputs) {
 
@@ -477,10 +545,10 @@ var buildExternalLibrary = function (library, settings, watch) {
                             fs.readFile(fileLocation, function (err, data) {
                                 if (err) throw err;
                                 data = (settings.build.dtsBundle.prependText || "") + '\n' + data.toString();
-                                fs.writeFile(fileLocation, data);
+                                fs.writeFileSync(fileLocation, data);
                                 if (settings.build.processDeclaration) {
                                     var newData = processDeclaration(data, settings.build.processDeclaration);
-                                    fs.writeFile(fileLocation.replace('.module', ''), newData);
+                                    fs.writeFileSync(fileLocation.replace('.module', ''), newData);
                                 }
                             });
                         });
@@ -540,10 +608,11 @@ var buildExternalLibrary = function (library, settings, watch) {
                         if (isjs) this.push(file);
                         cb();
                     }))
-                    .pipe(rename(library.output.replace(".js", ".max.js")))
-                    .pipe(rename(library.output.replace(".min.max.", ".")))
-                    .pipe(rename(library.output.replace(".bundle.max.", ".")))
-                    .pipe(gulp.dest(outputDirectory));
+                    .pipe(rename(function (path) {
+                        console.log(path.basename);
+                        //path.extname === ".js"
+                        path.basename = path.basename.replace(".min", "")
+                    })).pipe(gulp.dest(outputDirectory));
                 sequence.push(
                     buildEvent
                 );
@@ -556,9 +625,9 @@ var buildExternalLibrary = function (library, settings, watch) {
                             fs.readFile(fileLocation, function (err, data) {
                                 if (err) throw err;
                                 var newData = processDeclaration(data, settings.build.processDeclaration);
-                                fs.writeFile(fileLocation.replace('.module', ''), newData);
+                                fs.writeFileSync(fileLocation.replace('.module', ''), newData);
                                 //legacy module support
-                                fs.writeFile(fileLocation, data + "\n" + newData);
+                                fs.writeFileSync(fileLocation, data + "\n" + newData);
                             });
                         }
                     });
@@ -581,28 +650,17 @@ var buildExternalLibrary = function (library, settings, watch) {
             return merge2(sequence);
         }
         else {
-            return waitAll;
+            return waitAll || Promise.resolve();
         }
     }
 }
 
-/**
- * The default task, concat and min the main BJS files.
- */
-gulp.task("default", function (cb) {
-    runSequence("typescript-all", "intellisense", "typedoc-all", "tests-unit", "tests-validation-virtualscreen", "tests-validation-browserstack", cb);
-});
-
-gulp.task("mainBuild", function (cb) {
-    runSequence("buildWorker", "build", cb);
-});
+gulp.task("mainBuild", gulp.series("buildWorker", "build"));
 
 /**
  * Build the releasable files.
  */
-gulp.task("typescript", function (cb) {
-    runSequence("typescript-compile", "mainBuild", cb);
-});
+gulp.task("typescript", gulp.series("typescript-compile", "mainBuild"));
 
 /**
  * Dynamic module creation.
@@ -613,22 +671,12 @@ config.modules.map(function (module) {
     });
 });
 
-gulp.task("typescript-libraries", config.modules, function () {
-});
+gulp.task("typescript-libraries", gulp.series(config.modules));
 
 /**
  * Custom build with full path file control; used by profile.html
  */
-gulp.task("build-custom", function (cb) {
-    runSequence("typescript-compile", "build", cb);
-});
-
-/**
- * Do it all.
- */
-gulp.task("typescript-all", function (cb) {
-    runSequence("typescript", "typescript-libraries", "netlify-cleanup", cb);
-});
+gulp.task("build-custom", gulp.series("typescript-compile", "build"));
 
 /**
  * Watch ts files from typescript .
@@ -639,12 +687,13 @@ gulp.task("srcTscWatch", function () {
     process.argv[3] = "-p";
     process.argv[4] = "../../src/tsconfig.json";
     require("./node_modules/typescript/lib/tsc.js");
+    return Promise.resolve();
 });
 
 /**
  * Watch ts files and fire repective tasks.
  */
-gulp.task("watch", ["srcTscWatch"], function () {
+gulp.task("watch", gulp.series("srcTscWatch", function startWatch() {
     var interval = 1000;
 
     var tasks = [];
@@ -682,11 +731,13 @@ gulp.task("watch", ["srcTscWatch"], function () {
         });
     });
 
-    return tasks;
-});
+    console.log(tasks.length);
+
+    return Promise.resolve();
+}));
 
 gulp.task("intellisense", function () {
-    gulp.src(config.build.intellisenseSources)
+    return gulp.src(config.build.intellisenseSources)
         .pipe(concat(config.build.intellisenseFile))
         .pipe(replace(/^\s+_.*?;/gm, ""))
         .pipe(replace(/^\s+_[\S\s]*?}/gm, ""))
@@ -700,7 +751,7 @@ gulp.task("intellisense", function () {
  * Embedded local dev env management.
  */
 gulp.task("deployLocalDev", function () {
-    gulp.src("../../localDev/template/**.*")
+    return gulp.src("../../localDev/template/**.*")
         .pipe(gulp.dest("../../localDev/src/"));
 });
 
@@ -718,14 +769,13 @@ gulp.task("webserver", function () {
         options.host = "0.0.0.0";
     }
 
-    gulp.src("../../.").pipe(webserver(options));
+    return gulp.src("../../.").pipe(webserver(options));
 });
 
 /**
  * Combine Webserver and Watch as long as vscode does not handle multi tasks.
  */
-gulp.task("run", ["watch", "webserver"], function () {
-});
+gulp.task("run", gulp.series("watch", "webserver"));
 
 /**
  * Cleans map and js files from the src folder.
@@ -745,7 +795,7 @@ gulp.task("netlify-cleanup", function () {
         ], { force: true });
     }
     else {
-        return true;
+        return Promise.resolve();
     }
 })
 
@@ -807,7 +857,7 @@ gulp.task('prepare-for-modules', /*["modules-compile"],*/ function () {
     return merge2(tasks);
 });
 
-gulp.task('prepare-dependency-tree', ["prepare-for-modules"], function () {
+gulp.task('prepare-dependency-tree', gulp.series("prepare-for-modules", function () {
     let tasks = [];
 
     // now calculate internal dependencies in the .ts files!
@@ -820,11 +870,11 @@ gulp.task('prepare-dependency-tree', ["prepare-for-modules"], function () {
     });
 
     return merge2(tasks);
-});
+}));
 
 // generate the modules directory, along with commonjs modules and es6 modules
 // Note - the generated modules are UNMINIFIED! The user will choose whether they want to minify or not.
-gulp.task("modules", ["prepare-dependency-tree"], function () {
+gulp.task("modules", gulp.series("prepare-dependency-tree", function () {
     let tasks = [];
 
     Object.keys(config.workloads)
@@ -947,7 +997,7 @@ gulp.task("modules", ["prepare-dependency-tree"], function () {
 
     // run da tasks man!
     return merge2(tasks);
-})
+}));
 
 /**
  * Generate the TypeDoc JSON output in order to create code metadata.
@@ -1004,17 +1054,13 @@ gulp.task("typedoc-generateValidationBaseline", function () {
  * Validate the code comments and style case convention through typedoc and
  * generate the new baseline.
  */
-gulp.task("typedoc-all", function (cb) {
-    runSequence("typedoc-generate", "typedoc-validate", "typedoc-generateValidationBaseline", cb);
-});
+gulp.task("typedoc-all", gulp.series("typedoc-generate", "typedoc-validate", "typedoc-generateValidationBaseline"));
 
 
 /**
  * Validate compile the code and check the comments and style case convention through typedoc
  */
-gulp.task("typedoc-check", function (cb) {
-    runSequence("typescript-compile", "gui", "loaders", "serializers", "typedoc-generate", "typedoc-validate", cb);
-});
+gulp.task("typedoc-check", gulp.series("typescript-compile", "gui", "loaders", "serializers", "typedoc-generate", "typedoc-validate"));
 
 /**
  * Launches the KARMA validation tests in chrome in order to debug them.
@@ -1087,7 +1133,7 @@ gulp.task("tests-unit-transpile", function (done) {
  * Launches the KARMA unit tests in phantomJS.
  * (Can only be launch on any branches.)
  */
-gulp.task("tests-unit-debug", ["tests-unit-transpile"], function (done) {
+gulp.task("tests-unit-debug", gulp.series("tests-unit-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../tests/unit/karma.conf.js",
         singleRun: false,
@@ -1096,9 +1142,9 @@ gulp.task("tests-unit-debug", ["tests-unit-transpile"], function (done) {
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
+}));
 
-gulp.task("tests-babylon-unit", ["tests-unit-transpile"], function (done) {
+gulp.task("tests-babylon-unit", gulp.series("tests-unit-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../tests/unit/karma.conf.js",
         singleRun: true
@@ -1106,15 +1152,7 @@ gulp.task("tests-babylon-unit", ["tests-unit-transpile"], function (done) {
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
-
-/**
- * Launches the KARMA unit tests in phantomJS.
- * (Can only be launch on any branches.)
- */
-gulp.task("tests-unit", function (cb) {
-    runSequence("tests-babylon-unit", "tests-viewer-unit", cb);
-});
+}));
 
 var rmDir = function (dirPath) {
     try { var files = fs.readdirSync(dirPath); }
@@ -1131,10 +1169,29 @@ var rmDir = function (dirPath) {
 };
 
 /**
+ * Transpiles viewer typescript unit tests. 
+ */
+gulp.task("tests-viewer-validation-transpile", function () {
+
+    let wpBuild = webpackStream(require('../../Viewer/webpack.gulp.config.js'), webpack);
+
+    // clean the built directory
+    rmDir("../../Viewer/tests/build/");
+
+    return wpBuild
+        .pipe(rename(function (path) {
+            if (path.extname === '.js') {
+                path.basename = "test";
+            }
+        }))
+        .pipe(gulp.dest("../../Viewer/tests/build/"));
+});
+
+/**
  * Launches the viewer's KARMA validation tests in chrome in order to debug them.
  * (Can only be launch locally.)
  */
-gulp.task("tests-viewer-validation-karma", ["tests-viewer-validation-transpile"], function (done) {
+gulp.task("tests-viewer-validation-karma", gulp.series("tests-viewer-validation-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../Viewer/tests/validation/karma.conf.js",
         singleRun: false
@@ -1142,13 +1199,13 @@ gulp.task("tests-viewer-validation-karma", ["tests-viewer-validation-transpile"]
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
+}));
 
 /**
  * Launches the KARMA validation tests in ff or virtual screen ff on travis for a quick analysis during the build.
  * (Can only be launch on any branches.)
  */
-gulp.task("tests-viewer-validation-virtualscreen", ["tests-viewer-validation-transpile"], function (done) {
+gulp.task("tests-viewer-validation-virtualscreen", gulp.series("tests-viewer-validation-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../Viewer/tests/validation/karma.conf.js",
         singleRun: true,
@@ -1157,13 +1214,13 @@ gulp.task("tests-viewer-validation-virtualscreen", ["tests-viewer-validation-tra
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
+}));
 
 /**
  * Launches the KARMA validation tests in browser stack for remote and cross devices validation tests.
  * (Can only be launch from secure branches.)
  */
-gulp.task("tests-viewer-validation-browserstack", ["tests-viewer-validation-transpile"], function (done) {
+gulp.task("tests-viewer-validation-browserstack", gulp.series("tests-viewer-validation-transpile", function (done) {
     if (!process.env.BROWSER_STACK_USERNAME) {
         done();
         return;
@@ -1176,32 +1233,12 @@ gulp.task("tests-viewer-validation-browserstack", ["tests-viewer-validation-tran
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
-
-
-/**
- * Transpiles viewer typescript unit tests. 
- */
-gulp.task("tests-viewer-validation-transpile", function (done) {
-
-    let wpBuild = webpackStream(require('../../Viewer/webpack.gulp.config.js'), webpack);
-
-    // clean the built directory
-    rmDir("../../Viewer/tests/build/");
-
-    return wpBuild
-        .pipe(rename(function (path) {
-            if (path.extname === '.js') {
-                path.basename = "test";
-            }
-        }))
-        .pipe(gulp.dest("../../Viewer/tests/build/"));
-});
+}));
 
 /**
  * Transpiles viewer typescript unit tests. 
  */
-gulp.task("tests-viewer-transpile", function (done) {
+gulp.task("tests-viewer-transpile", function () {
 
     let wpBuild = webpackStream(require('../../Viewer/tests/unit/webpack.config.js'), webpack);
 
@@ -1221,7 +1258,7 @@ gulp.task("tests-viewer-transpile", function (done) {
  * Launches the KARMA unit tests in chrome.
  * (Can be launch on any branches.)
  */
-gulp.task("tests-viewer-unit-debug", ["tests-viewer-transpile"], function (done) {
+gulp.task("tests-viewer-unit-debug", gulp.series("tests-viewer-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../Viewer/tests/karma.conf.js",
         singleRun: false,
@@ -1230,13 +1267,13 @@ gulp.task("tests-viewer-unit-debug", ["tests-viewer-transpile"], function (done)
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
-});
+}));
 
 /**
  * Launches the KARMA unit tests in phantomJS.
  * (Can be launch on any branches.)
  */
-gulp.task("tests-viewer-unit", ["tests-viewer-transpile"], function (done) {
+gulp.task("tests-viewer-unit", gulp.series("tests-viewer-transpile", function (done) {
     var kamaServerOptions = {
         configFile: __dirname + "/../../Viewer/tests/karma.conf.js",
         singleRun: true
@@ -1244,6 +1281,98 @@ gulp.task("tests-viewer-unit", ["tests-viewer-transpile"], function (done) {
 
     var server = new karmaServer(kamaServerOptions, done);
     server.start();
+}));
+
+/**
+ * Launches the KARMA unit tests in phantomJS.
+ * (Can only be launch on any branches.)
+ */
+gulp.task("tests-unit", gulp.series("tests-babylon-unit", "tests-viewer-unit"));
+
+gulp.task("tests-modules", function () {
+    let testsToRun = require('../../tests/modules/tests.json');
+
+    let sequencePromise = Promise.resolve();
+
+    testsToRun.tests.forEach(test => {
+        sequencePromise = sequencePromise.then(() => {
+            console.log("Running " + test.name);
+            let basePath = '../../tests/modules/' + test.name + '/';
+            rmDir("../../tests/modules/build/");
+            let compilePromise = Promise.resolve();
+
+            if (test.dependencies) {
+                compilePromise = new Promise(function (resolve, reject) {
+                    let counter = 0;
+                    let copyTask = gulp.src(test.dependencies.map(dep => config.build.outputDirectory + '/' + dep)).pipe(rename(function (path) {
+                        path.basename = (counter++) + '';
+                    })).pipe(gulp.dest("../../tests/modules/build/dependencies/"))
+                    copyTask.once("finish", resolve);
+                })
+            }
+            // any compilation needed?
+            if (test.typescript || test.bundler) {
+                //typescript only
+                if (test.typescript && !test.bundler) {
+                    compilePromise = compilePromise.then(() => {
+                        return new Promise(function (resolve, reject) {
+                            var tsProject = typescript.createProject(basePath + (test.tsconfig || 'tsconfig.json'));
+
+                            var tsResult = gulp.src(basePath + '/src/**/*.ts', { base: basePath })
+                                .pipe(tsProject());
+
+                            let error = false;
+                            tsResult.once("error", function () {
+                                error = true;
+                            });
+
+                            let jsPipe = tsResult.js.pipe(gulp.dest("../../tests/modules/"));
+
+                            jsPipe.once("finish", function () {
+                                if (error)
+                                    reject('error compiling test');
+                                else
+                                    resolve();
+                            });
+                        });
+                    });
+                } else {
+                    if (test.bundler === 'webpack') {
+                        console.log("webpack");
+                        compilePromise = compilePromise.then(() => {
+                            return new Promise(function (resolve, reject) {
+                                let wpBuild = webpackStream(require(basePath + '/webpack.config.js'), webpack);
+
+                                wpBuild = wpBuild
+                                    .pipe(rename(function (path) {
+                                        if (path.extname === '.js') {
+                                            path.basename = "tests-loader";
+                                        }
+                                    }))
+                                    .pipe(gulp.dest("../../tests/modules/build/"));
+
+                                wpBuild.once("finish", resolve);
+                            })
+                        });
+                    }
+                }
+            }
+
+            return compilePromise.then(() => {
+                return new Promise(function (resolve, reject) {
+                    var kamaServerOptions = {
+                        configFile: __dirname + "/../../tests/modules/karma.conf.js",
+                        singleRun: true
+                    };
+
+                    var server = new karmaServer(kamaServerOptions, resolve);
+                    server.start();
+                });
+            })
+        })
+    });
+
+    return sequencePromise;
 });
 
 gulp.task("tests-whatsnew", function (done) {
@@ -1287,3 +1416,13 @@ gulp.task("tests-whatsnew", function (done) {
         });
     });
 });
+
+/**
+ * Do it all.
+ */
+gulp.task("typescript-all", gulp.series("typescript", "typescript-libraries", "netlify-cleanup"));
+
+/**
+ * The default task, concat and min the main BJS files.
+ */
+gulp.task("default", gulp.series("typescript-all", "intellisense", "typedoc-all", "tests-unit", "tests-validation-virtualscreen", "tests-validation-browserstack"));

+ 26 - 35
Tools/Gulp/package.json

@@ -10,37 +10,31 @@
     "license": "(Apache-2.0)",
     "devDependencies": {
         "@types/node": "^8.10.21",
-        "base64-font-loader": "0.0.4",
         "base64-image-loader": "^1.2.1",
         "chai": "^4.1.2",
         "color-support": "^1.1.3",
-        "css-loader": "^0.25.0",
+        "css-loader": "^1.0.0",
         "deepmerge": "^2.1.1",
-        "del": "2.2.2",
-        "es6-promise": "^4.2.4",
-        "exports-loader": "^0.6.4",
-        "gulp": "^3.9.1",
-        "gulp-changed-in-place": "2.0.3",
+        "del": "3.0.0",
+        "gulp": "^4.0.0",
         "gulp-clean-ts-extends": "~0.1.1",
-        "gulp-concat": "~2.5.2",
+        "gulp-concat": "~2.6.1",
         "gulp-content-to-variable": "^0.1.0",
-        "gulp-debug": "^3.2.0",
-        "gulp-expect-file": "^0.0.7",
-        "gulp-optimize-js": "^1.0.2",
-        "gulp-rename": "^1.2.3",
-        "gulp-replace": "~0.5.3",
-        "gulp-sass": "3.1.0",
-        "gulp-sourcemaps": "~1.9.1",
-        "gulp-typedoc": "^2.1.2",
-        "gulp-typescript": "^3.2.4",
-        "gulp-uglify": "^2.1.2",
-        "gulp-util": "~3.0.4",
+        "gulp-debug": "^4.0.0",
+        "gulp-expect-file": "^1.0.0",
+        "gulp-optimize-js": "^1.1.0",
+        "gulp-rename": "^1.4.0",
+        "gulp-replace": "~1.0.0",
+        "gulp-sass": "^4.0.1",
+        "gulp-sourcemaps": "~2.6.4",
+        "gulp-typedoc": "^2.2.0",
+        "gulp-typescript": "4.0.2",
+        "gulp-uglify": "^3.0.1",
         "gulp-webserver": "^0.9.1",
         "handlebars": "^4.0.11",
         "html-loader": "^0.5.5",
-        "imports-loader": "^0.7.1",
         "json-loader": "^0.5.7",
-        "karma": "^2.0.4",
+        "karma": "^2.0.5",
         "karma-browserstack-launcher": "^1.3.0",
         "karma-chai": "^0.1.0",
         "karma-chrome-launcher": "^2.2.0",
@@ -48,26 +42,23 @@
         "karma-mocha": "^1.3.0",
         "karma-phantomjs-launcher": "^1.0.4",
         "karma-sinon": "^1.0.5",
-        "merge2": "~0.3.5",
+        "merge2": "~1.2.2",
         "minimist": "^1.2.0",
-        "mocha": "^4.0.1",
-        "phantomjs": "^2.1.7",
-        "run-sequence": "~1.1.0",
-        "sinon": "^4.5.0",
-        "style-loader": "^0.13.2",
-        "through2": "~0.6.5",
-        "ts-loader": "^2.3.7",
-        "typedoc": "^0.9.0",
-        "typescript": "^2.8.4",
-        "webpack": "^4.16.1",
-        "webpack-stream": "^4.0.3"
+        "mocha": "^5.2.0",
+        "phantomjs-prebuilt": "^2.1.16",
+        "sinon": "^6.1.4",
+        "through2": "~2.0.3",
+        "ts-loader": "^4.4.2",
+        "typedoc": "^0.11.0",
+        "typescript": "^2.9.2",
+        "webpack": "^4.16.2",
+        "webpack-stream": "^5.0.0"
     },
     "scripts": {
         "install": "cd ../../gui && npm install && cd ../Tools/Gulp/ &&  cd ../../inspector && npm install && cd ../Tools/Gulp/ && npm --prefix ../../Playground/ install ../../Playground/ && npm --prefix ../../tests/unit/ install ../../tests/unit/ && npm --prefix ../../Viewer/tests/ install ../../Viewer/tests/ && cd ../../Viewer && npm install && cd ../Tools/Gulp/ && gulp deployLocalDev"
     },
     "dependencies": {
         "dts-bundle": "^0.7.3",
-        "gulp-clean": "^0.4.0",
-        "npm": "^5.10.0"
+        "gulp-clean": "^0.4.0"
     }
 }

+ 7 - 1
Tools/Publisher/index.js

@@ -8,6 +8,8 @@ let basePath = '../../dist/preview release';
 // This can be changed when we have a new major release.
 let minimumDependency = '>=3.2.0-alpha';
 
+process.env.PATH += (path.delimiter + path.join(__dirname, 'node_modules', '.bin'));
+
 let packages = [
     {
         name: 'core',
@@ -229,7 +231,11 @@ function processViewer(package, version) {
 
     // build the viewer
     console.log("executing " + 'tsc -p ' + projectPath);
-    shelljs.exec('tsc -p ' + projectPath);
+
+    let tscCompile = shelljs.exec('tsc -p ' + projectPath);
+    if (tscCompile.code !== 0) {
+        throw new Error("tsc compilation failed");
+    }
 
     let packageJson = require(buildPath + '/package.json');
 

+ 18 - 17
Tools/Publisher/package.json

@@ -1,19 +1,20 @@
 {
-  "name": "banylonjs-publisher",
-  "version": "1.0.0",
-  "description": "Publishing babylon's packages automatically",
-  "main": "index.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "author": "Raanan Weber",
-  "license": "ISC",
-  "dependencies": {
-    "fs-extra": "^5.0.0",
-    "prompt": "^1.0.0",
-    "shelljs": "^0.7.8"
-  },
-  "devDependencies": {
-    "gulp": "^3.9.1"
-  }
+    "name": "banylonjs-publisher",
+    "version": "1.0.0",
+    "description": "Publishing babylon's packages automatically",
+    "main": "index.js",
+    "scripts": {
+        "test": "echo \"Error: no test specified\" && exit 1"
+    },
+    "author": "Raanan Weber",
+    "license": "ISC",
+    "dependencies": {
+        "fs-extra": "^5.0.0",
+        "prompt": "^1.0.0",
+        "shelljs": "^0.7.8",
+        "typescript": "^2.9.2"
+    },
+    "devDependencies": {
+        "gulp": "^4.0.0"
+    }
 }

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


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


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


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


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


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


+ 170 - 2
dist/preview release/gui/babylon.gui.d.ts

@@ -180,9 +180,10 @@ declare module BABYLON.GUI {
                 * @param width defines the texture width (1024 by default)
                 * @param height defines the texture height (1024 by default)
                 * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
+                * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
                 * @returns a new AdvancedDynamicTexture
                 */
-            static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean): AdvancedDynamicTexture;
+            static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean): AdvancedDynamicTexture;
             /**
                 * Creates a new AdvancedDynamicTexture in fullscreen mode.
                 * In this mode the texture will rely on a layer for its rendering.
@@ -484,6 +485,8 @@ declare module BABYLON.GUI {
 declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -659,6 +662,13 @@ declare module BABYLON.GUI {
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
             _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
+            /**
+                * Utility function to easily create a checkbox with a header
+                * @param title defines the label to use for the header
+                * @param onValueChanged defines the callback to call when value changes
+                * @returns a StackPanel containing the checkbox and a textBlock
+                */
+            static AddCheckBoxWithHeader(title: string, onValueChanged: (value: boolean) => void): StackPanel;
     }
 }
 declare module BABYLON.GUI {
@@ -747,6 +757,11 @@ declare module BABYLON.GUI {
                 */
             addControl(control: BABYLON.Nullable<Control>): Container;
             /**
+                * Removes all controls from the current container
+                * @returns the current container
+                */
+            clearControls(): Container;
+            /**
                 * Removes a control from the current container
                 * @param control defines the control to remove
                 * @returns the current container
@@ -1809,6 +1824,10 @@ declare module BABYLON.GUI {
     /** Class used to render a grid  */
     export class DisplayGrid extends Control {
             name?: string | undefined;
+            /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */
+            displayMinorLines: boolean;
+            /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */
+            displayMajorLines: boolean;
             /** Gets or sets background color (Black by default) */
             background: string;
             /** Gets or sets the width of each cell (20 by default) */
@@ -2323,7 +2342,7 @@ declare module BABYLON.GUI {
                 */
             renderHoverLight: boolean;
             /**
-                * Gets or sets the radius used to render the hover light (default is 0.15)
+                * Gets or sets the radius used to render the hover light (default is 1.0)
                 */
             hoverRadius: number;
             /**
@@ -2353,4 +2372,153 @@ declare module BABYLON.GUI {
             getClassName(): string;
             static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FluentMaterial;
     }
+}
+declare module BABYLON.GUI {
+    /** Class used to store data to display */
+    export class DataSeries {
+            /** Gets or sets the label of the series */
+            label: string;
+            /** Gets or sets the color associated with the series */
+            color: BABYLON.Color3;
+            /** Gets or sets the list of dimensions (used to filter data) */
+            dimensions: Array<string>;
+            /** Gets or sets the list of values (data to display) */
+            data: Array<any>;
+            /**
+                * Apply a list of filters to the data and return a list
+                * @param filters defines the filters to apply
+                * @returns an array containing the filtered data
+                */
+            getFilteredData(filters: {
+                    [key: string]: string;
+            }): Array<any>;
+            /**
+                * Get the different values of a dimension
+                * @param key defines the dimension name
+                * @returns An array of values
+                */
+            getDimensionValues(key: string): Array<any>;
+            /**
+                * Create a new DataSeries containing testing values
+                * @returns the new DataSeries
+                */
+            static CreateFakeData(): DataSeries;
+    }
+}
+declare module BABYLON.GUI {
+    /** base class for all chart controls*/
+    export abstract class Chart {
+            protected _dataSource: BABYLON.Nullable<DataSeries>;
+            protected _rootNode: BABYLON.TransformNode;
+            protected _dataFilters: {
+                    [key: string]: string;
+            };
+            protected _scene: BABYLON.Scene;
+            protected _blockRefresh: boolean;
+            /** BABYLON.Observable raised when a new element is created */
+            onElementCreated: BABYLON.Observable<BABYLON.Mesh>;
+            /** User defined callback used to create labels */
+            labelCreationFunction: (label: string, width: number, includeBackground: boolean) => BABYLON.Mesh;
+            /**
+                * BABYLON.Observable raised when the point picked by the pointer events changed
+                */
+            onPickedPointChangedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector3>>;
+            /**
+                * BABYLON.Observable raised when the pointer enters an element of the chart
+             */
+            onElementEnterObservable: BABYLON.Observable<BABYLON.AbstractMesh>;
+            /**
+                * BABYLON.Observable raised when the pointer leaves an element of the chart
+                */
+            onElementOutObservable: BABYLON.Observable<BABYLON.AbstractMesh>;
+            /** Gets or sets the rotation of the entire chart */
+            rotation: BABYLON.Vector3;
+            /** Gets or sets the position of the entire chart */
+            position: BABYLON.Vector3;
+            /** Gets or sets the scaling of the entire chart */
+            scaling: BABYLON.Vector3;
+            /** Gets or sets the data source used by the graph */
+            dataSource: BABYLON.Nullable<DataSeries>;
+            /** Gets the filters applied to data source */
+            dataFilters: {
+                    [key: string]: string;
+            };
+            /** Gets the root node associated with this graph */
+            readonly rootNode: BABYLON.TransformNode;
+            /** Gets or sets a value indicating if refresh function should be executed (useful when multiple changes will happen and you want to run refresh only at the end) */
+            blockRefresh: boolean;
+            /** Gets or sets the name of the graph */
+            name: string;
+            /**
+                * Creates a new Chart
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
+            /**
+                * Function called by the chart objects when they need a label. Could be user defined if you set this.labelCreationFunction to a custom callback
+                * @param label defines the text of the label
+                * @param width defines the expected width (height is supposed to be 1)
+                * @param includeBackground defines if a background rectangle must be added (default is true)
+                * @returns a mesh used to host the label
+                */
+            addLabel(label: string, width: number, includeBackground?: boolean): BABYLON.Mesh;
+            /**
+                * Remove specific label mesh
+                * @param label defines the label mesh to remove
+                */
+            removeLabel(label: BABYLON.Mesh): void;
+            /** Remove all created labels */
+            removeLabels(): void;
+            /**
+                * Force the chart to redraw itself
+                * @returns the current chart
+             */
+            abstract refresh(): Chart;
+            /** Release all associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
+}
+declare module BABYLON.GUI {
+    /** Class used to render bar graphs */
+    export class BarGraph extends Chart {
+            protected _ownDefaultMaterial: boolean;
+            /** Gets or sets a boolean indicating if the background must be displayed */
+            displayBackground: boolean;
+            /** Gets or sets a boolean indicating if labels must be displayed */
+            displayLabels: boolean;
+            /** Gets or sets the margin between bars */
+            margin: number;
+            /** Gets or sets the with of each bar */
+            barWidth: number;
+            /** Gets or sets the maximum height of a bar */
+            maxBarHeight: number;
+            /** Gets or sets the dimension used for the labels */
+            labelDimension: string;
+            /** Gets or sets the material used by bar meshes */
+            defaultMaterial: BABYLON.Nullable<BABYLON.Material>;
+            /**
+                * Creates a new BarGraph
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
+            protected _createDefaultMaterial(scene: BABYLON.Scene): BABYLON.Material;
+            /**
+                * Children class can override this function to provide a new mesh (as long as it stays inside a 1x1x1 box)
+                * @param name defines the mesh name
+                * @param scene defines the hosting scene
+                * @returns a new mesh used to represent the current bar
+                */
+            protected _createBarMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
+            /**
+                * Force the graph to redraw itself
+                * @returns the current BarGraph
+             */
+            refresh(): BarGraph;
+            /** Clean associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
 }

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


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


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


+ 354 - 4
dist/preview release/gui/babylon.gui.module.d.ts

@@ -20,6 +20,7 @@ declare module 'babylonjs-gui/2D' {
 declare module 'babylonjs-gui/3D' {
     export * from "babylonjs-gui/3D/controls";
     export * from "babylonjs-gui/3D/materials";
+    export * from "babylonjs-gui/3D/charting";
     export * from "babylonjs-gui/3D/gui3DManager";
     export * from "babylonjs-gui/3D/vector3WithInfo";
 }
@@ -222,9 +223,10 @@ declare module 'babylonjs-gui/2D/advancedDynamicTexture' {
                 * @param width defines the texture width (1024 by default)
                 * @param height defines the texture height (1024 by default)
                 * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
+                * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
                 * @returns a new AdvancedDynamicTexture
                 */
-            static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean): AdvancedDynamicTexture;
+            static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean): AdvancedDynamicTexture;
             /**
                 * Creates a new AdvancedDynamicTexture in fullscreen mode.
                 * In this mode the texture will rely on a layer for its rendering.
@@ -554,6 +556,12 @@ declare module 'babylonjs-gui/3D/materials' {
     export * from "babylonjs-gui/3D/materials/fluentMaterial";
 }
 
+declare module 'babylonjs-gui/3D/charting' {
+    export * from "babylonjs-gui/3D/charting/dataSeries";
+    export * from "babylonjs-gui/3D/charting/chart";
+    export * from "babylonjs-gui/3D/charting/barGraph";
+}
+
 declare module 'babylonjs-gui/3D/gui3DManager' {
     import { IDisposable, Scene, Nullable, UtilityLayerRenderer, Observable, Vector3, Material } from "babylonjs";
     import { Container3D } from "babylonjs-gui/3D/controls/container3D";
@@ -716,6 +724,7 @@ declare module 'babylonjs-gui/2D/controls/checkbox' {
     import { Control } from "babylonjs-gui/2D/controls/control";
     import { Measure } from "babylonjs-gui/2D/measure";
     import { Observable, Vector2 } from "babylonjs";
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     /**
         * Class used to represent a 2D checkbox
         */
@@ -743,6 +752,13 @@ declare module 'babylonjs-gui/2D/controls/checkbox' {
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
             _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number): boolean;
+            /**
+                * Utility function to easily create a checkbox with a header
+                * @param title defines the label to use for the header
+                * @param onValueChanged defines the callback to call when value changes
+                * @returns a StackPanel containing the checkbox and a textBlock
+                */
+            static AddCheckBoxWithHeader(title: string, onValueChanged: (value: boolean) => void): StackPanel;
     }
 }
 
@@ -840,6 +856,11 @@ declare module 'babylonjs-gui/2D/controls/container' {
                 */
             addControl(control: Nullable<Control>): Container;
             /**
+                * Removes all controls from the current container
+                * @returns the current container
+                */
+            clearControls(): Container;
+            /**
                 * Removes a control from the current container
                 * @param control defines the control to remove
                 * @returns the current container
@@ -1963,6 +1984,10 @@ declare module 'babylonjs-gui/2D/controls/displayGrid' {
     /** Class used to render a grid  */
     export class DisplayGrid extends Control {
             name?: string | undefined;
+            /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */
+            displayMinorLines: boolean;
+            /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */
+            displayMajorLines: boolean;
             /** Gets or sets background color (Black by default) */
             background: string;
             /** Gets or sets the width of each cell (20 by default) */
@@ -2527,7 +2552,7 @@ declare module 'babylonjs-gui/3D/materials/fluentMaterial' {
                 */
             renderHoverLight: boolean;
             /**
-                * Gets or sets the radius used to render the hover light (default is 0.15)
+                * Gets or sets the radius used to render the hover light (default is 1.0)
                 */
             hoverRadius: number;
             /**
@@ -2559,6 +2584,163 @@ declare module 'babylonjs-gui/3D/materials/fluentMaterial' {
     }
 }
 
+declare module 'babylonjs-gui/3D/charting/dataSeries' {
+    import { Color3 } from "babylonjs";
+    /** Class used to store data to display */
+    export class DataSeries {
+            /** Gets or sets the label of the series */
+            label: string;
+            /** Gets or sets the color associated with the series */
+            color: Color3;
+            /** Gets or sets the list of dimensions (used to filter data) */
+            dimensions: Array<string>;
+            /** Gets or sets the list of values (data to display) */
+            data: Array<any>;
+            /**
+                * Apply a list of filters to the data and return a list
+                * @param filters defines the filters to apply
+                * @returns an array containing the filtered data
+                */
+            getFilteredData(filters: {
+                    [key: string]: string;
+            }): Array<any>;
+            /**
+                * Get the different values of a dimension
+                * @param key defines the dimension name
+                * @returns An array of values
+                */
+            getDimensionValues(key: string): Array<any>;
+            /**
+                * Create a new DataSeries containing testing values
+                * @returns the new DataSeries
+                */
+            static CreateFakeData(): DataSeries;
+    }
+}
+
+declare module 'babylonjs-gui/3D/charting/chart' {
+    import { Nullable, TransformNode, Scene, Vector3, Observable, Mesh, AbstractMesh } from "babylonjs";
+    import { DataSeries } from "babylonjs-gui/3D/charting";
+    /** base class for all chart controls*/
+    export abstract class Chart {
+            protected _dataSource: Nullable<DataSeries>;
+            protected _rootNode: TransformNode;
+            protected _dataFilters: {
+                    [key: string]: string;
+            };
+            protected _scene: Scene;
+            protected _blockRefresh: boolean;
+            /** Observable raised when a new element is created */
+            onElementCreated: Observable<Mesh>;
+            /** User defined callback used to create labels */
+            labelCreationFunction: (label: string, width: number, includeBackground: boolean) => Mesh;
+            /**
+                * Observable raised when the point picked by the pointer events changed
+                */
+            onPickedPointChangedObservable: Observable<Nullable<Vector3>>;
+            /**
+                * Observable raised when the pointer enters an element of the chart
+             */
+            onElementEnterObservable: Observable<AbstractMesh>;
+            /**
+                * Observable raised when the pointer leaves an element of the chart
+                */
+            onElementOutObservable: Observable<AbstractMesh>;
+            /** Gets or sets the rotation of the entire chart */
+            rotation: Vector3;
+            /** Gets or sets the position of the entire chart */
+            position: Vector3;
+            /** Gets or sets the scaling of the entire chart */
+            scaling: Vector3;
+            /** Gets or sets the data source used by the graph */
+            dataSource: Nullable<DataSeries>;
+            /** Gets the filters applied to data source */
+            dataFilters: {
+                    [key: string]: string;
+            };
+            /** Gets the root node associated with this graph */
+            readonly rootNode: TransformNode;
+            /** Gets or sets a value indicating if refresh function should be executed (useful when multiple changes will happen and you want to run refresh only at the end) */
+            blockRefresh: boolean;
+            /** Gets or sets the name of the graph */
+            name: string;
+            /**
+                * Creates a new Chart
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: Nullable<Scene>);
+            /**
+                * Function called by the chart objects when they need a label. Could be user defined if you set this.labelCreationFunction to a custom callback
+                * @param label defines the text of the label
+                * @param width defines the expected width (height is supposed to be 1)
+                * @param includeBackground defines if a background rectangle must be added (default is true)
+                * @returns a mesh used to host the label
+                */
+            addLabel(label: string, width: number, includeBackground?: boolean): Mesh;
+            /**
+                * Remove specific label mesh
+                * @param label defines the label mesh to remove
+                */
+            removeLabel(label: Mesh): void;
+            /** Remove all created labels */
+            removeLabels(): void;
+            /**
+                * Force the chart to redraw itself
+                * @returns the current chart
+             */
+            abstract refresh(): Chart;
+            /** Release all associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
+}
+
+declare module 'babylonjs-gui/3D/charting/barGraph' {
+    import { Nullable, Scene, Mesh, Material } from "babylonjs";
+    import { Chart } from "babylonjs-gui/3D/charting";
+    /** Class used to render bar graphs */
+    export class BarGraph extends Chart {
+            protected _ownDefaultMaterial: boolean;
+            /** Gets or sets a boolean indicating if the background must be displayed */
+            displayBackground: boolean;
+            /** Gets or sets a boolean indicating if labels must be displayed */
+            displayLabels: boolean;
+            /** Gets or sets the margin between bars */
+            margin: number;
+            /** Gets or sets the with of each bar */
+            barWidth: number;
+            /** Gets or sets the maximum height of a bar */
+            maxBarHeight: number;
+            /** Gets or sets the dimension used for the labels */
+            labelDimension: string;
+            /** Gets or sets the material used by bar meshes */
+            defaultMaterial: Nullable<Material>;
+            /**
+                * Creates a new BarGraph
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: Nullable<Scene>);
+            protected _createDefaultMaterial(scene: Scene): Material;
+            /**
+                * Children class can override this function to provide a new mesh (as long as it stays inside a 1x1x1 box)
+                * @param name defines the mesh name
+                * @param scene defines the hosting scene
+                * @returns a new mesh used to represent the current bar
+                */
+            protected _createBarMesh(name: string, scene: Scene): Mesh;
+            /**
+                * Force the graph to redraw itself
+                * @returns the current BarGraph
+             */
+            refresh(): BarGraph;
+            /** Clean associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
+}
+
 
 /*BabylonJS GUI*/
 // Dependencies for this module:
@@ -2742,9 +2924,10 @@ declare module BABYLON.GUI {
                 * @param width defines the texture width (1024 by default)
                 * @param height defines the texture height (1024 by default)
                 * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
+                * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
                 * @returns a new AdvancedDynamicTexture
                 */
-            static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean): AdvancedDynamicTexture;
+            static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean): AdvancedDynamicTexture;
             /**
                 * Creates a new AdvancedDynamicTexture in fullscreen mode.
                 * In this mode the texture will rely on a layer for its rendering.
@@ -3046,6 +3229,8 @@ declare module BABYLON.GUI {
 declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -3221,6 +3406,13 @@ declare module BABYLON.GUI {
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
             _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
+            /**
+                * Utility function to easily create a checkbox with a header
+                * @param title defines the label to use for the header
+                * @param onValueChanged defines the callback to call when value changes
+                * @returns a StackPanel containing the checkbox and a textBlock
+                */
+            static AddCheckBoxWithHeader(title: string, onValueChanged: (value: boolean) => void): StackPanel;
     }
 }
 declare module BABYLON.GUI {
@@ -3309,6 +3501,11 @@ declare module BABYLON.GUI {
                 */
             addControl(control: BABYLON.Nullable<Control>): Container;
             /**
+                * Removes all controls from the current container
+                * @returns the current container
+                */
+            clearControls(): Container;
+            /**
                 * Removes a control from the current container
                 * @param control defines the control to remove
                 * @returns the current container
@@ -4371,6 +4568,10 @@ declare module BABYLON.GUI {
     /** Class used to render a grid  */
     export class DisplayGrid extends Control {
             name?: string | undefined;
+            /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */
+            displayMinorLines: boolean;
+            /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */
+            displayMajorLines: boolean;
             /** Gets or sets background color (Black by default) */
             background: string;
             /** Gets or sets the width of each cell (20 by default) */
@@ -4885,7 +5086,7 @@ declare module BABYLON.GUI {
                 */
             renderHoverLight: boolean;
             /**
-                * Gets or sets the radius used to render the hover light (default is 0.15)
+                * Gets or sets the radius used to render the hover light (default is 1.0)
                 */
             hoverRadius: number;
             /**
@@ -4915,4 +5116,153 @@ declare module BABYLON.GUI {
             getClassName(): string;
             static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FluentMaterial;
     }
+}
+declare module BABYLON.GUI {
+    /** Class used to store data to display */
+    export class DataSeries {
+            /** Gets or sets the label of the series */
+            label: string;
+            /** Gets or sets the color associated with the series */
+            color: BABYLON.Color3;
+            /** Gets or sets the list of dimensions (used to filter data) */
+            dimensions: Array<string>;
+            /** Gets or sets the list of values (data to display) */
+            data: Array<any>;
+            /**
+                * Apply a list of filters to the data and return a list
+                * @param filters defines the filters to apply
+                * @returns an array containing the filtered data
+                */
+            getFilteredData(filters: {
+                    [key: string]: string;
+            }): Array<any>;
+            /**
+                * Get the different values of a dimension
+                * @param key defines the dimension name
+                * @returns An array of values
+                */
+            getDimensionValues(key: string): Array<any>;
+            /**
+                * Create a new DataSeries containing testing values
+                * @returns the new DataSeries
+                */
+            static CreateFakeData(): DataSeries;
+    }
+}
+declare module BABYLON.GUI {
+    /** base class for all chart controls*/
+    export abstract class Chart {
+            protected _dataSource: BABYLON.Nullable<DataSeries>;
+            protected _rootNode: BABYLON.TransformNode;
+            protected _dataFilters: {
+                    [key: string]: string;
+            };
+            protected _scene: BABYLON.Scene;
+            protected _blockRefresh: boolean;
+            /** BABYLON.Observable raised when a new element is created */
+            onElementCreated: BABYLON.Observable<BABYLON.Mesh>;
+            /** User defined callback used to create labels */
+            labelCreationFunction: (label: string, width: number, includeBackground: boolean) => BABYLON.Mesh;
+            /**
+                * BABYLON.Observable raised when the point picked by the pointer events changed
+                */
+            onPickedPointChangedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector3>>;
+            /**
+                * BABYLON.Observable raised when the pointer enters an element of the chart
+             */
+            onElementEnterObservable: BABYLON.Observable<BABYLON.AbstractMesh>;
+            /**
+                * BABYLON.Observable raised when the pointer leaves an element of the chart
+                */
+            onElementOutObservable: BABYLON.Observable<BABYLON.AbstractMesh>;
+            /** Gets or sets the rotation of the entire chart */
+            rotation: BABYLON.Vector3;
+            /** Gets or sets the position of the entire chart */
+            position: BABYLON.Vector3;
+            /** Gets or sets the scaling of the entire chart */
+            scaling: BABYLON.Vector3;
+            /** Gets or sets the data source used by the graph */
+            dataSource: BABYLON.Nullable<DataSeries>;
+            /** Gets the filters applied to data source */
+            dataFilters: {
+                    [key: string]: string;
+            };
+            /** Gets the root node associated with this graph */
+            readonly rootNode: BABYLON.TransformNode;
+            /** Gets or sets a value indicating if refresh function should be executed (useful when multiple changes will happen and you want to run refresh only at the end) */
+            blockRefresh: boolean;
+            /** Gets or sets the name of the graph */
+            name: string;
+            /**
+                * Creates a new Chart
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
+            /**
+                * Function called by the chart objects when they need a label. Could be user defined if you set this.labelCreationFunction to a custom callback
+                * @param label defines the text of the label
+                * @param width defines the expected width (height is supposed to be 1)
+                * @param includeBackground defines if a background rectangle must be added (default is true)
+                * @returns a mesh used to host the label
+                */
+            addLabel(label: string, width: number, includeBackground?: boolean): BABYLON.Mesh;
+            /**
+                * Remove specific label mesh
+                * @param label defines the label mesh to remove
+                */
+            removeLabel(label: BABYLON.Mesh): void;
+            /** Remove all created labels */
+            removeLabels(): void;
+            /**
+                * Force the chart to redraw itself
+                * @returns the current chart
+             */
+            abstract refresh(): Chart;
+            /** Release all associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
+}
+declare module BABYLON.GUI {
+    /** Class used to render bar graphs */
+    export class BarGraph extends Chart {
+            protected _ownDefaultMaterial: boolean;
+            /** Gets or sets a boolean indicating if the background must be displayed */
+            displayBackground: boolean;
+            /** Gets or sets a boolean indicating if labels must be displayed */
+            displayLabels: boolean;
+            /** Gets or sets the margin between bars */
+            margin: number;
+            /** Gets or sets the with of each bar */
+            barWidth: number;
+            /** Gets or sets the maximum height of a bar */
+            maxBarHeight: number;
+            /** Gets or sets the dimension used for the labels */
+            labelDimension: string;
+            /** Gets or sets the material used by bar meshes */
+            defaultMaterial: BABYLON.Nullable<BABYLON.Material>;
+            /**
+                * Creates a new BarGraph
+                * @param name defines the name of the graph
+                * @param scene defines the hosting scene
+                */
+            constructor(name: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
+            protected _createDefaultMaterial(scene: BABYLON.Scene): BABYLON.Material;
+            /**
+                * Children class can override this function to provide a new mesh (as long as it stays inside a 1x1x1 box)
+                * @param name defines the mesh name
+                * @param scene defines the hosting scene
+                * @returns a new mesh used to represent the current bar
+                */
+            protected _createBarMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
+            /**
+                * Force the graph to redraw itself
+                * @returns the current BarGraph
+             */
+            refresh(): BarGraph;
+            /** Clean associated resources */
+            dispose(): void;
+            protected _clean(): void;
+    }
 }

+ 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(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 _parse;
+        private _getLoader;
+        private _parseBinary;
+        private _parseV1;
+        private _parseV2;
+        private static _parseVersion;
+        private static _compareVersion;
+        private static _decodeBufferToText;
         private static readonly _logSpaces;
         private _logIndentLevel;
         private _loggingEnabled;
@@ -320,17 +320,17 @@ declare module BABYLON {
         _logOpen(message: string): void;
         /** @hidden */
         _logClose(): void;
-        private _logEnabled(message);
-        private _logDisabled(message);
+        private _logEnabled;
+        private _logDisabled;
         private _capturePerformanceCounters;
         /** @hidden */
         _startPerformanceCounter: (counterName: string) => void;
         /** @hidden */
         _endPerformanceCounter: (counterName: string) => void;
-        private _startPerformanceCounterEnabled(counterName);
-        private _startPerformanceCounterDisabled(counterName);
-        private _endPerformanceCounterEnabled(counterName);
-        private _endPerformanceCounterDisabled(counterName);
+        private _startPerformanceCounterEnabled;
+        private _startPerformanceCounterDisabled;
+        private _endPerformanceCounterEnabled;
+        private _endPerformanceCounterDisabled;
     }
 }
 
@@ -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(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        private _importMeshAsync;
         /**
         * 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(scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        private _loadAsync;
         /**
         * 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(gltfRuntime, onload);
-        private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
-        private _createNodes(gltfRuntime);
+        private _loadShadersAsync;
+        private _loadBuffersAsync;
+        private _createNodes;
     }
 }
 
@@ -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(gltfRuntime, id, onSuccess, onError);
-        private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
-        private static ApplyExtensions(func, defaultFunc);
+        private static LoadTextureBufferAsync;
+        private static CreateTextureAsync;
+        private static ApplyExtensions;
     }
 }
 
@@ -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(gltfRuntime, id, material, propertyPath, onError);
+        private _loadTexture;
     }
 }

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


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


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


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


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


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


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


+ 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(rootUrl, value, scene);
+        private static _getTexture;
     }
     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(url, rootUrl, onSuccess);
+        private _loadMTL;
         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(meshesNames, scene, data, rootUrl);
+        private _parseSolid;
     }
 }

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


+ 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(data);
-        private parseBinary(mesh, data);
-        private parseASCII(mesh, solidData);
+        private isBinary;
+        private parseBinary;
+        private parseASCII;
     }
 }

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


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


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


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


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 607 - 317
dist/preview release/loaders/babylonjs.loaders.module.d.ts


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 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(scene, renderTargetSize);
+        private _createRenderTargets;
         getAnimatables(): IAnimatable[];
         getActiveTextures(): BaseTexture[];
         hasTexture(texture: BaseTexture): boolean;

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


+ 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(scene, renderTargetSize);
+        private _createRenderTargets;
         getAnimatables(): IAnimatable[];
         getActiveTextures(): BaseTexture[];
         hasTexture(texture: BaseTexture): boolean;

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


+ 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(scene, renderTargetSize);
+        private _createRenderTargets;
         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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * Clones the current AsciiArtTexture.
          * @return the clone of the texture.

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


+ 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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

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


+ 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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * 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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

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


+ 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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * 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(font);
+        private getFontWidth;
         /**
          * 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(font);
+        private getFontHeight;
         /**
          * Clones the current DigitalRainFontTexture.
          * @return the clone of the texture.

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


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


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


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


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


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


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


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


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


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


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


+ 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(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
+        private reorderIndicesBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderVertexAttributeDataBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFillMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleStripDrawMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFanMode;
         /**
          * 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(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
+        private writeVertexAttributeData;
         /**
          * 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(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
+        private writeAttributeData;
         /**
          * 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(shouldUseGlb, glTFPrefix?, prettyPrint?);
+        private generateJSON;
         /**
          * 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(num);
+        private _getPadding;
         /**
          * 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(node, babylonTransformNode);
-        private getVertexBufferFromMesh(attributeKind, bufferMesh);
+        private setNodeTransformation;
+        private getVertexBufferFromMesh;
         /**
          * 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(kind, babylonTransformNode, binaryWriter, byteStride);
+        private createBufferViewKind;
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode(babylonMesh);
+        private getMeshPrimitiveMode;
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode(meshPrimitive, primitiveMode);
+        private setPrimitiveMode;
         /**
          * 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(meshPrimitive, attributeKind);
+        private setAttributeKind;
         /**
          * 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(mesh, babylonTransformNode, binaryWriter);
+        private setPrimitiveAttributes;
         /**
          * 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(babylonScene, binaryWriter);
+        private createSceneAsync;
         /**
          * 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(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
+        private createNodeMapAndAnimations;
         /**
          * 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(babylonTransformNode, binaryWriter);
+        private createNode;
     }
     /**
      * @hidden
@@ -331,7 +331,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer(byteLength);
+        private resizeBuffer;
         /**
          * 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(color1, color2, epsilon);
+        private static FuzzyEquals;
         /**
          * 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(buffer, width, height, mimeType);
+        private _createBase64FromCanvasAsync;
         /**
          * 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(width, height, scene);
+        private _createWhiteTexture;
         /**
          * 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(texture1, texture2, scene);
+        private _resizeTexturesToSameDimensions;
         /**
          * 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(pixels);
+        private _convertPixelArrayToFloat32;
         /**
          * 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(diffuseTexture, specularGlossinessTexture, factors, mimeType);
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
         /**
          * 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(specularGlossiness);
+        private _convertSpecularGlossinessToMetallicRoughness;
         /**
          * 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(color);
+        private _getPerceivedBrightness;
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent(color);
+        private _getMaxComponent;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
-        private _getGLTFTextureSampler(texture);
-        private _getGLTFTextureWrapMode(wrapMode);
-        private _getGLTFTextureWrapModesSampler(texture);
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
+        private _getGLTFTextureSampler;
+        private _getGLTFTextureWrapMode;
+        private _getGLTFTextureWrapModesSampler;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
         /**
          * 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(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
-        private getPixelsFromTexture(babylonTexture);
+        private setMetallicRoughnessPbrMaterial;
+        private getPixelsFromTexture;
         /**
          * 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(babylonTexture, mimeType);
+        private _exportTextureAsync;
         /**
          * 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(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
+        private _getTextureInfoFromBase64;
     }
 }
 
@@ -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(animation);
+        private static _DeduceAnimationInfo;
         /**
          * @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(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
+        private static AddAnimation;
         /**
          * 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(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);
+        private static _CreateBakedAnimation;
+        private static _ConvertFactorToVector3OrQuaternion;
+        private static _SetInterpolatedValue;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _CreateLinearOrStepAnimation;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
-        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _CreateCubicSplineAnimation;
+        private static _GetBasePositionRotationOrScale;
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -766,14 +766,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
+        private static _AddKeyframeValue;
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
+        private static _DeduceInterpolation;
         /**
          * 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(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
+        private static AddSplineTangent;
         /**
          * 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(keyFrames);
+        private static calculateMinMaxKeyFrames;
     }
 }
 

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


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


+ 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(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
+        private reorderIndicesBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderVertexAttributeDataBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFillMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleStripDrawMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFanMode;
         /**
          * 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(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
+        private writeVertexAttributeData;
         /**
          * 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(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
+        private writeAttributeData;
         /**
          * 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(shouldUseGlb, glTFPrefix?, prettyPrint?);
+        private generateJSON;
         /**
          * 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(num);
+        private _getPadding;
         /**
          * 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(node, babylonTransformNode);
-        private getVertexBufferFromMesh(attributeKind, bufferMesh);
+        private setNodeTransformation;
+        private getVertexBufferFromMesh;
         /**
          * 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(kind, babylonTransformNode, binaryWriter, byteStride);
+        private createBufferViewKind;
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode(babylonMesh);
+        private getMeshPrimitiveMode;
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode(meshPrimitive, primitiveMode);
+        private setPrimitiveMode;
         /**
          * 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(meshPrimitive, attributeKind);
+        private setAttributeKind;
         /**
          * 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(mesh, babylonTransformNode, binaryWriter);
+        private setPrimitiveAttributes;
         /**
          * 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(babylonScene, binaryWriter);
+        private createSceneAsync;
         /**
          * 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(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
+        private createNodeMapAndAnimations;
         /**
          * 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(babylonTransformNode, binaryWriter);
+        private createNode;
     }
     /**
      * @hidden
@@ -339,7 +339,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer(byteLength);
+        private resizeBuffer;
         /**
          * 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(color1, color2, epsilon);
+        private static FuzzyEquals;
         /**
          * 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(buffer, width, height, mimeType);
+        private _createBase64FromCanvasAsync;
         /**
          * 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(width, height, scene);
+        private _createWhiteTexture;
         /**
          * 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(texture1, texture2, scene);
+        private _resizeTexturesToSameDimensions;
         /**
          * 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(pixels);
+        private _convertPixelArrayToFloat32;
         /**
          * 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(diffuseTexture, specularGlossinessTexture, factors, mimeType);
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
         /**
          * 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(specularGlossiness);
+        private _convertSpecularGlossinessToMetallicRoughness;
         /**
          * 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(color);
+        private _getPerceivedBrightness;
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent(color);
+        private _getMaxComponent;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
-        private _getGLTFTextureSampler(texture);
-        private _getGLTFTextureWrapMode(wrapMode);
-        private _getGLTFTextureWrapModesSampler(texture);
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
+        private _getGLTFTextureSampler;
+        private _getGLTFTextureWrapMode;
+        private _getGLTFTextureWrapModesSampler;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
         /**
          * 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(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
-        private getPixelsFromTexture(babylonTexture);
+        private setMetallicRoughnessPbrMaterial;
+        private getPixelsFromTexture;
         /**
          * 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(babylonTexture, mimeType);
+        private _exportTextureAsync;
         /**
          * 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(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
+        private _getTextureInfoFromBase64;
     }
 }
 
@@ -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(animation);
+        private static _DeduceAnimationInfo;
         /**
          * @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(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
+        private static AddAnimation;
         /**
          * 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(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);
+        private static _CreateBakedAnimation;
+        private static _ConvertFactorToVector3OrQuaternion;
+        private static _SetInterpolatedValue;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _CreateLinearOrStepAnimation;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
-        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _CreateCubicSplineAnimation;
+        private static _GetBasePositionRotationOrScale;
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -774,14 +774,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
+        private static _AddKeyframeValue;
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
+        private static _DeduceInterpolation;
         /**
          * 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(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
+        private static AddSplineTangent;
         /**
          * 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(keyFrames);
+        private static calculateMinMaxKeyFrames;
     }
 }
 

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


+ 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(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);
+        private reorderIndicesBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderVertexAttributeDataBasedOnPrimitiveMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFillMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleStripDrawMode;
         /**
          * 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(submesh, primitiveMode, sideOrientation, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);
+        private reorderTriangleFanMode;
         /**
          * 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(vertices, byteOffset, vertexAttributeKind, meshAttributeArray, binaryWriter);
+        private writeVertexAttributeData;
         /**
          * 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(vertexBufferKind, meshAttributeArray, byteStride, binaryWriter);
+        private writeAttributeData;
         /**
          * 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(shouldUseGlb, glTFPrefix?, prettyPrint?);
+        private generateJSON;
         /**
          * 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(num);
+        private _getPadding;
         /**
          * 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(node, babylonTransformNode);
-        private getVertexBufferFromMesh(attributeKind, bufferMesh);
+        private setNodeTransformation;
+        private getVertexBufferFromMesh;
         /**
          * 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(kind, babylonTransformNode, binaryWriter, byteStride);
+        private createBufferViewKind;
         /**
          * The primitive mode of the Babylon mesh
          * @param babylonMesh The BabylonJS mesh
          */
-        private getMeshPrimitiveMode(babylonMesh);
+        private getMeshPrimitiveMode;
         /**
          * Sets the primitive mode of the glTF mesh primitive
          * @param meshPrimitive glTF mesh primitive
          * @param primitiveMode The primitive mode
          */
-        private setPrimitiveMode(meshPrimitive, primitiveMode);
+        private setPrimitiveMode;
         /**
          * 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(meshPrimitive, attributeKind);
+        private setAttributeKind;
         /**
          * 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(mesh, babylonTransformNode, binaryWriter);
+        private setPrimitiveAttributes;
         /**
          * 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(babylonScene, binaryWriter);
+        private createSceneAsync;
         /**
          * 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(babylonScene, nodes, shouldExportTransformNode, binaryWriter);
+        private createNodeMapAndAnimations;
         /**
          * 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(babylonTransformNode, binaryWriter);
+        private createNode;
     }
     /**
      * @hidden
@@ -346,7 +346,7 @@ declare module BABYLON.GLTF2 {
          * Resize the array buffer to the specified byte length
          * @param byteLength
          */
-        private resizeBuffer(byteLength);
+        private resizeBuffer;
         /**
          * 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(color1, color2, epsilon);
+        private static FuzzyEquals;
         /**
          * 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(buffer, width, height, mimeType);
+        private _createBase64FromCanvasAsync;
         /**
          * 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(width, height, scene);
+        private _createWhiteTexture;
         /**
          * 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(texture1, texture2, scene);
+        private _resizeTexturesToSameDimensions;
         /**
          * 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(pixels);
+        private _convertPixelArrayToFloat32;
         /**
          * 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(diffuseTexture, specularGlossinessTexture, factors, mimeType);
+        private _convertSpecularGlossinessTexturesToMetallicRoughnessAsync;
         /**
          * 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(specularGlossiness);
+        private _convertSpecularGlossinessToMetallicRoughness;
         /**
          * 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(color);
+        private _getPerceivedBrightness;
         /**
          * Returns the maximum color component value
          * @param color
          * @returns maximum color component value, or zero if color is null or undefined
          */
-        private _getMaxComponent(color);
+        private _getMaxComponent;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
-        private _getGLTFTextureSampler(texture);
-        private _getGLTFTextureWrapMode(wrapMode);
-        private _getGLTFTextureWrapModesSampler(texture);
+        private _convertMetalRoughFactorsToMetallicRoughnessAsync;
+        private _getGLTFTextureSampler;
+        private _getGLTFTextureWrapMode;
+        private _getGLTFTextureWrapModesSampler;
         /**
          * 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(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords);
+        private _convertSpecGlossFactorsToMetallicRoughnessAsync;
         /**
          * 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(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);
-        private getPixelsFromTexture(babylonTexture);
+        private setMetallicRoughnessPbrMaterial;
+        private getPixelsFromTexture;
         /**
          * 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(babylonTexture, mimeType);
+        private _exportTextureAsync;
         /**
          * 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(base64Texture, baseTextureName, mimeType, texCoordIndex, samplerIndex);
+        private _getTextureInfoFromBase64;
     }
 }
 
@@ -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(animation);
+        private static _DeduceAnimationInfo;
         /**
          * @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(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, useQuaternion, animationSampleRate);
+        private static AddAnimation;
         /**
          * 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(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);
+        private static _CreateBakedAnimation;
+        private static _ConvertFactorToVector3OrQuaternion;
+        private static _SetInterpolatedValue;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
+        private static _CreateLinearOrStepAnimation;
         /**
          * 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(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
-        private static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
+        private static _CreateCubicSplineAnimation;
+        private static _GetBasePositionRotationOrScale;
         /**
          * Adds a key frame value
          * @param keyFrame
@@ -781,14 +781,14 @@ declare module BABYLON.GLTF2 {
          * @param convertToRightHandedSystem
          * @param useQuaternion
          */
-        private static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
+        private static _AddKeyframeValue;
         /**
          * Determine the interpolation based on the key frames
          * @param keyFrames
          * @param animationChannelTargetPath
          * @param useQuaternion
          */
-        private static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);
+        private static _DeduceInterpolation;
         /**
          * 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(babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
+        private static AddSplineTangent;
         /**
          * 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(keyFrames);
+        private static calculateMinMaxKeyFrames;
     }
 }
 

+ 2 - 12
dist/preview release/typedocValidationBaseline.json

@@ -1,7 +1,7 @@
 {
-  "errors": 4222,
+  "errors": 4220,
   "babylon.typedoc.json": {
-    "errors": 4222,
+    "errors": 4220,
     "AbstractMesh": {
       "Property": {
         "showBoundingBox": {
@@ -9728,11 +9728,6 @@
           "Comments": {
             "MissingText": true
           }
-        },
-        "unbindFrameBuffer": {
-          "Naming": {
-            "NotUnderscoreCamelCase": true
-          }
         }
       }
     },
@@ -14393,11 +14388,6 @@
               }
             }
           }
-        },
-        "unbindFrameBuffer": {
-          "Naming": {
-            "NotUnderscoreCamelCase": true
-          }
         }
       }
     },

+ 19 - 5
dist/preview release/viewer/babylon.viewer.d.ts

@@ -168,11 +168,11 @@ declare module BabylonViewer {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -189,11 +189,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -915,7 +915,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1541,6 +1541,20 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
+    /**
+        * A custom upgrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedUpgrade(sceneManager: SceneManager): boolean;
+    /**
+        * A custom degrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedDegrade(sceneManager: SceneManager): boolean;
+}
+declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

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


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


+ 22 - 5
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -200,11 +200,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -221,11 +221,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -976,13 +976,14 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
+    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1645,6 +1646,22 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
+declare module 'babylonjs-viewer/optimizer/custom/extended' {
+    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
+    /**
+        * A custom upgrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedUpgrade(sceneManager: SceneManager): boolean;
+    /**
+        * A custom degrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedDegrade(sceneManager: SceneManager): boolean;
+}
+
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';

+ 13 - 5
dist/preview release/what's new.md

@@ -7,8 +7,14 @@
 - New GUI 3D controls toolset. [Complete doc + demos](http://doc.babylonjs.com/how_to/gui3d) ([Deltakosh](https://github.com/deltakosh))
 - Added [Environment Texture Tools](https://doc.babylonjs.com/how_to/physically_based_rendering#creating-a-compressed-environment-texture) to reduce the size of the usual .DDS file ([sebavan](http://www.github.com/sebavan))
 - New GUI control: the [Grid](http://doc.babylonjs.com/how_to/gui#grid) ([Deltakosh](https://github.com/deltakosh))
-- Gizmo and GizmoManager classes used to manipulate meshes in a scene. Gizmo types include: position, scale, rotation and bounding box. [Doc](http://doc.babylonjs.com/how_to/gizmo) ([TrevorDev](https://github.com/TrevorDev))
-- New behaviors: PointerDragBehavior, SixDofDragBehavior and MultiPointerScaleBehavior to enable smooth drag and drop/scaling with mouse or 6dof controller on a mesh. [Doc](http://doc.babylonjs.com/how_to/meshbehavior) ([TrevorDev](https://github.com/TrevorDev))
+- Gizmo Support ([TrevorDev](https://github.com/TrevorDev))
+  - Gizmo and GizmoManager classes used to manipulate meshes in a scene. Gizmo types include: position, rotation, scale and bounding box. [Doc](http://doc.babylonjs.com/how_to/gizmo) ([TrevorDev](https://github.com/TrevorDev))
+  - New behaviors: PointerDragBehavior, SixDofDragBehavior and MultiPointerScaleBehavior to enable smooth drag and drop/scaling with mouse or 6dof controller on a mesh. [Doc](http://doc.babylonjs.com/how_to/meshbehavior) ([TrevorDev](https://github.com/TrevorDev))
+  - Added attachToBoxBehavior to attach UI to a bounding box ([TrevorDev](https://github.com/TrevorDev))
+  - Gizmo manager's internal gizmos are now public ([TrevorDev](https://github.com/TrevorDev))
+  - Ability to customize meshes on gizmos ([TrevorDev](https://github.com/TrevorDev))
+  - Added ignoreChildren field to bounding box to save performance when using heavily nested meshes ([TrevorDev](https://github.com/TrevorDev))
+  - Add uniform scaling drag support to scale gizmo ([TrevorDev](https://github.com/TrevorDev))
 - Particle system improvements ([Deltakosh](https://github.com/deltakosh))
   - Added a ParticleHelper class to create some pre-configured particle systems in a one-liner method style. [Doc](https://doc.babylonjs.com/How_To/ParticleHelper) ([Deltakosh](https://github.com/deltakosh)) / ([DevChris](https://github.com/yovanoc))
   - Improved CPU particles rendering performance (up to x2 on low end devices)
@@ -41,6 +47,7 @@
 - All NPM packages have `latest`and `preview` streams [#3055](https://github.com/BabylonJS/Babylon.js/issues/3055) ([RaananW](https://github.com/RaananW))
 - Added New Tools Tab in the inspector (env texture and screenshot tools so far) ([sebavan](http://www.github.com/sebavan))
 - Added `TextBlock.computeExpectedHeight`, added `TextWrapping.Ellipsis` as `TextBlock.wordWrapping` possible value ([adrientetar](https://github.com/adrientetar))
+- Moved to gulp 4, updated dependencies to latest ([RaananW](https://github.com/RaananW))
 
 ### Core Engine
 
@@ -79,14 +86,13 @@
 - Added predicate function `targetMask` argument to `scene.beginWeightedAnimation`, `scene.beginAnimation`, `scene.stopAnimation`, and `animatable.stop` to allow for selective application of animations.  ([fmmoret](http://github.com/fmmoret))
 - Oculus GO and GearVR 3dof controllers will now rotate with the user's head if they turn around in their room ([TrevorDev](https://github.com/TrevorDev))
 - Added onPoseUpdatedFromDeviceObservable to webVRCamera to detect when the camera's pose has been updated ([TrevorDev](https://github.com/TrevorDev))
-- Added attachToBoxBehavior to attach UI to a bounding box ([TrevorDev](https://github.com/TrevorDev))
-- Gizmo manager's internal gizmos are now public ([TrevorDev](https://github.com/TrevorDev))
-- Ability to customize meshes on gizmos ([TrevorDev](https://github.com/TrevorDev))
 - Added gltf light falloff [Issue 4148](https://github.com/BabylonJS/Babylon.js/issues/4148) ([sebavan](http://www.github.com/sebavan))
 - Added falloff type per light to prevent material only inconsistencies [Issue 4148](https://github.com/BabylonJS/Babylon.js/issues/4148) ([sebavan](http://www.github.com/sebavan))
 - Added WeightedSound; selects one from many Sounds with random weight for playback. ([najadojo](https://github.com/najadojo))
 - Added HDR support to ReflectionProbe ([Deltakosh](https://github.com/deltakosh))
 - Added Video Recorder [Issue 4708](https://github.com/BabylonJS/Babylon.js/issues/4708) ([sebavan](http://www.github.com/sebavan))
+- Added ACES ToneMapping to the image processing to help getting more parity with other engines ([sebavan](http://www.github.com/sebavan))
+- Added Image Processing to the particle system to allow consistency in one pass forward rendering scenes ([sebavan](http://www.github.com/sebavan))
 - Added support for main WebGL2 texture formats ([PeapBoy](https://github.com/NicolasBuecher))
 
 ### glTF Loader
@@ -97,6 +103,7 @@
 - Added debug logging and performance counters ([bghgary](http://www.github.com/bghgary))
 - Added support for EXT_lights_imageBased ([bghgary](http://www.github.com/bghgary))
 - Added support for MSFT_audio_emitter ([najadojo](http://www.github.com/najadojo))
+- Added support for custom loader extensions ([bghgary](http://www.github.com/bghgary))
 
 ### Viewer
 
@@ -134,6 +141,7 @@
 - Removing observers during observable notify should not skip over valid observers ([TrevorDev](https://github.com/TrevorDev))
 - Initializing gamepadManager should register the gamepad update events ([TrevorDev](https://github.com/TrevorDev))
 - Do not generate mipmaps for RawCubeTexture if OES_texture_float_linear and/or EXT_color_buffer_float extensions are not supported ([PeapBoy](https://github.com/NicolasBuecher))
+- Do not modify passed camera array parameter when creating a default pipeline ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 

+ 11 - 3
gui/src/2D/advancedDynamicTexture.ts

@@ -705,17 +705,25 @@ export class AdvancedDynamicTexture extends DynamicTexture {
      * @param width defines the texture width (1024 by default)
      * @param height defines the texture height (1024 by default)
      * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
+     * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
      * @returns a new AdvancedDynamicTexture
      */
-    public static CreateForMesh(mesh: AbstractMesh, width = 1024, height = 1024, supportPointerMove = true): AdvancedDynamicTexture {
+    public static CreateForMesh(mesh: AbstractMesh, width = 1024, height = 1024, supportPointerMove = true, onlyAlphaTesting = false): AdvancedDynamicTexture {
         var result = new AdvancedDynamicTexture(mesh.name + " AdvancedDynamicTexture", width, height, mesh.getScene(), true, Texture.TRILINEAR_SAMPLINGMODE);
 
         var material = new StandardMaterial("AdvancedDynamicTextureMaterial", mesh.getScene());
         material.backFaceCulling = false;
         material.diffuseColor = Color3.Black();
         material.specularColor = Color3.Black();
-        material.emissiveTexture = result;
-        material.opacityTexture = result;
+
+        if (onlyAlphaTesting) {
+            material.diffuseTexture = result;
+            material.emissiveTexture = result;
+            result.hasAlpha = true;    
+        } else {
+            material.emissiveTexture = result;
+            material.opacityTexture = result;   
+        }
 
         mesh.material = material;
 

+ 32 - 0
gui/src/2D/controls/checkbox.ts

@@ -1,6 +1,8 @@
 import { Control } from "./control";
 import { Measure } from "../measure";
 import { Observable, Vector2 } from "babylonjs";
+import { StackPanel } from "./stackPanel";
+import { TextBlock } from "./textBlock";
 
 /**
  * Class used to represent a 2D checkbox
@@ -142,4 +144,34 @@ export class Checkbox extends Control {
 
         return true;
     }
+
+    /**
+     * Utility function to easily create a checkbox with a header
+     * @param title defines the label to use for the header
+     * @param onValueChanged defines the callback to call when value changes
+     * @returns a StackPanel containing the checkbox and a textBlock
+     */
+    public static AddCheckBoxWithHeader(title: string, onValueChanged: (value: boolean) => void): StackPanel {
+        var panel = new StackPanel();
+        panel.isVertical = false;
+        panel.height = "30px";
+
+        var checkbox = new Checkbox();
+        checkbox.width = "20px";
+        checkbox.height = "20px";
+        checkbox.isChecked = true;
+        checkbox.color = "green";
+        checkbox.onIsCheckedChangedObservable.add(onValueChanged);
+        panel.addControl(checkbox);    
+    
+        var header = new TextBlock();
+        header.text = title;
+        header.width = "180px";
+        header.paddingLeft = "5px";
+        header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
+        header.color = "white";
+        panel.addControl(header); 
+
+        return panel;
+    }
 }   

+ 14 - 0
gui/src/2D/controls/container.ts

@@ -154,6 +154,20 @@ export class Container extends Control {
     }
 
     /**
+     * Removes all controls from the current container
+     * @returns the current container
+     */
+    public clearControls(): Container {
+        let children = this._children.slice();
+
+        for (var child of children) {
+            this.removeControl(child);
+        }
+
+        return this;
+    }
+
+    /**
      * Removes a control from the current container
      * @param control defines the control to remove
      * @returns the current container

+ 71 - 37
gui/src/2D/controls/displayGrid.ts

@@ -17,6 +17,37 @@ export class DisplayGrid extends Control {
 
     private _background = "Black";
 
+    private _displayMajorLines = true;
+    private _displayMinorLines = true;
+
+    /** Gets or sets a boolean indicating if minor lines must be rendered (true by default)) */
+    public get displayMinorLines(): boolean {
+        return this._displayMinorLines;
+    }
+
+    public set displayMinorLines(value: boolean) {
+        if (this._displayMinorLines === value) {
+            return;
+        }
+
+        this._displayMinorLines = value;
+        this._markAsDirty();
+    }  
+
+    /** Gets or sets a boolean indicating if major lines must be rendered (true by default)) */
+    public get displayMajorLines(): boolean {
+        return this._displayMajorLines;
+    }
+
+    public set displayMajorLines(value: boolean) {
+        if (this._displayMajorLines === value) {
+            return;
+        }
+
+        this._displayMajorLines = value;
+        this._markAsDirty();
+    }  
+
     /** Gets or sets background color (Black by default) */
     public get background(): string {
         return this._background;
@@ -131,52 +162,55 @@ export class DisplayGrid extends Control {
             let cellCountX = this._currentMeasure.width / this._cellWidth;
             let cellCountY = this._currentMeasure.height / this._cellHeight;
 
-            // Minor lines
-            context.strokeStyle = this._minorLineColor;
-            context.lineWidth = this._minorLineTickness;        
-
+            // Minor lines    
             const left = this._currentMeasure.left + this._currentMeasure.width / 2;
-
-            for (var x = -cellCountX / 2; x < cellCountX / 2; x++) {
-                const cellX = left + x * this.cellWidth;
-
-                context.beginPath();
-                context.moveTo(cellX, this._currentMeasure.top);
-                context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);
-                
-                context.stroke();                
-            }
-
             const top = this._currentMeasure.top + this._currentMeasure.height / 2;
 
-            for (var y = -cellCountY / 2; y < cellCountY / 2; y++) {
-                const cellY = top + y * this.cellHeight;
+            if (this._displayMinorLines) {
+                context.strokeStyle = this._minorLineColor;
+                context.lineWidth = this._minorLineTickness;    
 
-                context.beginPath();
-                context.moveTo(this._currentMeasure.left, cellY);
-                context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);
-                context.stroke();
-            }
+                for (var x = -cellCountX / 2; x < cellCountX / 2; x++) {
+                    const cellX = left + x * this.cellWidth;
 
-            // Major lines
-            context.strokeStyle = this._majorLineColor;
-            context.lineWidth = this._majorLineTickness;        
+                    context.beginPath();
+                    context.moveTo(cellX, this._currentMeasure.top);
+                    context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);
+                    
+                    context.stroke();                
+                }
 
-            for (var x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) {
-                let cellX = left + x * this.cellWidth;
+                for (var y = -cellCountY / 2; y < cellCountY / 2; y++) {
+                    const cellY = top + y * this.cellHeight;
 
-                context.beginPath();    
-                context.moveTo(cellX, this._currentMeasure.top);
-                context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);
-                context.stroke();
+                    context.beginPath();
+                    context.moveTo(this._currentMeasure.left, cellY);
+                    context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);
+                    context.stroke();
+                }
             }
 
-            for (var y = -cellCountY / 2 + this._majorLineFrequency; y < cellCountY / 2; y += this._majorLineFrequency) {
-                let cellY = top + y * this.cellHeight;
-                context.moveTo(this._currentMeasure.left, cellY);
-                context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);
-                context.closePath();
-                context.stroke();
+            // Major lines
+            if (this._displayMajorLines) {
+                context.strokeStyle = this._majorLineColor;
+                context.lineWidth = this._majorLineTickness;        
+
+                for (var x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) {
+                    let cellX = left + x * this.cellWidth;
+
+                    context.beginPath();    
+                    context.moveTo(cellX, this._currentMeasure.top);
+                    context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);
+                    context.stroke();
+                }
+
+                for (var y = -cellCountY / 2 + this._majorLineFrequency; y < cellCountY / 2; y += this._majorLineFrequency) {
+                    let cellY = top + y * this.cellHeight;
+                    context.moveTo(this._currentMeasure.left, cellY);
+                    context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);
+                    context.closePath();
+                    context.stroke();
+                }
             }
         }
 

+ 374 - 0
gui/src/3D/charting/barGraph.ts

@@ -0,0 +1,374 @@
+import { Nullable, Scene, Mesh, StandardMaterial, Material, Animation, Observer, Vector3, GlowLayer, Engine, AbstractMesh } from "babylonjs";
+import { Chart } from ".";
+import { AdvancedDynamicTexture, DisplayGrid } from "../../2D";
+import { FluentMaterial } from "../materials";
+
+/** Class used to render bar graphs */
+export class BarGraph extends Chart {
+    private _margin = 1;
+    private _barWidth = 2
+    private _maxBarHeight = 10;
+    private _defaultMaterial: Nullable<Material>;
+    protected _ownDefaultMaterial = false;
+    private _barMeshes: Nullable<Array<Mesh>>;
+    private _backgroundMesh: Nullable<Mesh>;
+    private _backgroundADT : Nullable<AdvancedDynamicTexture>;
+
+    private _pickedPointObserver: Nullable<Observer<Vector3>>;
+
+    private _glowLayer: GlowLayer;
+    
+    private _onElementEnterObserver: Nullable<Observer<AbstractMesh>>;
+    private _onElementOutObserver: Nullable<Observer<AbstractMesh>>;
+    
+    private _labelDimension: string;
+    private _displayLabels = true;
+    private _displayBackground = true;
+    private _backgroundResolution = 512;
+    private _backgroundTickCount = 5;
+
+    private _hoverLabel: Nullable<Mesh>;
+
+    /** Gets or sets a boolean indicating if the background must be displayed */
+    public get displayBackground(): boolean {
+        return this._displayBackground;
+    }
+
+    public set displayBackground(value: boolean) {
+        if (this._displayBackground === value) {
+            return;
+        }
+
+        this._displayBackground = value;
+
+        this.refresh();
+    }     
+
+    /** Gets or sets a boolean indicating if labels must be displayed */
+    public get displayLabels(): boolean {
+        return this._displayLabels;
+    }
+
+    public set displayLabels(value: boolean) {
+        if (this._displayLabels === value) {
+            return;
+        }
+
+        this._displayLabels = value;
+
+        this.refresh();
+    }    
+
+    /** Gets or sets the margin between bars */
+    public get margin(): number {
+        return this._margin;
+    }
+
+    public set margin(value: number) {
+        if (this._margin === value) {
+            return;
+        }
+
+        this._margin = value;
+
+        this.refresh();
+    }
+
+    /** Gets or sets the with of each bar */
+    public get barWidth(): number {
+        return this._barWidth;
+    }
+
+    public set barWidth(value: number) {
+        if (this._barWidth === value) {
+            return;
+        }
+
+        this._barWidth = value;
+
+        this.refresh();
+    }
+
+    /** Gets or sets the maximum height of a bar */
+    public get maxBarHeight(): number {
+        return this._maxBarHeight;
+    }
+
+    public set maxBarHeight(value: number) {
+        if (this._maxBarHeight === value) {
+            return;
+        }
+
+        this._maxBarHeight = value;
+
+        this.refresh();
+    }
+
+    /** Gets or sets the dimension used for the labels */
+    public get labelDimension(): string {
+        return this._labelDimension;
+    }
+
+    public set labelDimension(value: string) {
+        if (this._labelDimension === value) {
+            return;
+        }
+
+        this._labelDimension = value;
+
+        this.refresh();
+    }
+
+    /** Gets or sets the material used by bar meshes */
+    public get defaultMaterial(): Nullable<Material> {
+        return this._defaultMaterial;
+    }
+
+    public set defaultMaterial(value: Nullable<Material>) {
+        if (this._defaultMaterial === value) {
+            return;
+        }
+
+        this._defaultMaterial = value;
+
+        this.refresh();
+    }
+
+    /**
+     * Creates a new BarGraph
+     * @param name defines the name of the graph
+     * @param scene defines the hosting scene
+     */
+    constructor(name: string, scene: Nullable<Scene> = Engine.LastCreatedScene) {
+        super(name, scene);
+
+        this._glowLayer = new GlowLayer("glow", scene!);
+
+        let activeBar: Nullable<Mesh>;
+        this._onElementEnterObserver = this.onElementEnterObservable.add(mesh => {
+            activeBar = <Mesh>mesh;
+
+            this._hoverLabel = this.addLabel(activeBar.metadata.value.toString(), this._barWidth);
+
+            this._hoverLabel.position = activeBar.position.clone();
+            //this._hoverLabel.position.z -= this.barWidth / 2;
+            this._hoverLabel.position.y = activeBar.scaling.y + 0.5;
+            this._hoverLabel.scaling.x = this.barWidth;            
+        });
+
+        this._onElementOutObserver = this.onElementOutObservable.add(mesh => {
+            activeBar = null;
+
+            if (this._hoverLabel) {
+                this.removeLabel(this._hoverLabel);
+                this._hoverLabel = null;
+            }
+        });
+
+        this._glowLayer.customEmissiveColorSelector = (mesh, subMesh, material, result) => {
+            if (mesh === activeBar) {
+                let chartColor = this._dataSource!.color.scale(0.75);
+                result.set(chartColor.r, chartColor.g, chartColor.b, 1.0);
+            } else {
+                result.set(0, 0, 0, 0);
+            }
+        }
+    }
+
+    protected _createDefaultMaterial(scene: Scene): Material {
+        var result = new FluentMaterial("fluent", scene);
+        result.albedoColor = this._dataSource!.color.scale(0.5);
+        result.innerGlowColorIntensity = 0.6;
+        result.renderHoverLight = true;
+        result.hoverRadius = 5;
+
+        this._pickedPointObserver = this.onPickedPointChangedObservable.add(pickedPoint => {
+            if (pickedPoint) {
+                result.hoverPosition = pickedPoint;
+                result.hoverColor.a = 1.0;
+            } else {
+                result.hoverColor.a = 0;
+            }
+        });
+
+        return result;
+    }
+
+    /**
+     * Children class can override this function to provide a new mesh (as long as it stays inside a 1x1x1 box)
+     * @param name defines the mesh name
+     * @param scene defines the hosting scene
+     * @returns a new mesh used to represent the current bar
+     */
+    protected _createBarMesh(name: string, scene: Scene): Mesh {
+        var box = Mesh.CreateBox(name, 1, scene);
+        box.setPivotPoint(new BABYLON.Vector3(0, -0.5, 0));
+
+        return box;
+    }
+
+    /** 
+     * Force the graph to redraw itself 
+     * @returns the current BarGraph
+    */
+    public refresh(): BarGraph {
+        if (this._blockRefresh) {
+            return this;
+        }
+
+        if (!this._dataSource) {
+            this._clean();
+            return this;
+        }
+
+        let scene = this._rootNode.getScene();
+
+        // Default material
+        if (!this._defaultMaterial) {
+            this._defaultMaterial = this._createDefaultMaterial(scene);
+        }
+
+        // Scan data
+        let min = 0;
+        let max = Number.MIN_VALUE;
+
+        const data = this._dataFilters ? this._dataSource.getFilteredData(this._dataFilters) : this._dataSource.data;
+
+        // Check the limit of the entire series
+        this._dataSource.data.forEach(entry => {
+            if (min > entry.value) {
+                min = entry.value;
+            }
+
+            if (max < entry.value) {
+                max = entry.value;
+            }
+        });
+
+        let ratio = this.maxBarHeight / (max - min);
+
+        let createMesh = false;
+        let left = -(data.length / 2) * (this.barWidth + this.margin) + 1.5 * this._margin;
+
+        // Do we need to create new graph or animate the current one
+        if (!this._barMeshes || this._barMeshes.length !== data.length) {
+            this._clean();
+            createMesh = true;
+            this._barMeshes = [];
+        }        
+
+        this.removeLabels();
+
+        if (this._backgroundMesh) {
+            this._backgroundMesh.dispose(false, true);
+            this._backgroundMesh = null;
+        }
+
+        if (this._displayBackground) {
+            // Axis
+            this._backgroundMesh = BABYLON.Mesh.CreatePlane("background", 1, scene);
+            this._backgroundMesh.parent = this._rootNode;            
+            this._backgroundMesh.setPivotPoint(new BABYLON.Vector3(0, -0.5, 0));
+
+            this._backgroundADT = AdvancedDynamicTexture.CreateForMesh(this._backgroundMesh, this._backgroundResolution, this._backgroundResolution, false);
+
+            let displayGrid = new DisplayGrid();
+            displayGrid.displayMajorLines = false;
+            displayGrid.minorLineColor = "White";
+            displayGrid.minorLineTickness = 2;
+            displayGrid.cellWidth = this._backgroundResolution / data.length;
+            displayGrid.cellHeight = this._backgroundResolution / this._backgroundTickCount;
+
+            this._backgroundADT.addControl(displayGrid);
+
+            (<StandardMaterial>this._backgroundMesh.material!).opacityTexture = null;
+
+            this._backgroundMesh.position.z = this.barWidth;
+            this._backgroundMesh.scaling.x = (this.barWidth + this.margin) * data.length;
+            this._backgroundMesh.scaling.y = this._maxBarHeight; 
+
+            for (var tickIndex = 0; tickIndex <= this._backgroundTickCount; tickIndex++) {
+                var label = (max / this._backgroundTickCount) * tickIndex + "";
+                var ticklabel = this.addLabel(label, this._barWidth, false);
+                ticklabel.position.x = left - this._barWidth;
+                ticklabel.position.y = (this.maxBarHeight * (tickIndex - 0.25)) / this._backgroundTickCount;
+                ticklabel.position.z = this._barWidth;
+            }
+        }
+
+        // We will generate one bar per entry
+        let index = 0;
+        data.forEach(entry => {
+
+            var barMesh: Mesh;
+            if (createMesh) {
+                barMesh = this._createBarMesh(this.name + "_box_" + index++, scene);
+                barMesh.enablePointerMoveEvents = true;
+                this._barMeshes!.push(barMesh);
+            } else {
+                barMesh = this._barMeshes![index++];
+            }
+
+            barMesh.metadata = entry;
+            barMesh.parent = this._rootNode;
+            barMesh.position.x = left;
+            let currentScalingYState = barMesh.scaling.y;
+            barMesh.scaling.set(this.barWidth, 0, this._barWidth);
+
+            var easing = new BABYLON.CircleEase();
+            Animation.CreateAndStartAnimation("entryScale", barMesh, "scaling.y", 30, 30, currentScalingYState, entry.value * ratio, 0, easing);
+
+            barMesh.material = this._defaultMaterial;
+
+            this.onElementCreated.notifyObservers(barMesh);
+
+            left += this.barWidth + this.margin;
+
+            // Label
+            if (!this._labelDimension || !this._displayLabels) {
+                return;
+            }
+
+            let label = this.addLabel(entry[this._labelDimension], this.barWidth);
+            label.position = barMesh.position.clone();
+            label.position.z -= this.barWidth;
+        });
+
+        return this;
+    }
+
+    /** Clean associated resources */
+    public dispose() {
+        super.dispose();
+        if (this._ownDefaultMaterial && this._defaultMaterial) {
+            this._defaultMaterial.dispose();
+            this._defaultMaterial = null;
+        }
+
+        if (this._pickedPointObserver) {
+            this.onPickedPointChangedObservable.remove(this._pickedPointObserver);
+            this._pickedPointObserver = null;
+        }
+
+        if (this._onElementEnterObserver) {
+            this.onElementEnterObservable.remove(this._onElementEnterObserver);
+            this._onElementEnterObserver = null;
+        }
+
+        if (this._onElementOutObserver) {
+            this.onElementOutObservable.remove(this._onElementOutObserver);
+            this._onElementOutObserver = null;
+        }
+    }
+
+    protected _clean(): void {
+        super._clean();
+        this._barMeshes = null;
+        this._backgroundMesh = null;
+
+        if (this._backgroundADT) {
+            this._backgroundADT.dispose();
+            this._backgroundADT = null;
+        }
+    }
+}

+ 250 - 0
gui/src/3D/charting/chart.ts

@@ -0,0 +1,250 @@
+import { Nullable, TransformNode, Scene, Vector3, Engine, Observer, PointerInfo, Observable, Mesh, AbstractMesh } from "babylonjs";
+import { DataSeries } from ".";
+import { AdvancedDynamicTexture, TextBlock, Rectangle, TextWrapping } from "../../2D";
+
+/** base class for all chart controls*/
+export abstract class Chart {
+    protected _dataSource: Nullable<DataSeries>;
+    protected _rootNode: TransformNode;
+    protected _dataFilters: {[key: string]: string};
+    private _pointerObserver: Nullable<Observer<PointerInfo>>;
+    protected _scene: Scene;
+    private _lastElementOver: Nullable<AbstractMesh>;
+    private _labelMeshes = new Array<Mesh>();
+    protected _blockRefresh = false;
+
+    /** Observable raised when a new element is created */
+    public onElementCreated = new Observable<Mesh>();
+
+    /** User defined callback used to create labels */
+    public labelCreationFunction: (label: string, width: number, includeBackground: boolean) => Mesh;
+
+    /**
+     * Observable raised when the point picked by the pointer events changed
+     */
+    public onPickedPointChangedObservable = new Observable<Nullable<Vector3>>();
+
+    /**
+     * Observable raised when the pointer enters an element of the chart
+    */
+    public onElementEnterObservable = new Observable<AbstractMesh>();
+
+    /**
+     * Observable raised when the pointer leaves an element of the chart
+     */
+    public onElementOutObservable = new Observable<AbstractMesh>();
+
+    /** Gets or sets the rotation of the entire chart */
+    public set rotation(value: Vector3) {
+        this._rootNode.rotation = value;
+    }
+
+    public get rotation(): Vector3 {
+        return this._rootNode.rotation;
+    }
+
+    /** Gets or sets the position of the entire chart */
+    public set position(value: Vector3) {
+        this._rootNode.position = value;
+    }
+
+    public get position(): Vector3 {
+        return this._rootNode.position;
+    }
+
+    /** Gets or sets the scaling of the entire chart */
+    public set scaling(value: Vector3) {
+        this._rootNode.scaling = value;
+    }
+
+    public get scaling(): Vector3 {
+        return this._rootNode.scaling;
+    }
+
+    /** Gets or sets the data source used by the graph */
+    public get dataSource(): Nullable<DataSeries> {
+        return this._dataSource;
+    }
+
+    public set dataSource(value: Nullable<DataSeries>) {
+        if (this._dataSource === value) {
+            return;
+        }
+
+        this._dataSource = value;
+
+        this.refresh();
+    }
+
+    /** Gets the filters applied to data source */
+    public get dataFilters(): {[key: string]: string} {
+        return this._dataFilters;
+    }
+
+    public set dataFilters(filters: {[key: string]: string}) {
+        this._dataFilters = filters;
+
+        this.refresh();
+    }
+
+    /** Gets the root node associated with this graph */
+    public get rootNode(): TransformNode {
+        return this._rootNode;
+    }
+
+    /** Gets or sets a value indicating if refresh function should be executed (useful when multiple changes will happen and you want to run refresh only at the end) */
+    public get blockRefresh(): boolean {
+        return this._blockRefresh;
+    }
+
+    public set blockRefresh(value: boolean) {
+        if (this._blockRefresh === value) {
+            return;
+        }
+
+        this._blockRefresh = value;
+
+        if (value) {
+            this.refresh();
+        }
+    }
+
+    /** Gets or sets the name of the graph */
+    public name: string; 
+
+    /**
+     * Creates a new Chart
+     * @param name defines the name of the graph
+     * @param scene defines the hosting scene
+     */
+    constructor(name: string, scene: Nullable<Scene> = Engine.LastCreatedScene) {
+        this.name = name;
+        this._rootNode = new TransformNode(name, scene);
+
+        this._scene = scene!;
+
+        this._pointerObserver = this._scene.onPointerObservable.add((pi, state) => {
+            if (!pi.pickInfo || !pi.pickInfo.hit) {
+                if (this._lastElementOver) {
+                    this.onElementOutObservable.notifyObservers(this._lastElementOver);
+                    this._lastElementOver = null;
+                }
+
+                this.onPickedPointChangedObservable.notifyObservers(null);
+                return;
+            }
+
+            let metadata = pi.pickInfo.pickedMesh!.metadata;
+            if (metadata && metadata.value) {
+                if (this._lastElementOver !== pi.pickInfo.pickedMesh) {
+                    if (this._lastElementOver) {
+                        this.onElementOutObservable.notifyObservers(this._lastElementOver);
+                        this._lastElementOver = null;
+                    }
+                    this._lastElementOver = pi.pickInfo.pickedMesh;
+                    this.onElementEnterObservable.notifyObservers(this._lastElementOver!);
+                }
+            } else {
+                if (this._lastElementOver) {
+                    this.onElementOutObservable.notifyObservers(this._lastElementOver);
+                    this._lastElementOver = null;
+                }
+            }
+
+            this.onPickedPointChangedObservable.notifyObservers(pi.pickInfo.pickedPoint);
+        });
+    }
+
+    /**
+     * Function called by the chart objects when they need a label. Could be user defined if you set this.labelCreationFunction to a custom callback
+     * @param label defines the text of the label
+     * @param width defines the expected width (height is supposed to be 1)
+     * @param includeBackground defines if a background rectangle must be added (default is true)
+     * @returns a mesh used to host the label
+     */
+    public addLabel(label: string, width: number, includeBackground = true): Mesh {
+        if (this.labelCreationFunction) {
+            let labelMesh = this.labelCreationFunction(label, width, includeBackground);
+            labelMesh.parent = this._rootNode;
+
+            this._labelMeshes.push(labelMesh);
+
+            return labelMesh;
+        }
+
+        let plane = Mesh.CreatePlane(label, 1, this._scene);
+
+        this._labelMeshes.push(plane);
+
+        plane.parent = this._rootNode;
+        plane.billboardMode = Mesh.BILLBOARDMODE_ALL;
+        plane.scaling.x = width;
+
+        let resolution = 256;
+        let adt = AdvancedDynamicTexture.CreateForMesh(plane, resolution, resolution / width, false, true);
+        let textBlock = new TextBlock(label, label);
+        textBlock.color = "White";
+        textBlock.textWrapping = TextWrapping.Ellipsis;
+        textBlock.fontWeight = "Bold";
+        textBlock.fontSize = 50;
+
+        if (includeBackground) {
+            let rectangle = new Rectangle(label + "Border");
+            rectangle.thickness = 4;
+            rectangle.color = "White";
+            rectangle.background = "Black";
+            rectangle.addControl(textBlock);
+            adt.addControl(rectangle);
+        } else {
+            adt.addControl(textBlock);
+        }
+
+        return plane;
+    }
+
+    /**
+     * Remove specific label mesh
+     * @param label defines the label mesh to remove
+     */
+    public removeLabel(label: Mesh): void {
+        let index = this._labelMeshes.indexOf(label);
+
+        if (index === -1) {
+            return;
+        }
+
+        this._labelMeshes.splice(index, 1);
+        label.dispose(false, true);
+    }
+
+    /** Remove all created labels */
+    public removeLabels(): void {
+        this._labelMeshes.forEach(label => {
+            label.dispose(false, true);
+        });
+
+        this._labelMeshes = [];
+    }
+
+    /** 
+     * Force the chart to redraw itself 
+     * @returns the current chart
+    */
+    public abstract refresh(): Chart;
+
+    /** Release all associated resources */
+    public dispose() {
+        if (this._pointerObserver) {
+            this._scene.onPointerObservable.remove(this._pointerObserver);
+            this._pointerObserver = null;
+        }
+
+        this._rootNode.dispose();
+    }
+
+    protected _clean(): void {
+        // Cleanup
+        var descendants = this._rootNode.getDescendants();
+        descendants.forEach(n => n.dispose());
+    }
+}

+ 162 - 0
gui/src/3D/charting/dataSeries.ts

@@ -0,0 +1,162 @@
+import { Color3 } from "babylonjs";
+
+/** Class used to store data to display */
+export class DataSeries {
+    /** Gets or sets the label of the series */
+    public label: string;
+
+    /** Gets or sets the color associated with the series */
+    public color: Color3;
+
+    /** Gets or sets the list of dimensions (used to filter data) */
+    public dimensions: Array<string>;
+
+    /** Gets or sets the list of values (data to display) */
+    public data: Array<any>;  
+
+    /**
+     * Apply a list of filters to the data and return a list
+     * @param filters defines the filters to apply
+     * @returns an array containing the filtered data
+     */
+    public getFilteredData(filters: {[key: string]: string}): Array<any> {
+        let filteredData = new Array<any>();
+
+        this.data.forEach(element => {
+            let isValid = false;
+            for (var filter in filters) {
+                if (!filters.hasOwnProperty(filter)) {
+                    continue;
+                }
+
+                var filterValue = filters[filter];
+                isValid = (element[filter] === filterValue);
+
+                if (!isValid) {
+                    break;
+                }
+            }
+
+            if (isValid) {
+                filteredData.push(element);
+            }
+        });
+
+        return filteredData;
+    }
+
+    /**
+     * Get the different values of a dimension
+     * @param key defines the dimension name
+     * @returns An array of values
+     */
+    public getDimensionValues(key: string): Array<any> {
+        var result = new Array<any>();
+
+        this.data.forEach((entry) => {
+            var value = entry[key];
+            if (result.indexOf(value) === -1) {
+                result.push(value);
+            }
+        });
+
+        return result;
+    }
+
+    /**
+     * Create a new DataSeries containing testing values
+     * @returns the new DataSeries
+     */
+    public static CreateFakeData(): DataSeries {
+        var series = new DataSeries();
+        series.label = "Product #1";
+        series.color = new Color3(1.0, 0, 0);
+
+        series.dimensions = ["Year", "Country"];
+
+        series.data = [
+            {
+                "Year": 2014,
+                "Country": "France",
+                "value": 10
+            }, 
+            {
+                "Year": 2014,
+                "Country": "USA",
+                "value": 200
+            }, 
+            {
+                "Year": 2014,
+                "Country": "India",
+                "value": 400
+            },
+            {
+                "Year": 2014,
+                "Country": "UK",
+                "value": 180
+            },
+            {
+                "Year": 2014,
+                "Country": "Germany",
+                "value": 400
+            }, 
+            {
+                "Year": 2014,
+                "Country": "Australia",
+                "value": 24
+            }, 
+            {
+                "Year": 2014,
+                "Country": "China",
+                "value": 540
+            }, 
+            {
+                "Year": 2014,
+                "Country": "Japan",
+                "value": 150
+            },
+            {
+                "Year": 2015,
+                "Country": "France",
+                "value": 12
+            }, 
+            {
+                "Year": 2015,
+                "Country": "USA",
+                "value": 120
+            }, 
+            {
+                "Year": 2015,
+                "Country": "India",
+                "value": 480
+            }, 
+            {
+                "Year": 2015,
+                "Country": "UK",
+                "value": 10
+            },
+            {
+                "Year": 2015,
+                "Country": "Germany",
+                "value": 80
+            }, 
+            {
+                "Year": 2015,
+                "Country": "Australia",
+                "value": 230
+            }, 
+            {
+                "Year": 2015,
+                "Country": "China",
+                "value": 490
+            }, 
+            {
+                "Year": 2015,
+                "Country": "Japan",
+                "value": 120
+            }
+        ];
+        
+        return series;
+    }
+}

+ 0 - 0
gui/src/3D/charting/index.ts


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است