浏览代码

Fix Typedoc

sebastien 6 年之前
父节点
当前提交
4c6d66de6b
共有 33 个文件被更改,包括 6058 次插入5305 次删除
  1. 4 0
      Tools/Gulp/result.txt
  2. 5151 5151
      dist/preview release/babylon.d.ts
  3. 2 4
      dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts
  4. 16 3
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  5. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.js.map
  6. 16 3
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  7. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js.map
  8. 16 3
      dist/preview release/loaders/babylon.glTFFileLoader.js
  9. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  10. 16 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  11. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js.map
  12. 35 4
      dist/preview release/loaders/babylon.objFileLoader.js
  13. 1 1
      dist/preview release/loaders/babylon.objFileLoader.js.map
  14. 35 4
      dist/preview release/loaders/babylon.objFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js.map
  16. 50 8
      dist/preview release/loaders/babylon.stlFileLoader.js
  17. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.js.map
  18. 50 8
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  19. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.min.js.map
  20. 139 21
      dist/preview release/loaders/babylonjs.loaders.d.ts
  21. 101 15
      dist/preview release/loaders/babylonjs.loaders.js
  22. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  23. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  24. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js.map
  25. 278 42
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  26. 36 5
      loaders/src/OBJ/objFileLoader.ts
  27. 50 8
      loaders/src/STL/stlFileLoader.ts
  28. 2 3
      loaders/src/glTF/1.0/glTFBinaryExtension.ts
  29. 1 0
      loaders/src/glTF/1.0/glTFLoaderExtension.ts
  30. 45 9
      loaders/src/glTF/1.0/glTFLoaderInterfaces.ts
  31. 1 0
      loaders/src/glTF/1.0/glTFLoaderUtils.ts
  32. 2 0
      loaders/src/glTF/1.0/glTFLoaderV1.ts
  33. 1 0
      loaders/src/glTF/1.0/glTFMaterialsCommonExtension.ts

+ 4 - 0
Tools/Gulp/result.txt

@@ -0,0 +1,4 @@
+[17:29:16] Using gulpfile c:\Dev\Babylon\Babylon.js\Tools\Gulp\gulpfile.js
+[17:29:16] Starting 'typedoc-validate'...
+[17:29:17] All formatting check passed successfully during the validation !
+[17:29:17] Finished 'typedoc-validate' after 579 ms

文件差异内容过多而无法显示
+ 5151 - 5151
dist/preview release/babylon.d.ts


+ 2 - 4
dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts

@@ -1,7 +1,3 @@
-/**
- * @ignoreChildren
- * @ignore
- */
 declare module "babylonjs-gltf2interface" {
     /**
      * The datatype of the components in the attribute
@@ -898,6 +894,8 @@ declare module "babylonjs-gltf2interface" {
 
 /**
  * Module for glTF 2.0 Interface
+ * @ignoreChildren
+ * @ignore
  */
 declare module BABYLON.GLTF2 {
     /**

+ 16 - 3
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -187,10 +187,10 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
 var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTFLoaderV1_2 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
 var GLTFBinaryExtension = /** @class */ (function (_super) {
     __extends(GLTFBinaryExtension, _super);
     function GLTFBinaryExtension() {
@@ -244,7 +244,7 @@ var GLTFBinaryExtension = /** @class */ (function (_super) {
     return GLTFBinaryExtension;
 }(glTFLoaderExtension_1.GLTFLoaderExtension));
 exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
+glTFLoaderV1_1.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 
 /***/ }),
@@ -260,6 +260,7 @@ glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
         this._name = name;
@@ -414,6 +415,7 @@ exports.GLTFLoaderExtension = GLTFLoaderExtension;
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
 * Enums
+* @hidden
 */
 var EComponentType;
 (function (EComponentType) {
@@ -423,11 +425,13 @@ var EComponentType;
     EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
     EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
 })(EComponentType = exports.EComponentType || (exports.EComponentType = {}));
+/** @hidden */
 var EShaderType;
 (function (EShaderType) {
     EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
     EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
 })(EShaderType = exports.EShaderType || (exports.EShaderType = {}));
+/** @hidden */
 var EParameterType;
 (function (EParameterType) {
     EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
@@ -452,12 +456,14 @@ var EParameterType;
     EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
     EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
 })(EParameterType = exports.EParameterType || (exports.EParameterType = {}));
+/** @hidden */
 var ETextureWrapMode;
 (function (ETextureWrapMode) {
     ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
     ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
     ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
 })(ETextureWrapMode = exports.ETextureWrapMode || (exports.ETextureWrapMode = {}));
+/** @hidden */
 var ETextureFilterType;
 (function (ETextureFilterType) {
     ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
@@ -467,6 +473,7 @@ var ETextureFilterType;
     ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
     ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
 })(ETextureFilterType = exports.ETextureFilterType || (exports.ETextureFilterType = {}));
+/** @hidden */
 var ETextureFormat;
 (function (ETextureFormat) {
     ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
@@ -475,12 +482,14 @@ var ETextureFormat;
     ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
     ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
 })(ETextureFormat = exports.ETextureFormat || (exports.ETextureFormat = {}));
+/** @hidden */
 var ECullingType;
 (function (ECullingType) {
     ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
     ECullingType[ECullingType["BACK"] = 1029] = "BACK";
     ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
 })(ECullingType = exports.ECullingType || (exports.ECullingType = {}));
+/** @hidden */
 var EBlendingFunction;
 (function (EBlendingFunction) {
     EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
@@ -517,6 +526,7 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
 /**
 * Utils functions for GLTF
+* @hidden
 */
 var GLTFUtils = /** @class */ (function () {
     function GLTFUtils() {
@@ -1728,6 +1738,7 @@ var importMaterials = function (gltfRuntime) {
 };
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 var GLTFLoaderBase = /** @class */ (function () {
     function GLTFLoaderBase() {
@@ -2044,6 +2055,7 @@ var GLTFLoaderBase = /** @class */ (function () {
 exports.GLTFLoaderBase = GLTFLoaderBase;
 /**
 * glTF V1 Loader
+* @hidden
 */
 var GLTFLoaderV1 = /** @class */ (function () {
     function GLTFLoaderV1() {
@@ -2293,6 +2305,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
     function GLTFMaterialsCommonExtension() {

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.js.map


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

@@ -187,10 +187,10 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
 var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTFLoaderV1_2 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
 var GLTFBinaryExtension = /** @class */ (function (_super) {
     __extends(GLTFBinaryExtension, _super);
     function GLTFBinaryExtension() {
@@ -244,7 +244,7 @@ var GLTFBinaryExtension = /** @class */ (function (_super) {
     return GLTFBinaryExtension;
 }(glTFLoaderExtension_1.GLTFLoaderExtension));
 exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
+glTFLoaderV1_1.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 
 /***/ }),
@@ -260,6 +260,7 @@ glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
         this._name = name;
@@ -414,6 +415,7 @@ exports.GLTFLoaderExtension = GLTFLoaderExtension;
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
 * Enums
+* @hidden
 */
 var EComponentType;
 (function (EComponentType) {
@@ -423,11 +425,13 @@ var EComponentType;
     EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
     EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
 })(EComponentType = exports.EComponentType || (exports.EComponentType = {}));
+/** @hidden */
 var EShaderType;
 (function (EShaderType) {
     EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
     EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
 })(EShaderType = exports.EShaderType || (exports.EShaderType = {}));
+/** @hidden */
 var EParameterType;
 (function (EParameterType) {
     EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
@@ -452,12 +456,14 @@ var EParameterType;
     EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
     EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
 })(EParameterType = exports.EParameterType || (exports.EParameterType = {}));
+/** @hidden */
 var ETextureWrapMode;
 (function (ETextureWrapMode) {
     ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
     ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
     ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
 })(ETextureWrapMode = exports.ETextureWrapMode || (exports.ETextureWrapMode = {}));
+/** @hidden */
 var ETextureFilterType;
 (function (ETextureFilterType) {
     ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
@@ -467,6 +473,7 @@ var ETextureFilterType;
     ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
     ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
 })(ETextureFilterType = exports.ETextureFilterType || (exports.ETextureFilterType = {}));
+/** @hidden */
 var ETextureFormat;
 (function (ETextureFormat) {
     ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
@@ -475,12 +482,14 @@ var ETextureFormat;
     ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
     ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
 })(ETextureFormat = exports.ETextureFormat || (exports.ETextureFormat = {}));
+/** @hidden */
 var ECullingType;
 (function (ECullingType) {
     ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
     ECullingType[ECullingType["BACK"] = 1029] = "BACK";
     ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
 })(ECullingType = exports.ECullingType || (exports.ECullingType = {}));
+/** @hidden */
 var EBlendingFunction;
 (function (EBlendingFunction) {
     EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
@@ -517,6 +526,7 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
 /**
 * Utils functions for GLTF
+* @hidden
 */
 var GLTFUtils = /** @class */ (function () {
     function GLTFUtils() {
@@ -1728,6 +1738,7 @@ var importMaterials = function (gltfRuntime) {
 };
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 var GLTFLoaderBase = /** @class */ (function () {
     function GLTFLoaderBase() {
@@ -2044,6 +2055,7 @@ var GLTFLoaderBase = /** @class */ (function () {
 exports.GLTFLoaderBase = GLTFLoaderBase;
 /**
 * glTF V1 Loader
+* @hidden
 */
 var GLTFLoaderV1 = /** @class */ (function () {
     function GLTFLoaderV1() {
@@ -2293,6 +2305,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
     function GLTFMaterialsCommonExtension() {

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js.map


+ 16 - 3
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -192,10 +192,10 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
 var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTFLoaderV1_2 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
 var GLTFBinaryExtension = /** @class */ (function (_super) {
     __extends(GLTFBinaryExtension, _super);
     function GLTFBinaryExtension() {
@@ -249,7 +249,7 @@ var GLTFBinaryExtension = /** @class */ (function (_super) {
     return GLTFBinaryExtension;
 }(glTFLoaderExtension_1.GLTFLoaderExtension));
 exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
+glTFLoaderV1_1.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 
 /***/ }),
@@ -265,6 +265,7 @@ glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
         this._name = name;
@@ -419,6 +420,7 @@ exports.GLTFLoaderExtension = GLTFLoaderExtension;
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
 * Enums
+* @hidden
 */
 var EComponentType;
 (function (EComponentType) {
@@ -428,11 +430,13 @@ var EComponentType;
     EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
     EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
 })(EComponentType = exports.EComponentType || (exports.EComponentType = {}));
+/** @hidden */
 var EShaderType;
 (function (EShaderType) {
     EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
     EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
 })(EShaderType = exports.EShaderType || (exports.EShaderType = {}));
+/** @hidden */
 var EParameterType;
 (function (EParameterType) {
     EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
@@ -457,12 +461,14 @@ var EParameterType;
     EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
     EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
 })(EParameterType = exports.EParameterType || (exports.EParameterType = {}));
+/** @hidden */
 var ETextureWrapMode;
 (function (ETextureWrapMode) {
     ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
     ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
     ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
 })(ETextureWrapMode = exports.ETextureWrapMode || (exports.ETextureWrapMode = {}));
+/** @hidden */
 var ETextureFilterType;
 (function (ETextureFilterType) {
     ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
@@ -472,6 +478,7 @@ var ETextureFilterType;
     ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
     ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
 })(ETextureFilterType = exports.ETextureFilterType || (exports.ETextureFilterType = {}));
+/** @hidden */
 var ETextureFormat;
 (function (ETextureFormat) {
     ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
@@ -480,12 +487,14 @@ var ETextureFormat;
     ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
     ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
 })(ETextureFormat = exports.ETextureFormat || (exports.ETextureFormat = {}));
+/** @hidden */
 var ECullingType;
 (function (ECullingType) {
     ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
     ECullingType[ECullingType["BACK"] = 1029] = "BACK";
     ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
 })(ECullingType = exports.ECullingType || (exports.ECullingType = {}));
+/** @hidden */
 var EBlendingFunction;
 (function (EBlendingFunction) {
     EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
@@ -522,6 +531,7 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
 /**
 * Utils functions for GLTF
+* @hidden
 */
 var GLTFUtils = /** @class */ (function () {
     function GLTFUtils() {
@@ -1733,6 +1743,7 @@ var importMaterials = function (gltfRuntime) {
 };
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 var GLTFLoaderBase = /** @class */ (function () {
     function GLTFLoaderBase() {
@@ -2049,6 +2060,7 @@ var GLTFLoaderBase = /** @class */ (function () {
 exports.GLTFLoaderBase = GLTFLoaderBase;
 /**
 * glTF V1 Loader
+* @hidden
 */
 var GLTFLoaderV1 = /** @class */ (function () {
     function GLTFLoaderV1() {
@@ -2298,6 +2310,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
     function GLTFMaterialsCommonExtension() {

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.js.map


+ 16 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js

@@ -192,10 +192,10 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
 var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTFLoaderV1_2 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
 var GLTFBinaryExtension = /** @class */ (function (_super) {
     __extends(GLTFBinaryExtension, _super);
     function GLTFBinaryExtension() {
@@ -249,7 +249,7 @@ var GLTFBinaryExtension = /** @class */ (function (_super) {
     return GLTFBinaryExtension;
 }(glTFLoaderExtension_1.GLTFLoaderExtension));
 exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
+glTFLoaderV1_1.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 
 /***/ }),
@@ -265,6 +265,7 @@ glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
         this._name = name;
@@ -419,6 +420,7 @@ exports.GLTFLoaderExtension = GLTFLoaderExtension;
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
 * Enums
+* @hidden
 */
 var EComponentType;
 (function (EComponentType) {
@@ -428,11 +430,13 @@ var EComponentType;
     EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
     EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
 })(EComponentType = exports.EComponentType || (exports.EComponentType = {}));
+/** @hidden */
 var EShaderType;
 (function (EShaderType) {
     EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
     EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
 })(EShaderType = exports.EShaderType || (exports.EShaderType = {}));
+/** @hidden */
 var EParameterType;
 (function (EParameterType) {
     EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
@@ -457,12 +461,14 @@ var EParameterType;
     EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
     EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
 })(EParameterType = exports.EParameterType || (exports.EParameterType = {}));
+/** @hidden */
 var ETextureWrapMode;
 (function (ETextureWrapMode) {
     ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
     ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
     ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
 })(ETextureWrapMode = exports.ETextureWrapMode || (exports.ETextureWrapMode = {}));
+/** @hidden */
 var ETextureFilterType;
 (function (ETextureFilterType) {
     ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
@@ -472,6 +478,7 @@ var ETextureFilterType;
     ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
     ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
 })(ETextureFilterType = exports.ETextureFilterType || (exports.ETextureFilterType = {}));
+/** @hidden */
 var ETextureFormat;
 (function (ETextureFormat) {
     ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
@@ -480,12 +487,14 @@ var ETextureFormat;
     ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
     ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
 })(ETextureFormat = exports.ETextureFormat || (exports.ETextureFormat = {}));
+/** @hidden */
 var ECullingType;
 (function (ECullingType) {
     ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
     ECullingType[ECullingType["BACK"] = 1029] = "BACK";
     ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
 })(ECullingType = exports.ECullingType || (exports.ECullingType = {}));
+/** @hidden */
 var EBlendingFunction;
 (function (EBlendingFunction) {
     EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
@@ -522,6 +531,7 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
 /**
 * Utils functions for GLTF
+* @hidden
 */
 var GLTFUtils = /** @class */ (function () {
     function GLTFUtils() {
@@ -1733,6 +1743,7 @@ var importMaterials = function (gltfRuntime) {
 };
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 var GLTFLoaderBase = /** @class */ (function () {
     function GLTFLoaderBase() {
@@ -2049,6 +2060,7 @@ var GLTFLoaderBase = /** @class */ (function () {
 exports.GLTFLoaderBase = GLTFLoaderBase;
 /**
 * glTF V1 Loader
+* @hidden
 */
 var GLTFLoaderV1 = /** @class */ (function () {
     function GLTFLoaderV1() {
@@ -2298,6 +2310,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
     function GLTFMaterialsCommonExtension() {

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js.map


+ 35 - 4
dist/preview release/loaders/babylon.objFileLoader.js

@@ -191,7 +191,9 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
  */
 var MTLFileLoader = /** @class */ (function () {
     function MTLFileLoader() {
-        // All material loaded from the mtl will be set here
+        /**
+         * All material loaded from the mtl will be set here
+         */
         this.materials = [];
     }
     /**
@@ -200,9 +202,9 @@ var MTLFileLoader = /** @class */ (function () {
      * -some component missing (Ni, Tf...)
      * -including the specific options available
      *
-     * @param scene
-     * @param data
-     * @param rootUrl
+     * @param scene defines the scene the material will be created in
+     * @param data defines the mtl data to parse
+     * @param rootUrl defines the rooturl to use in order to load relative dependencies
      */
     MTLFileLoader.prototype.parseMTL = function (scene, data, rootUrl) {
         if (data instanceof ArrayBuffer) {
@@ -394,29 +396,52 @@ var MTLFileLoader = /** @class */ (function () {
     return MTLFileLoader;
 }());
 exports.MTLFileLoader = MTLFileLoader;
+/**
+ * OBJ file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var OBJFileLoader = /** @class */ (function () {
     function OBJFileLoader() {
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "obj";
+        /**
+         * Defines the extension the plugin is able to load.
+         */
         this.extensions = ".obj";
+        /** @hidden */
         this.obj = /^o/;
+        /** @hidden */
         this.group = /^g/;
+        /** @hidden */
         this.mtllib = /^mtllib /;
+        /** @hidden */
         this.usemtl = /^usemtl /;
+        /** @hidden */
         this.smooth = /^s /;
+        /** @hidden */
         this.vertexPattern = /v( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vn float float float
+        /** @hidden */
         this.normalPattern = /vn( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vt float float
+        /** @hidden */
         this.uvPattern = /vt( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // f vertex vertex vertex ...
+        /** @hidden */
         this.facePattern1 = /f\s+(([\d]{1,}[\s]?){3,})+/;
         // f vertex/uvs vertex/uvs vertex/uvs ...
+        /** @hidden */
         this.facePattern2 = /f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal ...
+        /** @hidden */
         this.facePattern3 = /f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex//normal vertex//normal vertex//normal ...
+        /** @hidden */
         this.facePattern4 = /f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/;
         // f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal ...
+        /** @hidden */
         this.facePattern5 = /f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/;
     }
     /**
@@ -1057,7 +1082,13 @@ var OBJFileLoader = /** @class */ (function () {
             return babylonMeshesArray;
         });
     };
+    /**
+     * Defines if UVs are optimized by default during load.
+     */
     OBJFileLoader.OPTIMIZE_WITH_UV = false;
+    /**
+     * Defines if Y is inverted by default during load.
+     */
     OBJFileLoader.INVERT_Y = false;
     return OBJFileLoader;
 }());

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.js.map


+ 35 - 4
dist/preview release/loaders/babylon.objFileLoader.min.js

@@ -191,7 +191,9 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
  */
 var MTLFileLoader = /** @class */ (function () {
     function MTLFileLoader() {
-        // All material loaded from the mtl will be set here
+        /**
+         * All material loaded from the mtl will be set here
+         */
         this.materials = [];
     }
     /**
@@ -200,9 +202,9 @@ var MTLFileLoader = /** @class */ (function () {
      * -some component missing (Ni, Tf...)
      * -including the specific options available
      *
-     * @param scene
-     * @param data
-     * @param rootUrl
+     * @param scene defines the scene the material will be created in
+     * @param data defines the mtl data to parse
+     * @param rootUrl defines the rooturl to use in order to load relative dependencies
      */
     MTLFileLoader.prototype.parseMTL = function (scene, data, rootUrl) {
         if (data instanceof ArrayBuffer) {
@@ -394,29 +396,52 @@ var MTLFileLoader = /** @class */ (function () {
     return MTLFileLoader;
 }());
 exports.MTLFileLoader = MTLFileLoader;
+/**
+ * OBJ file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var OBJFileLoader = /** @class */ (function () {
     function OBJFileLoader() {
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "obj";
+        /**
+         * Defines the extension the plugin is able to load.
+         */
         this.extensions = ".obj";
+        /** @hidden */
         this.obj = /^o/;
+        /** @hidden */
         this.group = /^g/;
+        /** @hidden */
         this.mtllib = /^mtllib /;
+        /** @hidden */
         this.usemtl = /^usemtl /;
+        /** @hidden */
         this.smooth = /^s /;
+        /** @hidden */
         this.vertexPattern = /v( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vn float float float
+        /** @hidden */
         this.normalPattern = /vn( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vt float float
+        /** @hidden */
         this.uvPattern = /vt( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // f vertex vertex vertex ...
+        /** @hidden */
         this.facePattern1 = /f\s+(([\d]{1,}[\s]?){3,})+/;
         // f vertex/uvs vertex/uvs vertex/uvs ...
+        /** @hidden */
         this.facePattern2 = /f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal ...
+        /** @hidden */
         this.facePattern3 = /f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex//normal vertex//normal vertex//normal ...
+        /** @hidden */
         this.facePattern4 = /f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/;
         // f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal ...
+        /** @hidden */
         this.facePattern5 = /f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/;
     }
     /**
@@ -1057,7 +1082,13 @@ var OBJFileLoader = /** @class */ (function () {
             return babylonMeshesArray;
         });
     };
+    /**
+     * Defines if UVs are optimized by default during load.
+     */
     OBJFileLoader.OPTIMIZE_WITH_UV = false;
+    /**
+     * Defines if Y is inverted by default during load.
+     */
     OBJFileLoader.INVERT_Y = false;
     return OBJFileLoader;
 }());

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js.map


+ 50 - 8
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -186,26 +186,52 @@ __export(__webpack_require__(/*! ./stlFileLoader */ "./src/STL/stlFileLoader.ts"
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
+/**
+ * STL file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var STLFileLoader = /** @class */ (function () {
     function STLFileLoader() {
+        /** @hidden */
         this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+        /** @hidden */
         this.facetsPattern = /facet([\s\S]*?)endfacet/g;
+        /** @hidden */
         this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /** @hidden */
         this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "stl";
-        // force data to come in as an ArrayBuffer
-        // we'll convert to string if it looks like it's an ASCII .stl
+        /**
+         * Defines the extensions the stl loader is able to load.
+         * force data to come in as an ArrayBuffer
+         * we'll convert to string if it looks like it's an ASCII .stl
+         */
         this.extensions = {
             ".stl": { isBinary: true },
         };
     }
+    /**
+     * Import meshes into a scene.
+     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+     * @param scene The scene to import into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param meshes The meshes array to import into
+     * @param particleSystems The particle systems array to import into
+     * @param skeletons The skeletons array to import into
+     * @param onError The callback when import fails
+     * @returns True if successful or false otherwise
+     */
     STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
         var matches;
         if (typeof data !== "string") {
-            if (this.isBinary(data)) {
+            if (this._isBinary(data)) {
                 // binary .stl
                 var babylonMesh = new babylonjs_1.Mesh("stlmesh", scene);
-                this.parseBinary(babylonMesh, data);
+                this._parseBinary(babylonMesh, data);
                 if (meshes) {
                     meshes.push(babylonMesh);
                 }
@@ -244,13 +270,21 @@ var STLFileLoader = /** @class */ (function () {
             // stl mesh name can be empty as well
             meshName = meshName || "stlmesh";
             var babylonMesh = new babylonjs_1.Mesh(meshName, scene);
-            this.parseASCII(babylonMesh, matches[2]);
+            this._parseASCII(babylonMesh, matches[2]);
             if (meshes) {
                 meshes.push(babylonMesh);
             }
         }
         return true;
     };
+    /**
+     * Load into a scene.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns true if successful or false otherwise
+     */
     STLFileLoader.prototype.load = function (scene, data, rootUrl) {
         var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
         if (result) {
@@ -258,13 +292,21 @@ var STLFileLoader = /** @class */ (function () {
         }
         return result;
     };
+    /**
+     * Load into an asset container.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns The loaded asset container
+     */
     STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
         var container = new babylonjs_1.AssetContainer(scene);
         this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
         container.removeAllFromScene();
         return container;
     };
-    STLFileLoader.prototype.isBinary = function (data) {
+    STLFileLoader.prototype._isBinary = function (data) {
         // check if file size is correct for binary stl
         var faceSize, nFaces, reader;
         reader = new DataView(data);
@@ -282,7 +324,7 @@ var STLFileLoader = /** @class */ (function () {
         }
         return false;
     };
-    STLFileLoader.prototype.parseBinary = function (mesh, data) {
+    STLFileLoader.prototype._parseBinary = function (mesh, data) {
         var reader = new DataView(data);
         var faces = reader.getUint32(80, true);
         var dataOffset = 84;
@@ -317,7 +359,7 @@ var STLFileLoader = /** @class */ (function () {
         mesh.setIndices(indices);
         mesh.computeWorldMatrix(true);
     };
-    STLFileLoader.prototype.parseASCII = function (mesh, solidData) {
+    STLFileLoader.prototype._parseASCII = function (mesh, solidData) {
         var positions = [];
         var normals = [];
         var indices = [];

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.js.map


+ 50 - 8
dist/preview release/loaders/babylon.stlFileLoader.min.js

@@ -186,26 +186,52 @@ __export(__webpack_require__(/*! ./stlFileLoader */ "./src/STL/stlFileLoader.ts"
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
+/**
+ * STL file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var STLFileLoader = /** @class */ (function () {
     function STLFileLoader() {
+        /** @hidden */
         this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+        /** @hidden */
         this.facetsPattern = /facet([\s\S]*?)endfacet/g;
+        /** @hidden */
         this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /** @hidden */
         this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "stl";
-        // force data to come in as an ArrayBuffer
-        // we'll convert to string if it looks like it's an ASCII .stl
+        /**
+         * Defines the extensions the stl loader is able to load.
+         * force data to come in as an ArrayBuffer
+         * we'll convert to string if it looks like it's an ASCII .stl
+         */
         this.extensions = {
             ".stl": { isBinary: true },
         };
     }
+    /**
+     * Import meshes into a scene.
+     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+     * @param scene The scene to import into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param meshes The meshes array to import into
+     * @param particleSystems The particle systems array to import into
+     * @param skeletons The skeletons array to import into
+     * @param onError The callback when import fails
+     * @returns True if successful or false otherwise
+     */
     STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
         var matches;
         if (typeof data !== "string") {
-            if (this.isBinary(data)) {
+            if (this._isBinary(data)) {
                 // binary .stl
                 var babylonMesh = new babylonjs_1.Mesh("stlmesh", scene);
-                this.parseBinary(babylonMesh, data);
+                this._parseBinary(babylonMesh, data);
                 if (meshes) {
                     meshes.push(babylonMesh);
                 }
@@ -244,13 +270,21 @@ var STLFileLoader = /** @class */ (function () {
             // stl mesh name can be empty as well
             meshName = meshName || "stlmesh";
             var babylonMesh = new babylonjs_1.Mesh(meshName, scene);
-            this.parseASCII(babylonMesh, matches[2]);
+            this._parseASCII(babylonMesh, matches[2]);
             if (meshes) {
                 meshes.push(babylonMesh);
             }
         }
         return true;
     };
+    /**
+     * Load into a scene.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns true if successful or false otherwise
+     */
     STLFileLoader.prototype.load = function (scene, data, rootUrl) {
         var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
         if (result) {
@@ -258,13 +292,21 @@ var STLFileLoader = /** @class */ (function () {
         }
         return result;
     };
+    /**
+     * Load into an asset container.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns The loaded asset container
+     */
     STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
         var container = new babylonjs_1.AssetContainer(scene);
         this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
         container.removeAllFromScene();
         return container;
     };
-    STLFileLoader.prototype.isBinary = function (data) {
+    STLFileLoader.prototype._isBinary = function (data) {
         // check if file size is correct for binary stl
         var faceSize, nFaces, reader;
         reader = new DataView(data);
@@ -282,7 +324,7 @@ var STLFileLoader = /** @class */ (function () {
         }
         return false;
     };
-    STLFileLoader.prototype.parseBinary = function (mesh, data) {
+    STLFileLoader.prototype._parseBinary = function (mesh, data) {
         var reader = new DataView(data);
         var faces = reader.getUint32(80, true);
         var dataOffset = 84;
@@ -317,7 +359,7 @@ var STLFileLoader = /** @class */ (function () {
         mesh.setIndices(indices);
         mesh.computeWorldMatrix(true);
     };
-    STLFileLoader.prototype.parseASCII = function (mesh, solidData) {
+    STLFileLoader.prototype._parseASCII = function (mesh, solidData) {
         var positions = [];
         var normals = [];
         var indices = [];

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.min.js.map


+ 139 - 21
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -326,6 +326,9 @@ declare module BABYLON {
         * Class reading and parsing the MTL file bundled with the obj file.
         */
     export class MTLFileLoader {
+            /**
+                * All material loaded from the mtl will be set here
+                */
             materials: BABYLON.StandardMaterial[];
             /**
                 * This function will read the mtl file and create each material described inside
@@ -333,29 +336,58 @@ declare module BABYLON {
                 * -some component missing (Ni, Tf...)
                 * -including the specific options available
                 *
-                * @param scene
-                * @param data
-                * @param rootUrl
+                * @param scene defines the scene the material will be created in
+                * @param data defines the mtl data to parse
+                * @param rootUrl defines the rooturl to use in order to load relative dependencies
                 */
             parseMTL(scene: BABYLON.Scene, data: string | ArrayBuffer, rootUrl: string): void;
     }
+    /**
+        * OBJ file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class OBJFileLoader implements BABYLON.ISceneLoaderPluginAsync {
+            /**
+                * Defines if UVs are optimized by default during load.
+                */
             static OPTIMIZE_WITH_UV: boolean;
+            /**
+                * Defines if Y is inverted by default during load.
+                */
             static INVERT_Y: boolean;
+            /**
+                * Defines the name of the plugin.
+                */
             name: string;
+            /**
+                * Defines the extension the plugin is able to load.
+                */
             extensions: string;
+            /** @hidden */
             obj: RegExp;
+            /** @hidden */
             group: RegExp;
+            /** @hidden */
             mtllib: RegExp;
+            /** @hidden */
             usemtl: RegExp;
+            /** @hidden */
             smooth: RegExp;
+            /** @hidden */
             vertexPattern: RegExp;
+            /** @hidden */
             normalPattern: RegExp;
+            /** @hidden */
             uvPattern: RegExp;
+            /** @hidden */
             facePattern1: RegExp;
+            /** @hidden */
             facePattern2: RegExp;
+            /** @hidden */
             facePattern3: RegExp;
+            /** @hidden */
             facePattern4: RegExp;
+            /** @hidden */
             facePattern5: RegExp;
             /**
                 * Imports one or more meshes from the loaded glTF data and adds them to the scene
@@ -396,19 +428,64 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /**
+        * STL file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class STLFileLoader implements BABYLON.ISceneLoaderPlugin {
-        solidPattern: RegExp;
-        facetsPattern: RegExp;
-        normalPattern: RegExp;
-        vertexPattern: RegExp;
-        name: string;
-        extensions: BABYLON.ISceneLoaderPluginExtensions;
-        importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
-        load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
-        loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
+            /** @hidden */
+            solidPattern: RegExp;
+            /** @hidden */
+            facetsPattern: RegExp;
+            /** @hidden */
+            normalPattern: RegExp;
+            /** @hidden */
+            vertexPattern: RegExp;
+            /**
+                * Defines the name of the plugin.
+                */
+            name: string;
+            /**
+                * Defines the extensions the stl loader is able to load.
+                * force data to come in as an ArrayBuffer
+                * we'll convert to string if it looks like it's an ASCII .stl
+                */
+            extensions: BABYLON.ISceneLoaderPluginExtensions;
+            /**
+                * Import meshes into a scene.
+                * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+                * @param scene The scene to import into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param meshes The meshes array to import into
+                * @param particleSystems The particle systems array to import into
+                * @param skeletons The skeletons array to import into
+                * @param onError The callback when import fails
+                * @returns True if successful or false otherwise
+                */
+            importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
+            /**
+                * Load into a scene.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns true if successful or false otherwise
+                */
+            load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
+            /**
+                * Load into an asset container.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns The loaded asset container
+                */
+            loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export class GLTFBinaryExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeAsync(scene: BABYLON.Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
@@ -420,6 +497,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Implementation of the base glTF spec
+     * @hidden
      */
     export class GLTFLoaderBase {
         static CreateRuntime(parsedData: any, scene: BABYLON.Scene, rootUrl: string): IGLTFRuntime;
@@ -431,6 +509,7 @@ declare module BABYLON {
     }
     /**
      * glTF V1 Loader
+     * @hidden
      */
     export class GLTFLoaderV1 implements IGLTFLoader {
         static Extensions: {
@@ -466,6 +545,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export abstract class GLTFLoaderExtension {
             constructor(name: string);
             readonly name: string;
@@ -515,6 +595,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Enums
+     * @hidden
      */
     export enum EComponentType {
         BYTE = 5120,
@@ -523,10 +604,12 @@ declare module BABYLON {
         UNSIGNED_SHORT = 5123,
         FLOAT = 5126
     }
+    /** @hidden */
     export enum EShaderType {
         FRAGMENT = 35632,
         VERTEX = 35633
     }
+    /** @hidden */
     export enum EParameterType {
         BYTE = 5120,
         UNSIGNED_BYTE = 5121,
@@ -550,11 +633,13 @@ declare module BABYLON {
         FLOAT_MAT4 = 35676,
         SAMPLER_2D = 35678
     }
+    /** @hidden */
     export enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
         REPEAT = 10497
     }
+    /** @hidden */
     export enum ETextureFilterType {
         NEAREST = 9728,
         LINEAR = 9728,
@@ -563,6 +648,7 @@ declare module BABYLON {
         NEAREST_MIPMAP_LINEAR = 9986,
         LINEAR_MIPMAP_LINEAR = 9987
     }
+    /** @hidden */
     export enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
@@ -570,11 +656,13 @@ declare module BABYLON {
         LUMINANCE = 6409,
         LUMINANCE_ALPHA = 6410
     }
+    /** @hidden */
     export enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
         FRONT_AND_BACK = 1032
     }
+    /** @hidden */
     export enum EBlendingFunction {
         ZERO = 0,
         ONE = 1,
@@ -592,18 +680,18 @@ declare module BABYLON {
         ONE_MINUS_CONSTANT_ALPHA = 32772,
         SRC_ALPHA_SATURATE = 776
     }
-    /**
-     * Interfaces
-     */
+    /** @hidden */
     export interface IGLTFProperty {
         extensions?: {
             [key: string]: any;
         };
         extras?: Object;
     }
+    /** @hidden */
     export interface IGLTFChildRootProperty extends IGLTFProperty {
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFAccessor extends IGLTFChildRootProperty {
         bufferView: string;
         byteOffset: number;
@@ -615,6 +703,7 @@ declare module BABYLON {
         min?: number[];
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: string;
         byteOffset: number;
@@ -622,20 +711,24 @@ declare module BABYLON {
         byteStride: number;
         target?: number;
     }
+    /** @hidden */
     export interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri: string;
         byteLength?: number;
         type?: string;
     }
+    /** @hidden */
     export interface IGLTFShader extends IGLTFChildRootProperty {
         uri: string;
         type: EShaderType;
     }
+    /** @hidden */
     export interface IGLTFProgram extends IGLTFChildRootProperty {
         attributes: string[];
         fragmentShader: string;
         vertexShader: string;
     }
+    /** @hidden */
     export interface IGLTFTechniqueParameter {
         type: number;
         count?: number;
@@ -645,11 +738,13 @@ declare module BABYLON {
         source?: string;
         babylonValue?: any;
     }
+    /** @hidden */
     export interface IGLTFTechniqueCommonProfile {
         lightingModel: string;
         texcoordBindings: Object;
         parameters?: Array<any>;
     }
+    /** @hidden */
     export interface IGLTFTechniqueStatesFunctions {
         blendColor?: number[];
         blendEquationSeparate?: number[];
@@ -657,10 +752,12 @@ declare module BABYLON {
         colorMask: boolean[];
         cullFace: number[];
     }
+    /** @hidden */
     export interface IGLTFTechniqueStates {
         enable: number[];
         functions: IGLTFTechniqueStatesFunctions;
     }
+    /** @hidden */
     export interface IGLTFTechnique extends IGLTFChildRootProperty {
         parameters: {
             [key: string]: IGLTFTechniqueParameter;
@@ -674,10 +771,12 @@ declare module BABYLON {
         };
         states: IGLTFTechniqueStates;
     }
+    /** @hidden */
     export interface IGLTFMaterial extends IGLTFChildRootProperty {
         technique?: string;
         values: string[];
     }
+    /** @hidden */
     export interface IGLTFMeshPrimitive extends IGLTFProperty {
         attributes: {
             [key: string]: string;
@@ -686,18 +785,22 @@ declare module BABYLON {
         material: string;
         mode?: number;
     }
+    /** @hidden */
     export interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
     }
+    /** @hidden */
     export interface IGLTFImage extends IGLTFChildRootProperty {
         uri: string;
     }
+    /** @hidden */
     export interface IGLTFSampler extends IGLTFChildRootProperty {
         magFilter?: number;
         minFilter?: number;
         wrapS?: number;
         wrapT?: number;
     }
+    /** @hidden */
     export interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler: string;
         source: string;
@@ -707,18 +810,22 @@ declare module BABYLON {
         type?: number;
         babylonTexture?: BABYLON.Texture;
     }
+    /** @hidden */
     export interface IGLTFAmbienLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFDirectionalLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFPointLight {
         color?: number[];
         constantAttenuation?: number;
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFSpotLight {
         color?: number[];
         constantAttenuation?: number;
@@ -727,37 +834,45 @@ declare module BABYLON {
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFLight extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFCameraOrthographic {
         xmag: number;
         ymag: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCameraPerspective {
         aspectRatio: number;
         yfov: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCamera extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannelTarget {
         id: string;
         path: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannel {
         sampler: string;
         target: IGLTFAnimationChannelTarget;
     }
+    /** @hidden */
     export interface IGLTFAnimationSampler {
         input: string;
         output: string;
         interpolation?: string;
     }
+    /** @hidden */
     export interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
         parameters?: {
@@ -767,17 +882,20 @@ declare module BABYLON {
             [key: string]: IGLTFAnimationSampler;
         };
     }
+    /** @hidden */
     export interface IGLTFNodeInstanceSkin {
         skeletons: string[];
         skin: string;
         meshes: string[];
     }
+    /** @hidden */
     export interface IGLTFSkins extends IGLTFChildRootProperty {
         bindShapeMatrix: number[];
         inverseBindMatrices: string;
         jointNames: string[];
         babylonSkeleton?: BABYLON.Skeleton;
     }
+    /** @hidden */
     export interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: string;
         children: string[];
@@ -792,12 +910,11 @@ declare module BABYLON {
         translation?: number[];
         babylonNode?: BABYLON.Node;
     }
+    /** @hidden */
     export interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: string[];
     }
-    /**
-     * Runtime
-     */
+    /** @hidden */
     export interface IGLTFRuntime {
         extensions: {
             [key: string]: any;
@@ -869,14 +986,13 @@ declare module BABYLON {
         importMeshesNames?: string[];
         dummyNodes: BABYLON.Node[];
     }
-    /**
-     * Bones
-     */
+    /** @hidden */
     export interface INodeToRoot {
         bone: BABYLON.Bone;
         node: IGLTFNode;
         id: string;
     }
+    /** @hidden */
     export interface IJointNode {
         node: IGLTFNode;
         id: string;
@@ -885,6 +1001,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Utils functions for GLTF
+     * @hidden
      */
     export class GLTFUtils {
             /**
@@ -940,6 +1057,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;

+ 101 - 15
dist/preview release/loaders/babylonjs.loaders.js

@@ -161,7 +161,9 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
  */
 var MTLFileLoader = /** @class */ (function () {
     function MTLFileLoader() {
-        // All material loaded from the mtl will be set here
+        /**
+         * All material loaded from the mtl will be set here
+         */
         this.materials = [];
     }
     /**
@@ -170,9 +172,9 @@ var MTLFileLoader = /** @class */ (function () {
      * -some component missing (Ni, Tf...)
      * -including the specific options available
      *
-     * @param scene
-     * @param data
-     * @param rootUrl
+     * @param scene defines the scene the material will be created in
+     * @param data defines the mtl data to parse
+     * @param rootUrl defines the rooturl to use in order to load relative dependencies
      */
     MTLFileLoader.prototype.parseMTL = function (scene, data, rootUrl) {
         if (data instanceof ArrayBuffer) {
@@ -364,29 +366,52 @@ var MTLFileLoader = /** @class */ (function () {
     return MTLFileLoader;
 }());
 exports.MTLFileLoader = MTLFileLoader;
+/**
+ * OBJ file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var OBJFileLoader = /** @class */ (function () {
     function OBJFileLoader() {
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "obj";
+        /**
+         * Defines the extension the plugin is able to load.
+         */
         this.extensions = ".obj";
+        /** @hidden */
         this.obj = /^o/;
+        /** @hidden */
         this.group = /^g/;
+        /** @hidden */
         this.mtllib = /^mtllib /;
+        /** @hidden */
         this.usemtl = /^usemtl /;
+        /** @hidden */
         this.smooth = /^s /;
+        /** @hidden */
         this.vertexPattern = /v( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vn float float float
+        /** @hidden */
         this.normalPattern = /vn( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // vt float float
+        /** @hidden */
         this.uvPattern = /vt( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
         // f vertex vertex vertex ...
+        /** @hidden */
         this.facePattern1 = /f\s+(([\d]{1,}[\s]?){3,})+/;
         // f vertex/uvs vertex/uvs vertex/uvs ...
+        /** @hidden */
         this.facePattern2 = /f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal ...
+        /** @hidden */
         this.facePattern3 = /f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
         // f vertex//normal vertex//normal vertex//normal ...
+        /** @hidden */
         this.facePattern4 = /f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/;
         // f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal ...
+        /** @hidden */
         this.facePattern5 = /f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/;
     }
     /**
@@ -1027,7 +1052,13 @@ var OBJFileLoader = /** @class */ (function () {
             return babylonMeshesArray;
         });
     };
+    /**
+     * Defines if UVs are optimized by default during load.
+     */
     OBJFileLoader.OPTIMIZE_WITH_UV = false;
+    /**
+     * Defines if Y is inverted by default during load.
+     */
     OBJFileLoader.INVERT_Y = false;
     return OBJFileLoader;
 }());
@@ -1069,26 +1100,52 @@ __export(__webpack_require__(/*! ./stlFileLoader */ "./src/STL/stlFileLoader.ts"
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
+/**
+ * STL file type loader.
+ * This is a babylon scene loader plugin.
+ */
 var STLFileLoader = /** @class */ (function () {
     function STLFileLoader() {
+        /** @hidden */
         this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+        /** @hidden */
         this.facetsPattern = /facet([\s\S]*?)endfacet/g;
+        /** @hidden */
         this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /** @hidden */
         this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+        /**
+         * Defines the name of the plugin.
+         */
         this.name = "stl";
-        // force data to come in as an ArrayBuffer
-        // we'll convert to string if it looks like it's an ASCII .stl
+        /**
+         * Defines the extensions the stl loader is able to load.
+         * force data to come in as an ArrayBuffer
+         * we'll convert to string if it looks like it's an ASCII .stl
+         */
         this.extensions = {
             ".stl": { isBinary: true },
         };
     }
+    /**
+     * Import meshes into a scene.
+     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+     * @param scene The scene to import into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param meshes The meshes array to import into
+     * @param particleSystems The particle systems array to import into
+     * @param skeletons The skeletons array to import into
+     * @param onError The callback when import fails
+     * @returns True if successful or false otherwise
+     */
     STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
         var matches;
         if (typeof data !== "string") {
-            if (this.isBinary(data)) {
+            if (this._isBinary(data)) {
                 // binary .stl
                 var babylonMesh = new babylonjs_1.Mesh("stlmesh", scene);
-                this.parseBinary(babylonMesh, data);
+                this._parseBinary(babylonMesh, data);
                 if (meshes) {
                     meshes.push(babylonMesh);
                 }
@@ -1127,13 +1184,21 @@ var STLFileLoader = /** @class */ (function () {
             // stl mesh name can be empty as well
             meshName = meshName || "stlmesh";
             var babylonMesh = new babylonjs_1.Mesh(meshName, scene);
-            this.parseASCII(babylonMesh, matches[2]);
+            this._parseASCII(babylonMesh, matches[2]);
             if (meshes) {
                 meshes.push(babylonMesh);
             }
         }
         return true;
     };
+    /**
+     * Load into a scene.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns true if successful or false otherwise
+     */
     STLFileLoader.prototype.load = function (scene, data, rootUrl) {
         var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
         if (result) {
@@ -1141,13 +1206,21 @@ var STLFileLoader = /** @class */ (function () {
         }
         return result;
     };
+    /**
+     * Load into an asset container.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns The loaded asset container
+     */
     STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
         var container = new babylonjs_1.AssetContainer(scene);
         this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
         container.removeAllFromScene();
         return container;
     };
-    STLFileLoader.prototype.isBinary = function (data) {
+    STLFileLoader.prototype._isBinary = function (data) {
         // check if file size is correct for binary stl
         var faceSize, nFaces, reader;
         reader = new DataView(data);
@@ -1165,7 +1238,7 @@ var STLFileLoader = /** @class */ (function () {
         }
         return false;
     };
-    STLFileLoader.prototype.parseBinary = function (mesh, data) {
+    STLFileLoader.prototype._parseBinary = function (mesh, data) {
         var reader = new DataView(data);
         var faces = reader.getUint32(80, true);
         var dataOffset = 84;
@@ -1200,7 +1273,7 @@ var STLFileLoader = /** @class */ (function () {
         mesh.setIndices(indices);
         mesh.computeWorldMatrix(true);
     };
-    STLFileLoader.prototype.parseASCII = function (mesh, solidData) {
+    STLFileLoader.prototype._parseASCII = function (mesh, solidData) {
         var positions = [];
         var normals = [];
         var indices = [];
@@ -1265,10 +1338,10 @@ var __extends = (this && this.__extends) || (function () {
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderExtension_1 = __webpack_require__(/*! ./glTFLoaderExtension */ "./src/glTF/1.0/glTFLoaderExtension.ts");
 var glTFLoaderUtils_1 = __webpack_require__(/*! ./glTFLoaderUtils */ "./src/glTF/1.0/glTFLoaderUtils.ts");
-var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
-var glTFLoaderV1_2 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
 var BinaryExtensionBufferName = "binary_glTF";
+/** @hidden */
 var GLTFBinaryExtension = /** @class */ (function (_super) {
     __extends(GLTFBinaryExtension, _super);
     function GLTFBinaryExtension() {
@@ -1322,7 +1395,7 @@ var GLTFBinaryExtension = /** @class */ (function (_super) {
     return GLTFBinaryExtension;
 }(glTFLoaderExtension_1.GLTFLoaderExtension));
 exports.GLTFBinaryExtension = GLTFBinaryExtension;
-glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
+glTFLoaderV1_1.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 
 /***/ }),
@@ -1338,6 +1411,7 @@ glTFLoaderV1_2.GLTFLoaderV1.RegisterExtension(new GLTFBinaryExtension());
 
 Object.defineProperty(exports, "__esModule", { value: true });
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFLoaderExtension = /** @class */ (function () {
     function GLTFLoaderExtension(name) {
         this._name = name;
@@ -1492,6 +1566,7 @@ exports.GLTFLoaderExtension = GLTFLoaderExtension;
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
 * Enums
+* @hidden
 */
 var EComponentType;
 (function (EComponentType) {
@@ -1501,11 +1576,13 @@ var EComponentType;
     EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
     EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
 })(EComponentType = exports.EComponentType || (exports.EComponentType = {}));
+/** @hidden */
 var EShaderType;
 (function (EShaderType) {
     EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
     EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
 })(EShaderType = exports.EShaderType || (exports.EShaderType = {}));
+/** @hidden */
 var EParameterType;
 (function (EParameterType) {
     EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
@@ -1530,12 +1607,14 @@ var EParameterType;
     EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
     EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
 })(EParameterType = exports.EParameterType || (exports.EParameterType = {}));
+/** @hidden */
 var ETextureWrapMode;
 (function (ETextureWrapMode) {
     ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
     ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
     ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
 })(ETextureWrapMode = exports.ETextureWrapMode || (exports.ETextureWrapMode = {}));
+/** @hidden */
 var ETextureFilterType;
 (function (ETextureFilterType) {
     ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
@@ -1545,6 +1624,7 @@ var ETextureFilterType;
     ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
     ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
 })(ETextureFilterType = exports.ETextureFilterType || (exports.ETextureFilterType = {}));
+/** @hidden */
 var ETextureFormat;
 (function (ETextureFormat) {
     ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
@@ -1553,12 +1633,14 @@ var ETextureFormat;
     ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
     ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
 })(ETextureFormat = exports.ETextureFormat || (exports.ETextureFormat = {}));
+/** @hidden */
 var ECullingType;
 (function (ECullingType) {
     ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
     ECullingType[ECullingType["BACK"] = 1029] = "BACK";
     ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
 })(ECullingType = exports.ECullingType || (exports.ECullingType = {}));
+/** @hidden */
 var EBlendingFunction;
 (function (EBlendingFunction) {
     EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
@@ -1595,6 +1677,7 @@ var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderInterfaces_1 = __webpack_require__(/*! ./glTFLoaderInterfaces */ "./src/glTF/1.0/glTFLoaderInterfaces.ts");
 /**
 * Utils functions for GLTF
+* @hidden
 */
 var GLTFUtils = /** @class */ (function () {
     function GLTFUtils() {
@@ -2806,6 +2889,7 @@ var importMaterials = function (gltfRuntime) {
 };
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 var GLTFLoaderBase = /** @class */ (function () {
     function GLTFLoaderBase() {
@@ -3122,6 +3206,7 @@ var GLTFLoaderBase = /** @class */ (function () {
 exports.GLTFLoaderBase = GLTFLoaderBase;
 /**
 * glTF V1 Loader
+* @hidden
 */
 var GLTFLoaderV1 = /** @class */ (function () {
     function GLTFLoaderV1() {
@@ -3371,6 +3456,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var _1 = __webpack_require__(/*! . */ "./src/glTF/1.0/index.ts");
 var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
 var glTFLoaderV1_1 = __webpack_require__(/*! ./glTFLoaderV1 */ "./src/glTF/1.0/glTFLoaderV1.ts");
+/** @hidden */
 var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
     __extends(GLTFMaterialsCommonExtension, _super);
     function GLTFMaterialsCommonExtension() {

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.js.map


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js.map


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

@@ -367,6 +367,9 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
         * Class reading and parsing the MTL file bundled with the obj file.
         */
     export class MTLFileLoader {
+            /**
+                * All material loaded from the mtl will be set here
+                */
             materials: StandardMaterial[];
             /**
                 * This function will read the mtl file and create each material described inside
@@ -374,29 +377,58 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
                 * -some component missing (Ni, Tf...)
                 * -including the specific options available
                 *
-                * @param scene
-                * @param data
-                * @param rootUrl
+                * @param scene defines the scene the material will be created in
+                * @param data defines the mtl data to parse
+                * @param rootUrl defines the rooturl to use in order to load relative dependencies
                 */
             parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string): void;
     }
+    /**
+        * OBJ file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class OBJFileLoader implements ISceneLoaderPluginAsync {
+            /**
+                * Defines if UVs are optimized by default during load.
+                */
             static OPTIMIZE_WITH_UV: boolean;
+            /**
+                * Defines if Y is inverted by default during load.
+                */
             static INVERT_Y: boolean;
+            /**
+                * Defines the name of the plugin.
+                */
             name: string;
+            /**
+                * Defines the extension the plugin is able to load.
+                */
             extensions: string;
+            /** @hidden */
             obj: RegExp;
+            /** @hidden */
             group: RegExp;
+            /** @hidden */
             mtllib: RegExp;
+            /** @hidden */
             usemtl: RegExp;
+            /** @hidden */
             smooth: RegExp;
+            /** @hidden */
             vertexPattern: RegExp;
+            /** @hidden */
             normalPattern: RegExp;
+            /** @hidden */
             uvPattern: RegExp;
+            /** @hidden */
             facePattern1: RegExp;
+            /** @hidden */
             facePattern2: RegExp;
+            /** @hidden */
             facePattern3: RegExp;
+            /** @hidden */
             facePattern4: RegExp;
+            /** @hidden */
             facePattern5: RegExp;
             /**
                 * Imports one or more meshes from the loaded glTF data and adds them to the scene
@@ -439,16 +471,60 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
 
 declare module 'babylonjs-loaders/src/STL/stlFileLoader' {
     import { ISceneLoaderPlugin, ISceneLoaderPluginExtensions, Scene, Nullable, AbstractMesh, IParticleSystem, Skeleton, AssetContainer } from "babylonjs";
+    /**
+        * STL file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class STLFileLoader implements ISceneLoaderPlugin {
-        solidPattern: RegExp;
-        facetsPattern: RegExp;
-        normalPattern: RegExp;
-        vertexPattern: RegExp;
-        name: string;
-        extensions: ISceneLoaderPluginExtensions;
-        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;
+            /** @hidden */
+            solidPattern: RegExp;
+            /** @hidden */
+            facetsPattern: RegExp;
+            /** @hidden */
+            normalPattern: RegExp;
+            /** @hidden */
+            vertexPattern: RegExp;
+            /**
+                * Defines the name of the plugin.
+                */
+            name: string;
+            /**
+                * Defines the extensions the stl loader is able to load.
+                * force data to come in as an ArrayBuffer
+                * we'll convert to string if it looks like it's an ASCII .stl
+                */
+            extensions: ISceneLoaderPluginExtensions;
+            /**
+                * Import meshes into a scene.
+                * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+                * @param scene The scene to import into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param meshes The meshes array to import into
+                * @param particleSystems The particle systems array to import into
+                * @param skeletons The skeletons array to import into
+                * @param onError The callback when import fails
+                * @returns True if successful or false otherwise
+                */
+            importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
+            /**
+                * Load into a scene.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns true if successful or false otherwise
+                */
+            load(scene: Scene, data: any, rootUrl: string): boolean;
+            /**
+                * Load into an asset container.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns The loaded asset container
+                */
+            loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
     }
 }
 
@@ -457,6 +533,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFBinaryExtension' {
     import { Scene } from "babylonjs";
     import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
     import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
+    /** @hidden */
     export class GLTFBinaryExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
@@ -473,6 +550,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderV1' {
     import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension";
     /**
      * Implementation of the base glTF spec
+     * @hidden
      */
     export class GLTFLoaderBase {
         static CreateRuntime(parsedData: any, scene: Scene, rootUrl: string): IGLTFRuntime;
@@ -484,6 +562,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderV1' {
     }
     /**
      * glTF V1 Loader
+     * @hidden
      */
     export class GLTFLoaderV1 implements IGLTFLoader {
         static Extensions: {
@@ -523,6 +602,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension' {
     import { Scene, Texture, Material } from "babylonjs";
     import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
     import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
+    /** @hidden */
     export abstract class GLTFLoaderExtension {
             constructor(name: string);
             readonly name: string;
@@ -574,6 +654,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
     import { Texture, Skeleton, Scene, Bone, Node } from "babylonjs";
     /**
      * Enums
+     * @hidden
      */
     export enum EComponentType {
         BYTE = 5120,
@@ -582,10 +663,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         UNSIGNED_SHORT = 5123,
         FLOAT = 5126
     }
+    /** @hidden */
     export enum EShaderType {
         FRAGMENT = 35632,
         VERTEX = 35633
     }
+    /** @hidden */
     export enum EParameterType {
         BYTE = 5120,
         UNSIGNED_BYTE = 5121,
@@ -609,11 +692,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         FLOAT_MAT4 = 35676,
         SAMPLER_2D = 35678
     }
+    /** @hidden */
     export enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
         REPEAT = 10497
     }
+    /** @hidden */
     export enum ETextureFilterType {
         NEAREST = 9728,
         LINEAR = 9728,
@@ -622,6 +707,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         NEAREST_MIPMAP_LINEAR = 9986,
         LINEAR_MIPMAP_LINEAR = 9987
     }
+    /** @hidden */
     export enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
@@ -629,11 +715,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         LUMINANCE = 6409,
         LUMINANCE_ALPHA = 6410
     }
+    /** @hidden */
     export enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
         FRONT_AND_BACK = 1032
     }
+    /** @hidden */
     export enum EBlendingFunction {
         ZERO = 0,
         ONE = 1,
@@ -651,18 +739,18 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         ONE_MINUS_CONSTANT_ALPHA = 32772,
         SRC_ALPHA_SATURATE = 776
     }
-    /**
-     * Interfaces
-     */
+    /** @hidden */
     export interface IGLTFProperty {
         extensions?: {
             [key: string]: any;
         };
         extras?: Object;
     }
+    /** @hidden */
     export interface IGLTFChildRootProperty extends IGLTFProperty {
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFAccessor extends IGLTFChildRootProperty {
         bufferView: string;
         byteOffset: number;
@@ -674,6 +762,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         min?: number[];
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: string;
         byteOffset: number;
@@ -681,20 +770,24 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         byteStride: number;
         target?: number;
     }
+    /** @hidden */
     export interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri: string;
         byteLength?: number;
         type?: string;
     }
+    /** @hidden */
     export interface IGLTFShader extends IGLTFChildRootProperty {
         uri: string;
         type: EShaderType;
     }
+    /** @hidden */
     export interface IGLTFProgram extends IGLTFChildRootProperty {
         attributes: string[];
         fragmentShader: string;
         vertexShader: string;
     }
+    /** @hidden */
     export interface IGLTFTechniqueParameter {
         type: number;
         count?: number;
@@ -704,11 +797,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         source?: string;
         babylonValue?: any;
     }
+    /** @hidden */
     export interface IGLTFTechniqueCommonProfile {
         lightingModel: string;
         texcoordBindings: Object;
         parameters?: Array<any>;
     }
+    /** @hidden */
     export interface IGLTFTechniqueStatesFunctions {
         blendColor?: number[];
         blendEquationSeparate?: number[];
@@ -716,10 +811,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         colorMask: boolean[];
         cullFace: number[];
     }
+    /** @hidden */
     export interface IGLTFTechniqueStates {
         enable: number[];
         functions: IGLTFTechniqueStatesFunctions;
     }
+    /** @hidden */
     export interface IGLTFTechnique extends IGLTFChildRootProperty {
         parameters: {
             [key: string]: IGLTFTechniqueParameter;
@@ -733,10 +830,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         };
         states: IGLTFTechniqueStates;
     }
+    /** @hidden */
     export interface IGLTFMaterial extends IGLTFChildRootProperty {
         technique?: string;
         values: string[];
     }
+    /** @hidden */
     export interface IGLTFMeshPrimitive extends IGLTFProperty {
         attributes: {
             [key: string]: string;
@@ -745,18 +844,22 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         material: string;
         mode?: number;
     }
+    /** @hidden */
     export interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
     }
+    /** @hidden */
     export interface IGLTFImage extends IGLTFChildRootProperty {
         uri: string;
     }
+    /** @hidden */
     export interface IGLTFSampler extends IGLTFChildRootProperty {
         magFilter?: number;
         minFilter?: number;
         wrapS?: number;
         wrapT?: number;
     }
+    /** @hidden */
     export interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler: string;
         source: string;
@@ -766,18 +869,22 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         type?: number;
         babylonTexture?: Texture;
     }
+    /** @hidden */
     export interface IGLTFAmbienLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFDirectionalLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFPointLight {
         color?: number[];
         constantAttenuation?: number;
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFSpotLight {
         color?: number[];
         constantAttenuation?: number;
@@ -786,37 +893,45 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFLight extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFCameraOrthographic {
         xmag: number;
         ymag: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCameraPerspective {
         aspectRatio: number;
         yfov: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCamera extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannelTarget {
         id: string;
         path: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannel {
         sampler: string;
         target: IGLTFAnimationChannelTarget;
     }
+    /** @hidden */
     export interface IGLTFAnimationSampler {
         input: string;
         output: string;
         interpolation?: string;
     }
+    /** @hidden */
     export interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
         parameters?: {
@@ -826,17 +941,20 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
             [key: string]: IGLTFAnimationSampler;
         };
     }
+    /** @hidden */
     export interface IGLTFNodeInstanceSkin {
         skeletons: string[];
         skin: string;
         meshes: string[];
     }
+    /** @hidden */
     export interface IGLTFSkins extends IGLTFChildRootProperty {
         bindShapeMatrix: number[];
         inverseBindMatrices: string;
         jointNames: string[];
         babylonSkeleton?: Skeleton;
     }
+    /** @hidden */
     export interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: string;
         children: string[];
@@ -851,12 +969,11 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         translation?: number[];
         babylonNode?: Node;
     }
+    /** @hidden */
     export interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: string[];
     }
-    /**
-     * Runtime
-     */
+    /** @hidden */
     export interface IGLTFRuntime {
         extensions: {
             [key: string]: any;
@@ -928,14 +1045,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
         importMeshesNames?: string[];
         dummyNodes: Node[];
     }
-    /**
-     * Bones
-     */
+    /** @hidden */
     export interface INodeToRoot {
         bone: Bone;
         node: IGLTFNode;
         id: string;
     }
+    /** @hidden */
     export interface IJointNode {
         node: IGLTFNode;
         id: string;
@@ -947,6 +1063,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderUtils' {
     import { IGLTFTechniqueParameter, IGLTFAccessor, ETextureFilterType, IGLTFRuntime, IGLTFBufferView, EComponentType } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
     /**
      * Utils functions for GLTF
+     * @hidden
      */
     export class GLTFUtils {
             /**
@@ -1006,6 +1123,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFMaterialsCommonExtension' {
     import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0";
     import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
     import { Material } from "babylonjs";
+    /** @hidden */
     export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
@@ -2089,6 +2207,9 @@ declare module BABYLON {
         * Class reading and parsing the MTL file bundled with the obj file.
         */
     export class MTLFileLoader {
+            /**
+                * All material loaded from the mtl will be set here
+                */
             materials: BABYLON.StandardMaterial[];
             /**
                 * This function will read the mtl file and create each material described inside
@@ -2096,29 +2217,58 @@ declare module BABYLON {
                 * -some component missing (Ni, Tf...)
                 * -including the specific options available
                 *
-                * @param scene
-                * @param data
-                * @param rootUrl
+                * @param scene defines the scene the material will be created in
+                * @param data defines the mtl data to parse
+                * @param rootUrl defines the rooturl to use in order to load relative dependencies
                 */
             parseMTL(scene: BABYLON.Scene, data: string | ArrayBuffer, rootUrl: string): void;
     }
+    /**
+        * OBJ file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class OBJFileLoader implements BABYLON.ISceneLoaderPluginAsync {
+            /**
+                * Defines if UVs are optimized by default during load.
+                */
             static OPTIMIZE_WITH_UV: boolean;
+            /**
+                * Defines if Y is inverted by default during load.
+                */
             static INVERT_Y: boolean;
+            /**
+                * Defines the name of the plugin.
+                */
             name: string;
+            /**
+                * Defines the extension the plugin is able to load.
+                */
             extensions: string;
+            /** @hidden */
             obj: RegExp;
+            /** @hidden */
             group: RegExp;
+            /** @hidden */
             mtllib: RegExp;
+            /** @hidden */
             usemtl: RegExp;
+            /** @hidden */
             smooth: RegExp;
+            /** @hidden */
             vertexPattern: RegExp;
+            /** @hidden */
             normalPattern: RegExp;
+            /** @hidden */
             uvPattern: RegExp;
+            /** @hidden */
             facePattern1: RegExp;
+            /** @hidden */
             facePattern2: RegExp;
+            /** @hidden */
             facePattern3: RegExp;
+            /** @hidden */
             facePattern4: RegExp;
+            /** @hidden */
             facePattern5: RegExp;
             /**
                 * Imports one or more meshes from the loaded glTF data and adds them to the scene
@@ -2159,19 +2309,64 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /**
+        * STL file type loader.
+        * This is a babylon scene loader plugin.
+        */
     export class STLFileLoader implements BABYLON.ISceneLoaderPlugin {
-        solidPattern: RegExp;
-        facetsPattern: RegExp;
-        normalPattern: RegExp;
-        vertexPattern: RegExp;
-        name: string;
-        extensions: BABYLON.ISceneLoaderPluginExtensions;
-        importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
-        load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
-        loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
+            /** @hidden */
+            solidPattern: RegExp;
+            /** @hidden */
+            facetsPattern: RegExp;
+            /** @hidden */
+            normalPattern: RegExp;
+            /** @hidden */
+            vertexPattern: RegExp;
+            /**
+                * Defines the name of the plugin.
+                */
+            name: string;
+            /**
+                * Defines the extensions the stl loader is able to load.
+                * force data to come in as an ArrayBuffer
+                * we'll convert to string if it looks like it's an ASCII .stl
+                */
+            extensions: BABYLON.ISceneLoaderPluginExtensions;
+            /**
+                * Import meshes into a scene.
+                * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+                * @param scene The scene to import into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param meshes The meshes array to import into
+                * @param particleSystems The particle systems array to import into
+                * @param skeletons The skeletons array to import into
+                * @param onError The callback when import fails
+                * @returns True if successful or false otherwise
+                */
+            importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
+            /**
+                * Load into a scene.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns true if successful or false otherwise
+                */
+            load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
+            /**
+                * Load into an asset container.
+                * @param scene The scene to load into
+                * @param data The data to import
+                * @param rootUrl The root url for scene and resources
+                * @param onError The callback when import fails
+                * @returns The loaded asset container
+                */
+            loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export class GLTFBinaryExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeAsync(scene: BABYLON.Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
@@ -2183,6 +2378,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Implementation of the base glTF spec
+     * @hidden
      */
     export class GLTFLoaderBase {
         static CreateRuntime(parsedData: any, scene: BABYLON.Scene, rootUrl: string): IGLTFRuntime;
@@ -2194,6 +2390,7 @@ declare module BABYLON {
     }
     /**
      * glTF V1 Loader
+     * @hidden
      */
     export class GLTFLoaderV1 implements IGLTFLoader {
         static Extensions: {
@@ -2229,6 +2426,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export abstract class GLTFLoaderExtension {
             constructor(name: string);
             readonly name: string;
@@ -2278,6 +2476,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Enums
+     * @hidden
      */
     export enum EComponentType {
         BYTE = 5120,
@@ -2286,10 +2485,12 @@ declare module BABYLON {
         UNSIGNED_SHORT = 5123,
         FLOAT = 5126
     }
+    /** @hidden */
     export enum EShaderType {
         FRAGMENT = 35632,
         VERTEX = 35633
     }
+    /** @hidden */
     export enum EParameterType {
         BYTE = 5120,
         UNSIGNED_BYTE = 5121,
@@ -2313,11 +2514,13 @@ declare module BABYLON {
         FLOAT_MAT4 = 35676,
         SAMPLER_2D = 35678
     }
+    /** @hidden */
     export enum ETextureWrapMode {
         CLAMP_TO_EDGE = 33071,
         MIRRORED_REPEAT = 33648,
         REPEAT = 10497
     }
+    /** @hidden */
     export enum ETextureFilterType {
         NEAREST = 9728,
         LINEAR = 9728,
@@ -2326,6 +2529,7 @@ declare module BABYLON {
         NEAREST_MIPMAP_LINEAR = 9986,
         LINEAR_MIPMAP_LINEAR = 9987
     }
+    /** @hidden */
     export enum ETextureFormat {
         ALPHA = 6406,
         RGB = 6407,
@@ -2333,11 +2537,13 @@ declare module BABYLON {
         LUMINANCE = 6409,
         LUMINANCE_ALPHA = 6410
     }
+    /** @hidden */
     export enum ECullingType {
         FRONT = 1028,
         BACK = 1029,
         FRONT_AND_BACK = 1032
     }
+    /** @hidden */
     export enum EBlendingFunction {
         ZERO = 0,
         ONE = 1,
@@ -2355,18 +2561,18 @@ declare module BABYLON {
         ONE_MINUS_CONSTANT_ALPHA = 32772,
         SRC_ALPHA_SATURATE = 776
     }
-    /**
-     * Interfaces
-     */
+    /** @hidden */
     export interface IGLTFProperty {
         extensions?: {
             [key: string]: any;
         };
         extras?: Object;
     }
+    /** @hidden */
     export interface IGLTFChildRootProperty extends IGLTFProperty {
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFAccessor extends IGLTFChildRootProperty {
         bufferView: string;
         byteOffset: number;
@@ -2378,6 +2584,7 @@ declare module BABYLON {
         min?: number[];
         name?: string;
     }
+    /** @hidden */
     export interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: string;
         byteOffset: number;
@@ -2385,20 +2592,24 @@ declare module BABYLON {
         byteStride: number;
         target?: number;
     }
+    /** @hidden */
     export interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri: string;
         byteLength?: number;
         type?: string;
     }
+    /** @hidden */
     export interface IGLTFShader extends IGLTFChildRootProperty {
         uri: string;
         type: EShaderType;
     }
+    /** @hidden */
     export interface IGLTFProgram extends IGLTFChildRootProperty {
         attributes: string[];
         fragmentShader: string;
         vertexShader: string;
     }
+    /** @hidden */
     export interface IGLTFTechniqueParameter {
         type: number;
         count?: number;
@@ -2408,11 +2619,13 @@ declare module BABYLON {
         source?: string;
         babylonValue?: any;
     }
+    /** @hidden */
     export interface IGLTFTechniqueCommonProfile {
         lightingModel: string;
         texcoordBindings: Object;
         parameters?: Array<any>;
     }
+    /** @hidden */
     export interface IGLTFTechniqueStatesFunctions {
         blendColor?: number[];
         blendEquationSeparate?: number[];
@@ -2420,10 +2633,12 @@ declare module BABYLON {
         colorMask: boolean[];
         cullFace: number[];
     }
+    /** @hidden */
     export interface IGLTFTechniqueStates {
         enable: number[];
         functions: IGLTFTechniqueStatesFunctions;
     }
+    /** @hidden */
     export interface IGLTFTechnique extends IGLTFChildRootProperty {
         parameters: {
             [key: string]: IGLTFTechniqueParameter;
@@ -2437,10 +2652,12 @@ declare module BABYLON {
         };
         states: IGLTFTechniqueStates;
     }
+    /** @hidden */
     export interface IGLTFMaterial extends IGLTFChildRootProperty {
         technique?: string;
         values: string[];
     }
+    /** @hidden */
     export interface IGLTFMeshPrimitive extends IGLTFProperty {
         attributes: {
             [key: string]: string;
@@ -2449,18 +2666,22 @@ declare module BABYLON {
         material: string;
         mode?: number;
     }
+    /** @hidden */
     export interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
     }
+    /** @hidden */
     export interface IGLTFImage extends IGLTFChildRootProperty {
         uri: string;
     }
+    /** @hidden */
     export interface IGLTFSampler extends IGLTFChildRootProperty {
         magFilter?: number;
         minFilter?: number;
         wrapS?: number;
         wrapT?: number;
     }
+    /** @hidden */
     export interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler: string;
         source: string;
@@ -2470,18 +2691,22 @@ declare module BABYLON {
         type?: number;
         babylonTexture?: BABYLON.Texture;
     }
+    /** @hidden */
     export interface IGLTFAmbienLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFDirectionalLight {
         color?: number[];
     }
+    /** @hidden */
     export interface IGLTFPointLight {
         color?: number[];
         constantAttenuation?: number;
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFSpotLight {
         color?: number[];
         constantAttenuation?: number;
@@ -2490,37 +2715,45 @@ declare module BABYLON {
         linearAttenuation?: number;
         quadraticAttenuation?: number;
     }
+    /** @hidden */
     export interface IGLTFLight extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFCameraOrthographic {
         xmag: number;
         ymag: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCameraPerspective {
         aspectRatio: number;
         yfov: number;
         zfar: number;
         znear: number;
     }
+    /** @hidden */
     export interface IGLTFCamera extends IGLTFChildRootProperty {
         type: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannelTarget {
         id: string;
         path: string;
     }
+    /** @hidden */
     export interface IGLTFAnimationChannel {
         sampler: string;
         target: IGLTFAnimationChannelTarget;
     }
+    /** @hidden */
     export interface IGLTFAnimationSampler {
         input: string;
         output: string;
         interpolation?: string;
     }
+    /** @hidden */
     export interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
         parameters?: {
@@ -2530,17 +2763,20 @@ declare module BABYLON {
             [key: string]: IGLTFAnimationSampler;
         };
     }
+    /** @hidden */
     export interface IGLTFNodeInstanceSkin {
         skeletons: string[];
         skin: string;
         meshes: string[];
     }
+    /** @hidden */
     export interface IGLTFSkins extends IGLTFChildRootProperty {
         bindShapeMatrix: number[];
         inverseBindMatrices: string;
         jointNames: string[];
         babylonSkeleton?: BABYLON.Skeleton;
     }
+    /** @hidden */
     export interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: string;
         children: string[];
@@ -2555,12 +2791,11 @@ declare module BABYLON {
         translation?: number[];
         babylonNode?: BABYLON.Node;
     }
+    /** @hidden */
     export interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: string[];
     }
-    /**
-     * Runtime
-     */
+    /** @hidden */
     export interface IGLTFRuntime {
         extensions: {
             [key: string]: any;
@@ -2632,14 +2867,13 @@ declare module BABYLON {
         importMeshesNames?: string[];
         dummyNodes: BABYLON.Node[];
     }
-    /**
-     * Bones
-     */
+    /** @hidden */
     export interface INodeToRoot {
         bone: BABYLON.Bone;
         node: IGLTFNode;
         id: string;
     }
+    /** @hidden */
     export interface IJointNode {
         node: IGLTFNode;
         id: string;
@@ -2648,6 +2882,7 @@ declare module BABYLON {
 declare module BABYLON {
     /**
      * Utils functions for GLTF
+     * @hidden
      */
     export class GLTFUtils {
             /**
@@ -2703,6 +2938,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    /** @hidden */
     export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
         constructor();
         loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;

+ 36 - 5
loaders/src/OBJ/objFileLoader.ts

@@ -5,7 +5,9 @@ import { Geometry, Mesh, SceneLoader, Vector3, Vector2, Tools, Color3, StandardM
  */
 export class MTLFileLoader {
 
-    // All material loaded from the mtl will be set here
+    /**
+     * All material loaded from the mtl will be set here
+     */
     public materials: StandardMaterial[] = [];
 
     /**
@@ -14,11 +16,11 @@ export class MTLFileLoader {
      * -some component missing (Ni, Tf...)
      * -including the specific options available
      *
-     * @param scene
-     * @param data
-     * @param rootUrl
+     * @param scene defines the scene the material will be created in
+     * @param data defines the mtl data to parse
+     * @param rootUrl defines the rooturl to use in order to load relative dependencies
      */
-    public parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string) {
+    public parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string): void {
         if (data instanceof ArrayBuffer) {
             return;
         }
@@ -199,31 +201,60 @@ export class MTLFileLoader {
     }
 }
 
+/**
+ * OBJ file type loader.
+ * This is a babylon scene loader plugin.
+ */
 export class OBJFileLoader implements ISceneLoaderPluginAsync {
 
+    /**
+     * Defines if UVs are optimized by default during load.
+     */
     public static OPTIMIZE_WITH_UV = false;
+    /**
+     * Defines if Y is inverted by default during load.
+     */
     public static INVERT_Y = false;
+    /**
+     * Defines the name of the plugin.
+     */
     public name = "obj";
+    /**
+     * Defines the extension the plugin is able to load.
+     */
     public extensions = ".obj";
+    /** @hidden */
     public obj = /^o/;
+    /** @hidden */
     public group = /^g/;
+    /** @hidden */
     public mtllib = /^mtllib /;
+    /** @hidden */
     public usemtl = /^usemtl /;
+    /** @hidden */
     public smooth = /^s /;
+    /** @hidden */
     public vertexPattern = /v( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
     // vn float float float
+    /** @hidden */
     public normalPattern = /vn( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
     // vt float float
+    /** @hidden */
     public uvPattern = /vt( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/;
     // f vertex vertex vertex ...
+    /** @hidden */
     public facePattern1 = /f\s+(([\d]{1,}[\s]?){3,})+/;
     // f vertex/uvs vertex/uvs vertex/uvs ...
+    /** @hidden */
     public facePattern2 = /f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
     // f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal ...
+    /** @hidden */
     public facePattern3 = /f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/;
     // f vertex//normal vertex//normal vertex//normal ...
+    /** @hidden */
     public facePattern4 = /f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/;
     // f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal ...
+    /** @hidden */
     public facePattern5 = /f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/;
 
     /**

+ 50 - 8
loaders/src/STL/stlFileLoader.ts

@@ -1,29 +1,55 @@
 import { SceneLoader, ISceneLoaderPlugin, ISceneLoaderPluginExtensions, Scene, Nullable, AbstractMesh, IParticleSystem, Skeleton, Mesh, Tools, AssetContainer, VertexBuffer } from "babylonjs";
 
+/**
+ * STL file type loader.
+ * This is a babylon scene loader plugin.
+ */
 export class STLFileLoader implements ISceneLoaderPlugin {
 
+    /** @hidden */
     public solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+    /** @hidden */
     public facetsPattern = /facet([\s\S]*?)endfacet/g;
+    /** @hidden */
     public normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+    /** @hidden */
     public vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
 
+    /**
+     * Defines the name of the plugin.
+     */
     public name = "stl";
 
-    // force data to come in as an ArrayBuffer
-    // we'll convert to string if it looks like it's an ASCII .stl
+    /**
+     * Defines the extensions the stl loader is able to load.
+     * force data to come in as an ArrayBuffer
+     * we'll convert to string if it looks like it's an ASCII .stl
+     */
     public extensions: ISceneLoaderPluginExtensions = {
         ".stl": { isBinary: true },
     };
 
+    /**
+     * Import meshes into a scene.
+     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
+     * @param scene The scene to import into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param meshes The meshes array to import into
+     * @param particleSystems The particle systems array to import into
+     * @param skeletons The skeletons array to import into
+     * @param onError The callback when import fails
+     * @returns True if successful or false otherwise
+     */
     public importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean {
         var matches;
 
         if (typeof data !== "string") {
 
-            if (this.isBinary(data)) {
+            if (this._isBinary(data)) {
                 // binary .stl
                 var babylonMesh = new Mesh("stlmesh", scene);
-                this.parseBinary(babylonMesh, data);
+                this._parseBinary(babylonMesh, data);
                 if (meshes) {
                     meshes.push(babylonMesh);
                 }
@@ -68,7 +94,7 @@ export class STLFileLoader implements ISceneLoaderPlugin {
             meshName = meshName || "stlmesh";
 
             var babylonMesh = new Mesh(meshName, scene);
-            this.parseASCII(babylonMesh, matches[2]);
+            this._parseASCII(babylonMesh, matches[2]);
             if (meshes) {
                 meshes.push(babylonMesh);
             }
@@ -78,6 +104,14 @@ export class STLFileLoader implements ISceneLoaderPlugin {
 
     }
 
+    /**
+     * Load into a scene.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns true if successful or false otherwise
+     */
     public load(scene: Scene, data: any, rootUrl: string): boolean {
         var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
 
@@ -88,6 +122,14 @@ export class STLFileLoader implements ISceneLoaderPlugin {
         return result;
     }
 
+    /**
+     * Load into an asset container.
+     * @param scene The scene to load into
+     * @param data The data to import
+     * @param rootUrl The root url for scene and resources
+     * @param onError The callback when import fails
+     * @returns The loaded asset container
+     */
     public loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer {
         var container = new AssetContainer(scene);
         this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
@@ -95,7 +137,7 @@ export class STLFileLoader implements ISceneLoaderPlugin {
         return container;
     }
 
-    private isBinary(data: any) {
+    private _isBinary(data: any) {
 
         // check if file size is correct for binary stl
         var faceSize, nFaces, reader;
@@ -118,7 +160,7 @@ export class STLFileLoader implements ISceneLoaderPlugin {
         return false;
     }
 
-    private parseBinary(mesh: Mesh, data: ArrayBuffer) {
+    private _parseBinary(mesh: Mesh, data: ArrayBuffer) {
 
         var reader = new DataView(data);
         var faces = reader.getUint32(80, true);
@@ -166,7 +208,7 @@ export class STLFileLoader implements ISceneLoaderPlugin {
         mesh.computeWorldMatrix(true);
     }
 
-    private parseASCII(mesh: Mesh, solidData: string) {
+    private _parseASCII(mesh: Mesh, solidData: string) {
 
         var positions = [];
         var normals = [];

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

@@ -1,11 +1,9 @@
 import { GLTFLoaderExtension } from "./glTFLoaderExtension";
 import { GLTFUtils } from "./glTFLoaderUtils";
-import { GLTFLoaderBase } from "./glTFLoaderV1";
 import { Scene } from "babylonjs";
 import { IGLTFLoaderData } from "../glTFFileLoader";
 import { IGLTFRuntime, IGLTFTexture, IGLTFImage, IGLTFBufferView, EComponentType, IGLTFShader } from "./glTFLoaderInterfaces";
-
-import { GLTFLoaderV1 } from "./glTFLoaderV1";
+import { GLTFLoaderV1, GLTFLoaderBase } from "./glTFLoaderV1";
 
 const BinaryExtensionBufferName = "binary_glTF";
 
@@ -20,6 +18,7 @@ interface IGLTFBinaryExtensionImage {
     width: number;
 }
 
+/** @hidden */
 export class GLTFBinaryExtension extends GLTFLoaderExtension {
     private _bin : ArrayBufferView;
 

+ 1 - 0
loaders/src/glTF/1.0/glTFLoaderExtension.ts

@@ -3,6 +3,7 @@ import { IGLTFLoaderData } from "../glTFFileLoader";
 import { IGLTFRuntime } from "./glTFLoaderInterfaces";
 import { GLTFLoaderV1, GLTFLoaderBase } from "./glTFLoaderV1";
 
+/** @hidden */
 export abstract class GLTFLoaderExtension {
         private _name: string;
 

+ 45 - 9
loaders/src/glTF/1.0/glTFLoaderInterfaces.ts

@@ -2,6 +2,7 @@ import { Texture, Skeleton, Scene, Bone, Node } from "babylonjs";
 
 /**
 * Enums
+* @hidden
 */
 export enum EComponentType {
     BYTE = 5120,
@@ -11,11 +12,13 @@ export enum EComponentType {
     FLOAT = 5126
 }
 
+/** @hidden */
 export enum EShaderType {
     FRAGMENT = 35632,
     VERTEX = 35633
 }
 
+/** @hidden */
 export enum EParameterType {
     BYTE = 5120,
     UNSIGNED_BYTE = 5121,
@@ -40,12 +43,14 @@ export enum EParameterType {
     SAMPLER_2D = 35678
 }
 
+/** @hidden */
 export enum ETextureWrapMode {
     CLAMP_TO_EDGE = 33071,
     MIRRORED_REPEAT = 33648,
     REPEAT = 10497
 }
 
+/** @hidden */
 export enum ETextureFilterType {
     NEAREST = 9728,
     LINEAR = 9728,
@@ -55,6 +60,7 @@ export enum ETextureFilterType {
     LINEAR_MIPMAP_LINEAR = 9987
 }
 
+/** @hidden */
 export enum ETextureFormat {
     ALPHA = 6406,
     RGB = 6407,
@@ -63,12 +69,14 @@ export enum ETextureFormat {
     LUMINANCE_ALPHA = 6410
 }
 
+/** @hidden */
 export enum ECullingType {
     FRONT = 1028,
     BACK = 1029,
     FRONT_AND_BACK = 1032
 }
 
+/** @hidden */
 export enum EBlendingFunction {
     ZERO = 0,
     ONE = 1,
@@ -87,18 +95,18 @@ export enum EBlendingFunction {
     SRC_ALPHA_SATURATE = 776
 }
 
-/**
-* Interfaces
-*/
+/** @hidden */
 export interface IGLTFProperty {
     extensions?: {[key: string]: any};
     extras?: Object;
 }
 
+/** @hidden */
 export interface IGLTFChildRootProperty extends IGLTFProperty {
     name?: string;
 }
 
+/** @hidden */
 export interface IGLTFAccessor extends IGLTFChildRootProperty {
     bufferView: string;
     byteOffset: number;
@@ -112,6 +120,7 @@ export interface IGLTFAccessor extends IGLTFChildRootProperty {
     name?: string;
 }
 
+/** @hidden */
 export interface IGLTFBufferView extends IGLTFChildRootProperty {
     buffer: string;
     byteOffset: number;
@@ -121,6 +130,7 @@ export interface IGLTFBufferView extends IGLTFChildRootProperty {
     target?: number;
 }
 
+/** @hidden */
 export interface IGLTFBuffer extends IGLTFChildRootProperty {
     uri: string;
 
@@ -128,17 +138,20 @@ export interface IGLTFBuffer extends IGLTFChildRootProperty {
     type?: string;
 }
 
+/** @hidden */
 export interface IGLTFShader extends IGLTFChildRootProperty {
     uri: string;
     type: EShaderType;
 }
 
+/** @hidden */
 export interface IGLTFProgram extends IGLTFChildRootProperty {
     attributes: string[];
     fragmentShader: string;
     vertexShader: string;
 }
 
+/** @hidden */
 export interface IGLTFTechniqueParameter {
     type: number;
 
@@ -151,6 +164,7 @@ export interface IGLTFTechniqueParameter {
     babylonValue?: any;
 }
 
+/** @hidden */
 export interface IGLTFTechniqueCommonProfile {
     lightingModel: string;
     texcoordBindings: Object;
@@ -158,6 +172,7 @@ export interface IGLTFTechniqueCommonProfile {
     parameters?: Array<any>;
 }
 
+/** @hidden */
 export interface IGLTFTechniqueStatesFunctions {
     blendColor?: number[];
     blendEquationSeparate?: number[];
@@ -166,11 +181,13 @@ export interface IGLTFTechniqueStatesFunctions {
     cullFace: number[];
 }
 
+/** @hidden */
 export interface IGLTFTechniqueStates {
     enable: number[];
     functions: IGLTFTechniqueStatesFunctions;
 }
 
+/** @hidden */
 export interface IGLTFTechnique extends IGLTFChildRootProperty {
     parameters: {[key: string]: IGLTFTechniqueParameter};
     program: string;
@@ -180,11 +197,13 @@ export interface IGLTFTechnique extends IGLTFChildRootProperty {
     states: IGLTFTechniqueStates;
 }
 
+/** @hidden */
 export interface IGLTFMaterial extends IGLTFChildRootProperty {
     technique?: string;
     values: string[];
 }
 
+/** @hidden */
 export interface IGLTFMeshPrimitive extends IGLTFProperty {
     attributes: {[key: string]: string};
     indices: string;
@@ -193,14 +212,17 @@ export interface IGLTFMeshPrimitive extends IGLTFProperty {
     mode?: number;
 }
 
+/** @hidden */
 export interface IGLTFMesh extends IGLTFChildRootProperty {
     primitives: IGLTFMeshPrimitive[];
 }
 
+/** @hidden */
 export interface IGLTFImage extends IGLTFChildRootProperty {
     uri: string;
 }
 
+/** @hidden */
 export interface IGLTFSampler extends IGLTFChildRootProperty {
     magFilter?: number;
     minFilter?: number;
@@ -208,6 +230,7 @@ export interface IGLTFSampler extends IGLTFChildRootProperty {
     wrapT?: number;
 }
 
+/** @hidden */
 export interface IGLTFTexture extends IGLTFChildRootProperty {
     sampler: string;
     source: string;
@@ -221,14 +244,17 @@ export interface IGLTFTexture extends IGLTFChildRootProperty {
     babylonTexture?: Texture;
 }
 
+/** @hidden */
 export interface IGLTFAmbienLight {
     color?: number[];
 }
 
+/** @hidden */
 export interface IGLTFDirectionalLight {
     color?: number[];
 }
 
+/** @hidden */
 export interface IGLTFPointLight {
     color?: number[];
     constantAttenuation?: number;
@@ -236,6 +262,7 @@ export interface IGLTFPointLight {
     quadraticAttenuation?: number;
 }
 
+/** @hidden */
 export interface IGLTFSpotLight {
     color?: number[];
     constantAttenuation?: number;
@@ -245,10 +272,12 @@ export interface IGLTFSpotLight {
     quadraticAttenuation?: number;
 }
 
+/** @hidden */
 export interface IGLTFLight extends IGLTFChildRootProperty {
     type: string;
 }
 
+/** @hidden */
 export interface IGLTFCameraOrthographic {
     xmag: number;
     ymag: number;
@@ -256,6 +285,7 @@ export interface IGLTFCameraOrthographic {
     znear: number;
 }
 
+/** @hidden */
 export interface IGLTFCameraPerspective {
     aspectRatio: number;
     yfov: number;
@@ -263,20 +293,24 @@ export interface IGLTFCameraPerspective {
     znear: number;
 }
 
+/** @hidden */
 export interface IGLTFCamera extends IGLTFChildRootProperty {
     type: string;
 }
 
+/** @hidden */
 export interface IGLTFAnimationChannelTarget {
     id: string;
     path: string;
 }
 
+/** @hidden */
 export interface IGLTFAnimationChannel {
     sampler: string;
     target: IGLTFAnimationChannelTarget;
 }
 
+/** @hidden */
 export interface IGLTFAnimationSampler {
     input: string;
     output: string;
@@ -284,18 +318,21 @@ export interface IGLTFAnimationSampler {
     interpolation?: string;
 }
 
+/** @hidden */
 export interface IGLTFAnimation extends IGLTFChildRootProperty {
     channels?: IGLTFAnimationChannel[];
     parameters?:  {[key: string]: string};
     samplers?: {[key: string]: IGLTFAnimationSampler};
 }
 
+/** @hidden */
 export interface IGLTFNodeInstanceSkin {
     skeletons: string[];
     skin: string;
     meshes: string[];
 }
 
+/** @hidden */
 export interface IGLTFSkins extends IGLTFChildRootProperty {
     bindShapeMatrix: number[];
     inverseBindMatrices: string;
@@ -304,6 +341,7 @@ export interface IGLTFSkins extends IGLTFChildRootProperty {
     babylonSkeleton?: Skeleton;
 }
 
+/** @hidden */
 export interface IGLTFNode extends IGLTFChildRootProperty {
     camera?: string;
     children: string[];
@@ -321,13 +359,12 @@ export interface IGLTFNode extends IGLTFChildRootProperty {
     babylonNode?: Node;
 }
 
+/** @hidden */
 export interface IGLTFScene extends IGLTFChildRootProperty {
     nodes: string[];
 }
 
-/**
-* Runtime
-*/
+/** @hidden */
 export interface IGLTFRuntime {
     extensions: {[key: string]: any};
     accessors: {[key: string]: IGLTFAccessor};
@@ -370,15 +407,14 @@ export interface IGLTFRuntime {
     dummyNodes: Node[];
 }
 
-/**
-* Bones
-*/
+/** @hidden */
 export interface INodeToRoot {
     bone: Bone;
     node: IGLTFNode;
     id: string;
 }
 
+/** @hidden */
 export interface IJointNode {
     node: IGLTFNode;
     id: string;

+ 1 - 0
loaders/src/glTF/1.0/glTFLoaderUtils.ts

@@ -3,6 +3,7 @@ import { IGLTFTechniqueParameter, EParameterType, ETextureWrapMode, IGLTFAccesso
 
 /**
 * Utils functions for GLTF
+* @hidden
 */
 export class GLTFUtils {
     /**

+ 2 - 0
loaders/src/glTF/1.0/glTFLoaderV1.ts

@@ -1169,6 +1169,7 @@ var importMaterials = (gltfRuntime: IGLTFRuntime) => {
 
 /**
 * Implementation of the base glTF spec
+* @hidden
 */
 export class GLTFLoaderBase {
     public static CreateRuntime(parsedData: any, scene: Scene, rootUrl: string): IGLTFRuntime {
@@ -1554,6 +1555,7 @@ export class GLTFLoaderBase {
 
 /**
 * glTF V1 Loader
+* @hidden
 */
 export class GLTFLoaderV1 implements IGLTFLoader {
     public static Extensions: { [name: string]: GLTFLoaderExtension } = {};

+ 1 - 0
loaders/src/glTF/1.0/glTFMaterialsCommonExtension.ts

@@ -60,6 +60,7 @@ interface IGLTFSpotLightCommonExtension {
     quadraticAttenuation: number;
 }
 
+/** @hidden */
 export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
 
     constructor() {